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

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

public static class SplitDockStationLayout.Node
extends SplitDockStationLayout.Entry

A node in a tree.

Author:
Benjamin Sigg

Constructor Summary
SplitDockStationLayout.Node(SplitDockStation.Orientation orientation, double divider, SplitDockStationLayout.Entry childA, SplitDockStationLayout.Entry childB, Path[] placeholders, PlaceholderMap placeholderMap, long id)
          Creates a new node.
 
Method Summary
 SplitDockStationLayout.Node asNode()
          Returns this as node or null.
 SplitDockPathProperty createPathProperty(SplitDockStationLayout.Entry child)
          Creates a new path pointing to child which must be a child of this node.
 SplitDockStationLayout.Entry getChildA()
          Gets the left or top child.
 SplitDockStationLayout.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.
 boolean isVisible()
          Whether this node or leaf is visible to the user.
 
Methods inherited from class bibliothek.gui.dock.station.split.SplitDockStationLayout.Entry
asLeaf, createPathProperty, getNodeId, getParent, getPlaceholderMap, getPlaceholders, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitDockStationLayout.Node

public SplitDockStationLayout.Node(SplitDockStation.Orientation orientation,
                                   double divider,
                                   SplitDockStationLayout.Entry childA,
                                   SplitDockStationLayout.Entry childB,
                                   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 SplitDockStationLayout.Node asNode()
Description copied from class: SplitDockStationLayout.Entry
Returns this as node or null.

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

isVisible

public boolean isVisible()
Description copied from class: SplitDockStationLayout.Entry
Whether this node or leaf is visible to the user.

Specified by:
isVisible in class SplitDockStationLayout.Entry
Returns:
true if this represents some graphical element or has a visible child

createPathProperty

public SplitDockPathProperty createPathProperty(SplitDockStationLayout.Entry child)
Creates a new path pointing to child which must be a child of this node.

Parameters:
child - some child of this node
Returns:
a new path for child

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 SplitDockStationLayout.Entry getChildA()
Gets the left or top child.

Returns:
the left or top child

getChildB

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

Returns:
the right or bottom child