bibliothek.gui.dock.common.perspective
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
public class CWorkingPerspective
- extends CGridPerspective
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
CDockablePerspective
to this station may trigger a call to CDockablePerspective.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
this
if the working-area had a value of null
- Removing: the working-area of a child is only set to
null
if the working-area had a value of this
and if
isAutoUnset()
returns true
.
- 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 the MultipleCDockable
as well.
SingleCDockablePerspective
: if the working-area is set, then it is automatically set in the SingleCDockable
as well.
- This perspective does not track changes on children. If some
PerspectiveStation
was added and then some children are added
to that station, then this CworkingPerspective
will not set the working-area property of the new children.
- Author:
- Benjamin Sigg
Methods inherited from class bibliothek.gui.dock.common.perspective.CGridPerspective |
asStation, getFactoryID, getMaximized, getPerspective, getPlaceholders, getRoot, getTypeId, grid, gridAdd, gridClear, gridDeploy, gridHorizontal, gridPlaceholder, gridPrepare, gridSelect, gridVertical, intern, isAutoDeploy, isRoot, isWorkingArea, maximize, maximize, maybeDeploy, setAutoDeploy, setPerspective, setPlaceholders, setRoot, setWorkingArea |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CWorkingPerspective
public CWorkingPerspective(String id)
- Creates a new working area.
- Parameters:
id
- the unique identifier of this area
CWorkingPerspective
public CWorkingPerspective(String id,
Path typeId)
- Creates a new working area.
- Parameters:
id
- the unique identifier of this areatypeId
- the type of this station, can be null
setAutoUnset
public void setAutoUnset(boolean autoUnset)
- Tells this station to set the
working-area
to null
when a child of this station is removed. The default value of this property is
false
.
- Parameters:
autoUnset
- whether the working-area should be automatically set to null
isAutoUnset
public boolean isAutoUnset()
- Tells whether the working-area of children is automatically set to
null
when the children
are removed from this station.
- Returns:
- whether the working-area is set to
null
create
protected CGridPerspective.CommonSplitDockPerspective create()
- Description copied from class:
SingleCDockablePerspective
- Called the first time
SingleCDockablePerspective.intern()
is called, this method creates
the intern representation of this SingleCDockablePerspective
.
- Overrides:
create
in class CGridPerspective
- Returns:
- the internal representation of
this