Class CStackPerspective
java.lang.Object
bibliothek.gui.dock.station.stack.StackDockPerspective
bibliothek.gui.dock.common.perspective.CStackPerspective
- All Implemented Interfaces:
ShrinkablePerspectiveStation,PerspectiveDockable,PerspectiveElement,PerspectiveStation,PlaceholderListItem<PerspectiveDockable>
This perspective represents a group of dockables.
- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new station.CStackPerspective(CDockablePerspective[] children, CDockablePerspective selection) Creates a new station.CStackPerspective(PerspectiveDockable[] children, PerspectiveDockable selection) Creates a new station. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(CDockablePerspective dockable) Addsdockableat the end of the list of dockables.voidinsert(int index, CDockablePerspective dockable) Insertsdockableat locationindex.voidremove(CDockablePerspective dockable) Removes the elementdockablefrom this station.shrink()Checks the number of children this perspective has.Methods inherited from class bibliothek.gui.dock.station.stack.StackDockPerspective
add, addPlaceholder, addPlaceholder, asDockable, asStation, canRead, getDockable, getDockableCount, getDockableProperty, getFactoryID, getItemCount, getParent, getPlaceholder, getPlaceholders, getSelection, indexOf, indexOf, insert, insertPlaceholder, insertPlaceholder, read, remove, remove, replace, setParent, setPlaceholders, setSelection, toMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface bibliothek.gui.dock.perspective.PerspectiveElement
asDockable, asStation, getFactoryIDMethods inherited from interface bibliothek.gui.dock.perspective.PerspectiveStation
getDockable, getDockableCount, getDockableProperty, getPlaceholders, remove, replace, setPlaceholders
-
Constructor Details
-
CStackPerspective
public CStackPerspective()Creates a new station. -
CStackPerspective
Creates a new station.- Parameters:
children- the children of this perspectiveselection- the selected child, can benull
-
CStackPerspective
Creates a new station.- Parameters:
children- the children of this stationselection- the selected child, can benull
-
-
Method Details
-
shrink
Description copied from interface:ShrinkablePerspectiveStationChecks the number of children this perspective has. If the number of children is 0 or 1, then this perspective replaces itself by its child in the of perspectives.- Specified by:
shrinkin interfaceShrinkablePerspectiveStation- Returns:
- the replacement of
this, which is eitherthis, the only child ofthis, ornull
-
insert
Insertsdockableat locationindex.- Parameters:
index- the location where to insertdockabledockable- the element to insert, notnull
-
add
Addsdockableat the end of the list of dockables.- Parameters:
dockable- the element to add at the end
-
remove
Removes the elementdockablefrom this station.- Parameters:
dockable- the element to remove
-