bibliothek.gui.dock.common.perspective
Class AbstractCDockablePerspective

java.lang.Object
  extended by bibliothek.gui.dock.common.perspective.AbstractCDockablePerspective
All Implemented Interfaces:
CDockablePerspective, CElementPerspective
Direct Known Subclasses:
MultipleCDockablePerspective, SingleCDockablePerspective

public abstract class AbstractCDockablePerspective
extends Object
implements CDockablePerspective

An abstract implementation of CDockablePerspective providing some general methods.

Author:
Benjamin Sigg

Constructor Summary
AbstractCDockablePerspective()
           
 
Method Summary
 LocationHistory getLocationHistory()
          Gets information about the locations this dockable had in the past.
 CStationPerspective getParent()
          Gets the next parent of this perspective that represents a CStation.
 CStationPerspective getWorkingArea()
          Gets the working-area of this element
 void remove()
          Removes this dockable from its parent (if there is a parent).
 void setWorkingArea(CStationPerspective workingArea)
          Sets the working-area of this element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.common.perspective.CElementPerspective
asDockable, asStation, intern
 

Constructor Detail

AbstractCDockablePerspective

public AbstractCDockablePerspective()
Method Detail

getParent

public CStationPerspective getParent()
Description copied from interface: CDockablePerspective
Gets the next parent of this perspective that represents a CStation. This method may jump over some parents to get to the next station.

Specified by:
getParent in interface CDockablePerspective
Returns:
the next station, may be null

setWorkingArea

public void setWorkingArea(CStationPerspective workingArea)
Description copied from interface: CDockablePerspective
Sets the working-area of this element. This user will not be able drag this element away from that working-area.

Specified by:
setWorkingArea in interface CDockablePerspective
Parameters:
workingArea - the working-area, can be null

getWorkingArea

public CStationPerspective getWorkingArea()
Description copied from interface: CDockablePerspective
Gets the working-area of this element

Specified by:
getWorkingArea in interface CDockablePerspective
Returns:
the area, can be null
See Also:
CDockablePerspective.setWorkingArea(CStationPerspective)

getLocationHistory

public LocationHistory getLocationHistory()
Description copied from interface: CDockablePerspective
Gets information about the locations this dockable had in the past.

Specified by:
getLocationHistory in interface CDockablePerspective
Returns:
the locations, not null

remove

public void remove()
Removes this dockable from its parent (if there is a parent). This method tries to call CPerspective.storeLocation(CDockablePerspective) which will allow the dockable to store its last location, leave a placeholder, and make the perspective remember that there is an invisible dockable.