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

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

public static class SplitDockPerspective.Node
extends SplitDockPerspective.Entry

A node in a tree.

Author:
Benjamin Sigg

Constructor Summary
SplitDockPerspective.Node(SplitDockStation.Orientation orientation, double divider, SplitDockPerspective.Entry childA, SplitDockPerspective.Entry childB, java.util.Set<Path> placeholders, PlaceholderMap placeholderMap, long id)
          Creates a new node.
 
Method Summary
 SplitDockPerspective.Node asNode()
          Returns this as node or null.
 SplitDockPerspective.Entry getChildA()
          Gets the left or top child.
 SplitDockPerspective.Entry getChildB()
          Gets the right or bottom child.
 double getDivider()
          The location of the divider.
 SplitDockStation.Orientation getOrientation()
          Tells whether this node is horizontal or vertical.
 void setChildA(SplitDockPerspective.Entry childA)
          Sets the left or top child of this node.
 void setChildB(SplitDockPerspective.Entry childB)
          Sets the right or bottom child of this node.
 
Methods inherited from class bibliothek.gui.dock.station.split.SplitDockPerspective.Entry
asLeaf, 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.Node

public SplitDockPerspective.Node(SplitDockStation.Orientation orientation,
                                 double divider,
                                 SplitDockPerspective.Entry childA,
                                 SplitDockPerspective.Entry childB,
                                 java.util.Set<Path> placeholders,
                                 PlaceholderMap placeholderMap,
                                 long id)
Creates a new node.

Parameters:
orientation - whether this node is horizontal or vertical
divider - the location of the divider
childA - the left or top child
childB - the right or bottom child
placeholders - placeholders associated with this node
placeholderMap - placeholder information of a child DockStation
id - the unique identifier of this node or -1
Method Detail

asNode

public SplitDockPerspective.Node asNode()
Description copied from class: SplitDockPerspective.Entry
Returns this as node or null.

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

getOrientation

public SplitDockStation.Orientation getOrientation()
Tells whether this node is horizontal or vertical.

Returns:
the orientation

getDivider

public double getDivider()
The location of the divider.

Returns:
a value between 0 and 1

getChildA

public SplitDockPerspective.Entry getChildA()
Gets the left or top child.

Returns:
the left or top child

setChildA

public void setChildA(SplitDockPerspective.Entry childA)
Sets the left or top child of this node.

Parameters:
childA - the new child, can be null

getChildB

public SplitDockPerspective.Entry getChildB()
Gets the right or bottom child.

Returns:
the right or bottom child

setChildB

public void setChildB(SplitDockPerspective.Entry childB)
Sets the right or bottom child of this node.

Parameters:
childB - the new child, can be null