bibliothek.gui.dock.common.location
Class TreeLocationLeaf

java.lang.Object
  extended by bibliothek.gui.dock.common.CLocation
      extended by bibliothek.gui.dock.common.location.AbstractStackholdingLocation
          extended by bibliothek.gui.dock.common.location.TreeLocationLeaf

public class TreeLocationLeaf
extends AbstractStackholdingLocation

Represents a leaf in a path of tree-nodes.

Author:
Benjamin Sigg

Constructor Summary
TreeLocationLeaf(AbstractTreeLocation parent, long leafId)
          Creates a new leaf.
 
Method Summary
 CLocation aside()
          Returns a CLocation that describes the location of an element that should be inserted next to this location.
 ExtendedMode findMode()
          Gets the mode this location represents.
protected  SplitDockPathProperty findParentProperty()
           
 SplitDockPathProperty findProperty(DockableProperty successor)
          Gets a path describing this location in terms of the DockingFrames.
 String findRoot()
          Gets the name of the station this location belongs to.
 long getLeafId()
          Gets the unique identifier of the leaf which is represented by this TreeLocationLeaf.
 AbstractTreeLocation getParent()
          Gets the parent location of this location.
 String toString()
           
 
Methods inherited from class bibliothek.gui.dock.common.location.AbstractStackholdingLocation
stack, stack
 
Methods inherited from class bibliothek.gui.dock.common.CLocation
base, base, equals, expandProperty, expandProperty, external, findProperty, hashCode, maximized, maximized, maximized, maximized, minimized, minimized, normalized, working
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeLocationLeaf

public TreeLocationLeaf(AbstractTreeLocation parent,
                        long leafId)
Creates a new leaf.

Parameters:
parent - the turn above this location
leafId - the unique identifier of the leaf represented by this location, can be -1
Method Detail

getParent

public AbstractTreeLocation getParent()
Description copied from class: CLocation
Gets the parent location of this location. Some root-locations may never have a parent.

Specified by:
getParent in class CLocation
Returns:
the parent location, can be null

getLeafId

public long getLeafId()
Gets the unique identifier of the leaf which is represented by this TreeLocationLeaf.

Returns:
the identifier or -1

findParentProperty

protected SplitDockPathProperty findParentProperty()

findProperty

public SplitDockPathProperty findProperty(DockableProperty successor)
Description copied from class: CLocation
Gets a path describing this location in terms of the DockingFrames.

Specified by:
findProperty in class CLocation
Parameters:
successor - the path of the elements above this location or null
Returns:
the path to this location or null, can also be successor

aside

public CLocation aside()
Description copied from class: CLocation
Returns a CLocation that describes the location of an element that should be inserted next to this location.

Specified by:
aside in class CLocation
Returns:
the new location

findRoot

public String findRoot()
Description copied from class: CLocation
Gets the name of the station this location belongs to. This can be the id of any CStation.

Specified by:
findRoot in class CLocation
Returns:
the name of the station or null if this location does not have enough information to find the root

toString

public String toString()
Overrides:
toString in class Object

findMode

public ExtendedMode findMode()
Description copied from class: CLocation
Gets the mode this location represents.

Specified by:
findMode in class CLocation
Returns:
the mode or null