bibliothek.gui.dock.station.split
Class SplitDockTree.Key

java.lang.Object
  extended by bibliothek.gui.dock.station.split.SplitDockTree.Key
Enclosing class:
SplitDockTree<D>

public abstract class SplitDockTree.Key
extends Object

A key that represents either a node or a leaf. Clients should not subclass this class.

Author:
Benjamin Sigg

Constructor Summary
SplitDockTree.Key(Path[] placeholders, PlaceholderMap placeholderMap, long id)
          Creates a new key
 
Method Summary
protected  bibliothek.gui.dock.station.split.SplitDockTree.Leaf asLeaf()
          Gets this key as a leaf.
protected  bibliothek.gui.dock.station.split.SplitDockTree.Node asNode()
          Gets this key as a node.
 long getNodeId()
          Gets the unique id of this node.
 SplitDockTree.Key getParent()
          Gets the parent of this node or leaf.
 SplitDockTree<D> getTree()
          Gets the tree which is the owner of this node or leaf.
 void setNodeId(long id)
          Sets the unique identifier of this node
protected abstract  void toString(StringBuilder builder, int depth)
          Converts this key and all its children into a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitDockTree.Key

public SplitDockTree.Key(Path[] placeholders,
                         PlaceholderMap placeholderMap,
                         long id)
Creates a new key

Parameters:
placeholders - the placeholders that are associated with this node
placeholderMap - placeholder information about a child DockStation
id - the unique id of this node
Method Detail

toString

protected abstract void toString(StringBuilder builder,
                                 int depth)
Converts this key and all its children into a String.

Parameters:
builder - the builder to which the content of this key is to be added
depth - the depth of this key (number of parents)

getTree

public SplitDockTree<D> getTree()
Gets the tree which is the owner of this node or leaf.

Returns:
the owner

getParent

public SplitDockTree.Key getParent()
Gets the parent of this node or leaf.

Returns:
the parent, can be null

setNodeId

public void setNodeId(long id)
Sets the unique identifier of this node

Parameters:
id - the id or -1

getNodeId

public long getNodeId()
Gets the unique id of this node.

Returns:
the identifier or -1

asLeaf

protected bibliothek.gui.dock.station.split.SplitDockTree.Leaf asLeaf()
Gets this key as a leaf.

Returns:
this or null

asNode

protected bibliothek.gui.dock.station.split.SplitDockTree.Node asNode()
Gets this key as a node.

Returns:
this or null