Class CWorkingPerspective
java.lang.Object
bibliothek.gui.dock.common.perspective.AbstractCDockablePerspective
bibliothek.gui.dock.common.perspective.SingleCDockablePerspective
bibliothek.gui.dock.common.perspective.CGridPerspective
bibliothek.gui.dock.common.perspective.CWorkingPerspective
- All Implemented Interfaces:
CDockablePerspective,CElementPerspective,CStationPerspective
A representation of a
CWorkingArea. When using this perspective to handle the children of a CWorkingArea
the following rules must be followed:
- Adding or removing a
CDockablePerspectiveto this station may trigger a call toCDockablePerspective.setWorkingArea(CStationPerspective), clients can however first add/remove a dockable and then alter the working-area of the dockable to their likings. - Adding: the working-area of a child is only set to
thisif the working-area had a value ofnull - Removing: the working-area of a child is only set to
nullif the working-area had a value ofthisand ifisAutoUnset()returnstrue. - This perspective recursively visits all dockables and stations when adding or removing a child.
MultipleCDockablePerspective: if the working-area is set, then it is automatically set in theMultipleCDockableas well.SingleCDockablePerspective: if the working-area is set, then it is automatically set in theSingleCDockableas well.- This perspective does not track changes on children. If some
PerspectiveStationwas added and then some children are added to that station, then thisCworkingPerspectivewill not set the working-area property of the new children.
- Author:
- Benjamin Sigg
-
Nested Class Summary
Nested classes/interfaces inherited from class bibliothek.gui.dock.common.perspective.CGridPerspective
CGridPerspective.CommonSplitDockPerspectiveNested classes/interfaces inherited from class bibliothek.gui.dock.common.perspective.SingleCDockablePerspective
SingleCDockablePerspective.Intern -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new working area.CWorkingPerspective(String id, Path typeId) Creates a new working area. -
Method Summary
Modifier and TypeMethodDescriptioncreate()Called the first timeSingleCDockablePerspective.intern()is called, this method creates the intern representation of thisSingleCDockablePerspective.booleanTells whether the working-area of children is automatically set tonullwhen the children are removed from this station.voidsetAutoUnset(boolean autoUnset) Tells this station to set theworking-areatonullwhen a child of this station is removed.Methods inherited from class bibliothek.gui.dock.common.perspective.CGridPerspective
asStation, getFactoryID, getGridNodes, getMaximized, getPerspective, getPlaceholders, getRoot, getTypeId, grid, gridAdd, gridClear, gridDeploy, gridHorizontal, gridPlaceholder, gridPlaceholder, gridPrepare, gridSelect, gridVertical, intern, isAutoDeploy, isRoot, isWorkingArea, maximize, maximize, maybeDeploy, setAutoDeploy, setPerspective, setPlaceholders, setRoot, setWorkingArea, unpackMethods inherited from class bibliothek.gui.dock.common.perspective.SingleCDockablePerspective
asDockable, getUniqueIdMethods inherited from class bibliothek.gui.dock.common.perspective.AbstractCDockablePerspective
getLocationHistory, getParent, getWorkingArea, remove, setWorkingAreaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface bibliothek.gui.dock.common.perspective.CElementPerspective
asDockableMethods inherited from interface bibliothek.gui.dock.common.perspective.CStationPerspective
getUniqueId
-
Constructor Details
-
CWorkingPerspective
Creates a new working area.- Parameters:
id- the unique identifier of this area
-
CWorkingPerspective
Creates a new working area.- Parameters:
id- the unique identifier of this areatypeId- the type of this station, can benull
-
-
Method Details
-
setAutoUnset
public void setAutoUnset(boolean autoUnset) Tells this station to set theworking-areatonullwhen a child of this station is removed. The default value of this property isfalse.- Parameters:
autoUnset- whether the working-area should be automatically set tonull
-
isAutoUnset
public boolean isAutoUnset()Tells whether the working-area of children is automatically set tonullwhen the children are removed from this station.- Returns:
- whether the working-area is set to
null
-
create
Description copied from class:SingleCDockablePerspectiveCalled the first timeSingleCDockablePerspective.intern()is called, this method creates the intern representation of thisSingleCDockablePerspective.- Overrides:
createin classCGridPerspective- Returns:
- the internal representation of
this
-