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>

public class CStackPerspective extends StackDockPerspective implements ShrinkablePerspectiveStation
This perspective represents a group of dockables.
Author:
Benjamin Sigg
  • Constructor Details

    • 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 Details

    • 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