bibliothek.gui.dock.station.split
Class SplitTreePathFactory

java.lang.Object
  extended by bibliothek.gui.dock.station.split.SplitTreePathFactory
All Implemented Interfaces:
SplitTreeFactory<SplitDockPathProperty>

public abstract class SplitTreePathFactory
extends Object
implements SplitTreeFactory<SplitDockPathProperty>

A factory for creating a SplitDockPathProperty pointing to some node.
Subclasses can override any method and create a new SplitDockPathProperty when appropriate, the factory will fill out all the fields of that property.

Author:
Benjamin Sigg

Constructor Summary
SplitTreePathFactory()
           
 
Method Summary
 SplitDockPathProperty horizontal(SplitDockPathProperty left, SplitDockPathProperty right, double divider, long id, Path[] placeholders, PlaceholderMap placeholderMap, boolean visible)
          Informs about a node that is divided vertically.
 SplitDockPathProperty leaf(Dockable check, long id, Path[] placeholders, PlaceholderMap placeholderMap)
          Informs about a leaf of the tree.
 SplitDockPathProperty placeholder(long id, Path[] placeholders, PlaceholderMap placeholderMap)
          Informs about a set of placeholder in the tree.
 SplitDockPathProperty root(SplitDockPathProperty root, long id)
          Informs about the node that is the root.
 SplitDockPathProperty vertical(SplitDockPathProperty top, SplitDockPathProperty bottom, double divider, long id, Path[] placeholders, PlaceholderMap placeholderMap, boolean visible)
          Informs about a node that is divided vertically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitTreePathFactory

public SplitTreePathFactory()
Method Detail

leaf

public SplitDockPathProperty leaf(Dockable check,
                                  long id,
                                  Path[] placeholders,
                                  PlaceholderMap placeholderMap)
Description copied from interface: SplitTreeFactory
Informs about a leaf of the tree.

Specified by:
leaf in interface SplitTreeFactory<SplitDockPathProperty>
Parameters:
check - the element in the leaf
id - the unique identifier of this node or -1
placeholders - the placeholders associated with this node, can be empty
placeholderMap - placeholder information of a child DockStation
Returns:
the representation of the leaf or null

placeholder

public SplitDockPathProperty placeholder(long id,
                                         Path[] placeholders,
                                         PlaceholderMap placeholderMap)
Description copied from interface: SplitTreeFactory
Informs about a set of placeholder in the tree.

Specified by:
placeholder in interface SplitTreeFactory<SplitDockPathProperty>
Parameters:
id - the unique id of this placeholder
placeholders - the placeholders
placeholderMap - placeholder information of a child DockStation
Returns:
the representation of the placeholder or null

root

public SplitDockPathProperty root(SplitDockPathProperty root,
                                  long id)
Description copied from interface: SplitTreeFactory
Informs about the node that is the root.

Specified by:
root in interface SplitTreeFactory<SplitDockPathProperty>
Parameters:
root - the root of the tree, might be null
id - the unique identifier of this node or -1
Returns:
the tree itself, or null

horizontal

public SplitDockPathProperty horizontal(SplitDockPathProperty left,
                                        SplitDockPathProperty right,
                                        double divider,
                                        long id,
                                        Path[] placeholders,
                                        PlaceholderMap placeholderMap,
                                        boolean visible)
Description copied from interface: SplitTreeFactory
Informs about a node that is divided vertically.

Specified by:
horizontal in interface SplitTreeFactory<SplitDockPathProperty>
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.
id - the unique identifier of this node or -1
placeholders - the placeholders associated with this node, can be empty
placeholderMap - placeholder information of a child DockStation
visible - whether this node is visible to the user or not. A node is only visible to the user if at least one of its children is visible
Returns:
the representation of this node, might be null

vertical

public SplitDockPathProperty vertical(SplitDockPathProperty top,
                                      SplitDockPathProperty bottom,
                                      double divider,
                                      long id,
                                      Path[] placeholders,
                                      PlaceholderMap placeholderMap,
                                      boolean visible)
Description copied from interface: SplitTreeFactory
Informs about a node that is divided vertically.

Specified by:
vertical in interface SplitTreeFactory<SplitDockPathProperty>
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.
id - the unique identifier of this node or -1
placeholders - the placeholders associated with this node, can be empty
placeholderMap - placeholder information of a child DockStation
visible - whether this node is visible to the user or not. A node is only visible to the user if at least one of its children is visible
Returns:
the representation of this node, might be null