bibliothek.gui.dock.common.location
Class CSplitLocation

java.lang.Object
  extended by bibliothek.gui.dock.common.CLocation
      extended by bibliothek.gui.dock.common.location.CSplitLocation
Direct Known Subclasses:
CContentAreaCenterLocation, CGridAreaLocation, CWorkingAreaLocation

public class CSplitLocation
extends CLocation

This location is used to describe a SplitDockStation.

Author:
Benjamin Sigg

Constructor Summary
CSplitLocation()
          Creates a new location
CSplitLocation(CLocation parent)
          Creates a new location
 
Method Summary
 CLocation aside()
          Returns a CLocation that describes the location of an element that should be inserted next to this location.
 TreeLocationRoot east(double size)
          Creates a location that describes a space in the right part of the SplitDockStation.
 TreeLocationRoot east(double size, long nodeId)
          Creates a location that describes a space in the right part of the SplitDockStation.
 ExtendedMode findMode()
          Gets the mode this location represents.
 DockableProperty findProperty(DockableProperty successor)
          Gets a path describing this location in terms of the DockingFrames.
 java.lang.String findRoot()
          Gets the name of the station this location belongs to.
 CLocation getParent()
          Gets the parent location of this location.
 TreeLocationRoot north(double size)
          Creates a location that describes a space in the upper part of the SplitDockStation.
 TreeLocationRoot north(double size, long nodeId)
          Creates a location that describes a space in the upper part of the SplitDockStation.
 CRectangleLocation rectangle(double x, double y, double width, double height)
          Creates a location which occupies a sub-rectangle of the SplitDockStation which is described by this location.
 TreeLocationRoot south(double size)
          Creates a location that describes a space in the lower part of the SplitDockStation.
 TreeLocationRoot south(double size, long nodeId)
          Creates a location that describes a space in the lower part of the SplitDockStation.
 CStackLocation stack()
          Creates a new location which represents a position in a stack that covers the whole SplitDockStation.
 CStackLocation stack(int index)
          Creates a new location which represents a position in a stack that covers the whole SplitDockStation.
 java.lang.String toString()
           
 TreeLocationRoot west(double size)
          Creates a location that describes a space in the left part of the SplitDockStation.
 TreeLocationRoot west(double size, long nodeId)
          Creates a location that describes a space in the left part of the SplitDockStation.
 
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

CSplitLocation

public CSplitLocation()
Creates a new location


CSplitLocation

public CSplitLocation(CLocation parent)
Creates a new location

Parameters:
parent - the parent location, can be null
Method Detail

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

getParent

public CLocation 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

rectangle

public CRectangleLocation rectangle(double x,
                                    double y,
                                    double width,
                                    double height)
Creates a location which occupies a sub-rectangle of the SplitDockStation which is described by this location. All arguments of this method must be between 0 and 1, and x+width and y+height should be smaller or equal to 1.

Parameters:
x - the relative x coordinate
y - the relative y coordinate
width - the relative width
height - the relative height
Returns:
the location describing a rectangle

stack

public CStackLocation stack()
Creates a new location which represents a position in a stack that covers the whole SplitDockStation.

Returns:
the new location

stack

public CStackLocation stack(int index)
Creates a new location which represents a position in a stack that covers the whole SplitDockStation.

Parameters:
index - the index within the stack
Returns:
the new location

north

public TreeLocationRoot north(double size)
Creates a location that describes a space in the upper part of the SplitDockStation.

Parameters:
size - the size of the space, between 0 and 1
Returns:
the new location

north

public TreeLocationRoot north(double size,
                              long nodeId)
Creates a location that describes a space in the upper part of the SplitDockStation.

Parameters:
size - the size of the space, between 0 and 1
nodeId - the unique identifier of the new node, can be -1
Returns:
the new location

south

public TreeLocationRoot south(double size)
Creates a location that describes a space in the lower part of the SplitDockStation.

Parameters:
size - the size of the space, between 0 and 1
Returns:
the new location

south

public TreeLocationRoot south(double size,
                              long nodeId)
Creates a location that describes a space in the lower part of the SplitDockStation.

Parameters:
size - the size of the space, between 0 and 1
nodeId - the unique identifier of the new node, can be -1
Returns:
the new location

east

public TreeLocationRoot east(double size)
Creates a location that describes a space in the right part of the SplitDockStation.

Parameters:
size - the size of the space, between 0 and 1
Returns:
the new location

east

public TreeLocationRoot east(double size,
                             long nodeId)
Creates a location that describes a space in the right part of the SplitDockStation.

Parameters:
size - the size of the space, between 0 and 1
nodeId - the unique identifier of the new node, can be -1
Returns:
the new location

west

public TreeLocationRoot west(double size)
Creates a location that describes a space in the left part of the SplitDockStation.

Parameters:
size - the size of the space, between 0 and 1
Returns:
the new location

west

public TreeLocationRoot west(double size,
                             long nodeId)
Creates a location that describes a space in the left part of the SplitDockStation.

Parameters:
size - the size of the space, between 0 and 1
nodeId - the unique identifier of the new node, can be -1
Returns:
the new location

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

findRoot

public java.lang.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

findProperty

public DockableProperty 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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object