bibliothek.gui.dock.common.location
Class CWorkingAreaLocation

java.lang.Object
  extended by bibliothek.gui.dock.common.CLocation
      extended by bibliothek.gui.dock.common.location.CRootLocation
          extended by bibliothek.gui.dock.common.location.CWorkingAreaLocation

public class CWorkingAreaLocation
extends CRootLocation

A location representing a CWorkingArea.

Author:
Benjamin Sigg

Constructor Summary
CWorkingAreaLocation(CWorkingArea area)
           
 
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 describing a normalized element at the east of the normalized-area.
 CDockable.ExtendedMode findMode()
          Gets the mode this location represents.
 DockableProperty 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.
 String findRootNormal()
          Gets the id of the root if this root is used as normalized-area
 CWorkingArea getWorkingArea()
          Gets the workingarea to which this location relates.
 TreeLocationRoot north(double size)
          Creates a location describing a normalized element at the north of the normalized-area.
 CRectangleLocation rectangle(double x, double y, double width, double height)
          Creates a location describing a normalized element at a given location.
 TreeLocationRoot south(double size)
          Creates a location describing a normalized element at the south of the normalized-area.
 TreeLocationRoot west(double size)
          Creates a location describing a normalized element at the west of the normalized-area.
 
Methods inherited from class bibliothek.gui.dock.common.CLocation
base, base, external, findProperty, maximized, working
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CWorkingAreaLocation

public CWorkingAreaLocation(CWorkingArea area)
Method Detail

getWorkingArea

public CWorkingArea getWorkingArea()
Gets the workingarea to which this location relates.

Returns:
the area or null if the default center is meant.

rectangle

public CRectangleLocation rectangle(double x,
                                    double y,
                                    double width,
                                    double height)
Creates a location describing a normalized element at a given location. Note that the normalized area is seen as a rectangle of size 1/1.

Parameters:
x - the x-coordinate, a value between 0 and 1
y - the y-coordinate, a value between 0 and 1
width - the width, x + width should be less or equal to 1
height - the height, y + height should be less or equal to 1
Returns:
the new location

north

public TreeLocationRoot north(double size)
Creates a location describing a normalized element at the north of the normalized-area.

Parameters:
size - the relative size of the element, a value between 0 (no space) and 1 (all space).
Returns:
the new location

south

public TreeLocationRoot south(double size)
Creates a location describing a normalized element at the south of the normalized-area.

Parameters:
size - the relative size of the element, a value between 0 (no space) and 1 (all space).
Returns:
the new location

east

public TreeLocationRoot east(double size)
Creates a location describing a normalized element at the east of the normalized-area.

Parameters:
size - the relative size of the element, a value between 0 (no space) and 1 (all space).
Returns:
the new location

west

public TreeLocationRoot west(double size)
Creates a location describing a normalized element at the west of the normalized-area.

Parameters:
size - the relative size of the element, a value between 0 (no space) and 1 (all space).
Returns:
the new location

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

findRootNormal

public String findRootNormal()
Description copied from class: CRootLocation
Gets the id of the root if this root is used as normalized-area

Specified by:
findRootNormal in class CRootLocation
Returns:
the id of the root

findMode

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

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

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

findRoot

public String findRoot()
Description copied from class: CLocation
Gets the name of the station this location belongs to.

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