bibliothek.gui.dock.common.location
Class CBaseLocation

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.CBaseLocation

public class CBaseLocation
extends CRootLocation

A location based on a CContentArea.

Author:
Benjamin Sigg

Constructor Summary
CBaseLocation()
           
CBaseLocation(CContentArea center)
           
 
Method Summary
 CLocation aside()
          Returns a CLocation that describes the location of an element that should be inserted next to this location.
 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
 CContentArea getContentArea()
          Gets the contentarea to which this location relates.
 CMinimizedLocation minimalEast()
          Creates a location describing a minimized element at the right.
 CMinimizedLocation minimalEast(int index)
          Creates a location describing a minimized element at the right.
 CMinimizedLocation minimalNorth()
          Creates a location describing a minimized element at the top.
 CMinimizedLocation minimalNorth(int index)
          Creates a location describing a minimized element at the top.
 CMinimizedLocation minimalSouth()
          Creates a location describing a minimized element at the bottom.
 CMinimizedLocation minimalSouth(int index)
          Creates a location describing a minimized element at the bottom.
 CMinimizedLocation minimalWest()
          Creates a location describing a minimized element at the left.
 CMinimizedLocation minimalWest(int index)
          Creates a location describing a minimized element at the left.
 TreeLocationRoot normalEast(double size)
          Creates a location describing a normalized element at the east of the normalized-area.
 TreeLocationRoot normalNorth(double size)
          Creates a location describing a normalized element at the north of the normalized-area.
 CRectangleLocation normalRectangle(double x, double y, double width, double height)
          Creates a location describing a normalized element at a given location.
 TreeLocationRoot normalSouth(double size)
          Creates a location describing a normalized element at the south of the normalized-area.
 TreeLocationRoot normalWest(double size)
          Creates a location describing a normalized element at the west of the normalized-area.
 String toString()
           
 
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, wait, wait, wait
 

Constructor Detail

CBaseLocation

public CBaseLocation(CContentArea center)

CBaseLocation

public CBaseLocation()
Method Detail

getContentArea

public CContentArea getContentArea()
Gets the contentarea to which this location relates.

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

normalRectangle

public CRectangleLocation normalRectangle(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

normalNorth

public TreeLocationRoot normalNorth(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

normalSouth

public TreeLocationRoot normalSouth(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

normalEast

public TreeLocationRoot normalEast(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

normalWest

public TreeLocationRoot normalWest(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

minimalNorth

public CMinimizedLocation minimalNorth()
Creates a location describing a minimized element at the top.

Returns:
the new location

minimalNorth

public CMinimizedLocation minimalNorth(int index)
Creates a location describing a minimized element at the top.

Parameters:
index - the location in the list of minimized elements
Returns:
the new location

minimalSouth

public CMinimizedLocation minimalSouth()
Creates a location describing a minimized element at the bottom.

Returns:
the new location

minimalSouth

public CMinimizedLocation minimalSouth(int index)
Creates a location describing a minimized element at the bottom.

Parameters:
index - the location in the list of minimized elements
Returns:
the new location

minimalEast

public CMinimizedLocation minimalEast()
Creates a location describing a minimized element at the right.

Returns:
the new location

minimalEast

public CMinimizedLocation minimalEast(int index)
Creates a location describing a minimized element at the right.

Parameters:
index - the location in the list of minimized elements
Returns:
the new location

minimalWest

public CMinimizedLocation minimalWest()
Creates a location describing a minimized element at the left.

Returns:
the new location

minimalWest

public CMinimizedLocation minimalWest(int index)
Creates a location describing a minimized element at the left.

Parameters:
index - the location in the list of minimized elements
Returns:
the new location

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

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

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

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

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

toString

public String toString()
Overrides:
toString in class Object