bibliothek.gui.dock.station.split
Class SplitDockPerspective.Leaf

java.lang.Object
  extended by bibliothek.gui.dock.station.split.SplitDockPerspective.Entry
      extended by bibliothek.gui.dock.station.split.SplitDockPerspective.Leaf
Enclosing class:
SplitDockPerspective

public static class SplitDockPerspective.Leaf
extends SplitDockPerspective.Entry

A leaf in a tree, describes one Dockable.

Author:
Benjamin Sigg

Constructor Summary
SplitDockPerspective.Leaf(PerspectiveDockable dockable, Set<Path> placeholders, PlaceholderMap placeholderMap, long nodeId)
          Creates a new leaf
 
Method Summary
 SplitDockPerspective.Leaf asLeaf()
          Returns this as leaf or null.
 PerspectiveDockable getDockable()
          Gets the element which is represented by this leaf.
 void remove()
          Sets the dockable of this entry to null and inserts the placeholder of the element.
 void setDockable(PerspectiveDockable dockable)
          Exchanges the element that is represented by this perspective.
 
Methods inherited from class bibliothek.gui.dock.station.split.SplitDockPerspective.Entry
asNode, delete, getNodeId, getParent, getPerspective, getPlaceholderMap, getPlaceholders, isAnchestor, replace, setParent, setPlaceholderMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitDockPerspective.Leaf

public SplitDockPerspective.Leaf(PerspectiveDockable dockable,
                                 Set<Path> placeholders,
                                 PlaceholderMap placeholderMap,
                                 long nodeId)
Creates a new leaf

Parameters:
dockable - the element that is represented by this leaf
placeholders - placeholders associated with this leaf
placeholderMap - placeholder information of a child DockStation
nodeId - the unique identifier of this node, can be -1
Method Detail

asLeaf

public SplitDockPerspective.Leaf asLeaf()
Description copied from class: SplitDockPerspective.Entry
Returns this as leaf or null.

Overrides:
asLeaf in class SplitDockPerspective.Entry
Returns:
this or null

getDockable

public PerspectiveDockable getDockable()
Gets the element which is represented by this leaf.

Returns:
the element, can be null

setDockable

public void setDockable(PerspectiveDockable dockable)
Exchanges the element that is represented by this perspective. This operation does not change any placeholders.

Parameters:
dockable - the new element, can be null

remove

public void remove()
Sets the dockable of this entry to null and inserts the placeholder of the element. If there are no placeholders, then SplitDockPerspective.Entry.delete() is called.
This method must only be called if this leaf is actually used by a SplitDockPerspective.