Class CMinimizePerspective

java.lang.Object
bibliothek.gui.dock.common.perspective.CMinimizePerspective
All Implemented Interfaces:
CElementPerspective, CStationPerspective

public class CMinimizePerspective extends Object implements CStationPerspective
Author:
Benjamin Sigg
  • Constructor Details

    • CMinimizePerspective

      public CMinimizePerspective(String id)
      Creates a new, empty perspective.
      Parameters:
      id - the unique identifier of this perspective
    • CMinimizePerspective

      public CMinimizePerspective(String id, Path typeId)
      Creates a new, empty perspective.
      Parameters:
      id - the unique identifier of this perspective
      typeId - the type of this station, can be null
  • Method Details

    • setPerspective

      public void setPerspective(CPerspective perspective)
      Description copied from interface: CStationPerspective
      Informs this station by which perspective it is used.
      Specified by:
      setPerspective in interface CStationPerspective
      Parameters:
      perspective - the perspective that uses this station or null
    • getPerspective

      public CPerspective getPerspective()
      Description copied from interface: CStationPerspective
      Gets the perspective which presents this station.
      Specified by:
      getPerspective in interface CStationPerspective
      Returns:
      the owner of this station, can be null
    • getTypeId

      public Path getTypeId()
      Description copied from interface: CStationPerspective
      Gets the unique id denoting the type of this CStation, this should be the exact same result as CStation.getTypeId() will return.
      Specified by:
      getTypeId in interface CStationPerspective
      Returns:
      the type id, can be null
    • isRoot

      public boolean isRoot()
      Description copied from interface: CStationPerspective
      Tells whether this is a root station or not.
      Specified by:
      isRoot in interface CStationPerspective
      Returns:
      the root flag
      See Also:
    • setRoot

      public void setRoot(boolean root)
      Description copied from interface: CStationPerspective
      Sets the root station flag. Setting flag is equivalent of setting the root parameter when calling CControl.addStation(bibliothek.gui.dock.common.CStation, boolean). The location of a Dockable is always relative to its nearest root-station parent.
      Please note that the root-flag set by calling CControl.addStation(bibliothek.gui.dock.common.CStation, boolean) will never be overridden by the flag set in the perspective.
      Specified by:
      setRoot in interface CStationPerspective
      Parameters:
      root -
    • add

      public void add(CDockablePerspective dockable)
      Adds dockable at the end of the list of children of this area.
      Parameters:
      dockable - the element to add
    • insert

      public void insert(int index, CDockablePerspective dockable)
      Inserts dockable at location index to the list of children of this area.
      Parameters:
      index - the location of dockable
      dockable - the element to insert
    • addPlaceholder

      public void addPlaceholder(CDockablePerspective dockable)
      Adds a placeholder for dockable at the end of the list of children of this area.
      Parameters:
      dockable - the element for which a placeholder will be registered
    • addPlaceholder

      public void addPlaceholder(Path placeholder)
      Adds a placeholder at the end of the list of children of this area.
      Parameters:
      placeholder - the new placeholder, not null
    • insertPlaceholder

      public void insertPlaceholder(int index, CDockablePerspective dockable)
      Inserts a placeholder for dockable at location index in the list of children of this area.
      Parameters:
      index - the location of the placeholder
      dockable - the element for which a placeholder will be registered
    • insertPlaceholder

      public void insertPlaceholder(int index, Path placeholder)
      Inserts a placeholder at location index in the list of children of this area.
      Parameters:
      index - the location of the placeholder
      placeholder - the new placeholder, not null
    • indexOf

      public int indexOf(CDockablePerspective dockable)
      Gets the location of dockable on this area.
      Parameters:
      dockable - some child of this area
      Returns:
      the location or -1 if not found
    • remove

      public boolean remove(CDockablePerspective dockable)
      Removes dockable from this area.
      Parameters:
      dockable - the element to remove
      Returns:
      true if dockable was found and removed, false otherwise
    • remove

      public CDockablePerspective remove(int index)
      Removes the index'th child of this area.
      Parameters:
      index - the index of the child to remove
      Returns:
      the child that was removed, null if the child is not a CDockablePerspective
    • asDockable

      public CDockablePerspective asDockable()
      Description copied from interface: CElementPerspective
      Gets this as dockable, if this is a dockable.
      Specified by:
      asDockable in interface CElementPerspective
      Returns:
      this or null
    • asStation

      public CStationPerspective asStation()
      Description copied from interface: CElementPerspective
      Gets this as station, if this is a station.
      Specified by:
      asStation in interface CElementPerspective
      Returns:
      this or null
    • getFactoryID

      public String getFactoryID()
    • getUniqueId

      public String getUniqueId()
      Description copied from interface: CStationPerspective
      Gets the unique identifier of this station.
      Specified by:
      getUniqueId in interface CStationPerspective
      Returns:
      the unique identifier
    • intern

      Description copied from interface: CElementPerspective
      Gets the internal representation for this element.
      If CElementPerspective.asDockable() returns a non-null value, then intern().asDockable() must not return null either.
      If CElementPerspective.asStation() returns a non-null value, then intern().asStation() must not return null either.
      Specified by:
      intern in interface CElementPerspective
      Returns:
      the internal representation
    • getPlaceholders

      public PlaceholderMap getPlaceholders()
    • setPlaceholders

      public void setPlaceholders(PlaceholderMap placeholders)
    • isWorkingArea

      public boolean isWorkingArea()
      Description copied from interface: CStationPerspective
      Tells whether this station will act as a working area.
      Specified by:
      isWorkingArea in interface CStationPerspective
      Returns:
      whether this station acts as working area