bibliothek.gui.dock.common.perspective
Class CStackPerspective

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.StackDockPerspective
      extended by bibliothek.gui.dock.common.perspective.CStackPerspective
All Implemented Interfaces:
ShrinkablePerspectiveStation, PerspectiveDockable, PerspectiveElement, PerspectiveStation, PlaceholderListItem<PerspectiveDockable>

public class CStackPerspective
extends StackDockPerspective
implements ShrinkablePerspectiveStation

This perspective represents a group of dockables.

Author:
Benjamin Sigg

Constructor Summary
CStackPerspective()
          Creates a new station.
CStackPerspective(CDockablePerspective[] children, CDockablePerspective selection)
          Creates a new station.
CStackPerspective(PerspectiveDockable[] children, PerspectiveDockable selection)
          Creates a new station.
 
Method Summary
 void add(CDockablePerspective dockable)
          Adds dockable at the end of the list of dockables.
 void insert(int index, CDockablePerspective dockable)
          Inserts dockable at location index.
 void remove(CDockablePerspective dockable)
          Removes the element dockable from this station.
 PerspectiveDockable shrink()
          Checks the number of children this perspective has.
 
Methods inherited from class bibliothek.gui.dock.station.stack.StackDockPerspective
add, addPlaceholder, asDockable, asStation, getDockable, getDockableCount, getDockableProperty, getFactoryID, getParent, getPlaceholder, getPlaceholders, getSelection, indexOf, insert, insertPlaceholder, read, remove, remove, replace, setParent, setPlaceholders, setSelection, toMap
 
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.perspective.PerspectiveStation
getDockable, getDockableCount, getDockableProperty, getPlaceholders, remove, replace, setPlaceholders
 
Methods inherited from interface bibliothek.gui.dock.perspective.PerspectiveElement
asDockable, asStation, getFactoryID
 

Constructor Detail

CStackPerspective

public CStackPerspective()
Creates a new station.


CStackPerspective

public CStackPerspective(PerspectiveDockable[] children,
                         PerspectiveDockable selection)
Creates a new station.

Parameters:
children - the children of this perspective
selection - the selected child, can be null

CStackPerspective

public CStackPerspective(CDockablePerspective[] children,
                         CDockablePerspective selection)
Creates a new station.

Parameters:
children - the children of this station
selection - the selected child, can be null
Method Detail

shrink

public PerspectiveDockable shrink()
Description copied from interface: ShrinkablePerspectiveStation
Checks 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:
shrink in interface ShrinkablePerspectiveStation
Returns:
the replacement of this, which is either this, the only child of this, or null

insert

public void insert(int index,
                   CDockablePerspective dockable)
Inserts dockable at location index.

Parameters:
index - the location where to insert dockable
dockable - the element to insert, not null

add

public void add(CDockablePerspective dockable)
Adds dockable at the end of the list of dockables.

Parameters:
dockable - the element to add at the end

remove

public void remove(CDockablePerspective dockable)
Removes the element dockable from this station.

Parameters:
dockable - the element to remove