bibliothek.gui.dock.station.split
Interface SplitTreeFactory<N>

Type Parameters:
N - the type of elements representing leafs and nodes
All Known Implementing Classes:
SplitDockTreeFactory

public interface SplitTreeFactory<N>

A factory used to create trees that somehow represent the layout of a SplitDockStation.

Author:
Benjamin Sigg

Method Summary
 N horizontal(N left, N right, double divider)
          Informs about a node that is divided vertically.
 N leaf(Dockable dockable)
          Informs about a leaf of the tree.
 N root(N root)
          Informs about the node that is the root.
 N vertical(N top, N bottom, double divider)
          Informs about a node that is divided vertically.
 

Method Detail

leaf

N leaf(Dockable dockable)
Informs about a leaf of the tree.

Parameters:
dockable - the element in the leaf
Returns:
the representation of the leaf, or null

horizontal

N horizontal(N left,
             N right,
             double divider)
Informs about a node that is divided vertically.

Parameters:
left - the left child of the node, might be null
right - the right child of the node, might be null
divider - the size of the left node, a value between 0 and 1.
Returns:
the representation of this node, might be null

vertical

N vertical(N top,
           N bottom,
           double divider)
Informs about a node that is divided vertically.

Parameters:
top - the top child of the node, might be null
bottom - the bottom child of the node, might be null
divider - the size of the top node, a value between 0 and 1.
Returns:
the representation of this node, might be null

root

N root(N root)
Informs about the node that is the root.

Parameters:
root - the root of the tree, might be null
Returns:
the tree itself, or null