bibliothek.gui.dock.common.location
Class CExternalizedLocation

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.CExternalizedLocation
Direct Known Subclasses:
CMaximalExternalizedLocation

public class CExternalizedLocation
extends AbstractStackholdingLocation

A location representing an externalized element.

Author:
Benjamin Sigg

Field Summary
static CLocation STATION
          A location describing the externalize station with the id CControl.EXTERNALIZED_STATION_ID.
 
Constructor Summary
CExternalizedLocation(CLocation parent, int x, int y, int width, int height)
          Creates a new location.
CExternalizedLocation(int x, int y, int width, int height)
          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.
 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.
 int getHeight()
          Gets the height of the element.
 CLocation getParent()
          Gets the parent location, if there is any.
 int getWidth()
          Gets the width of the element.
 int getX()
          Gets the left end of the element.
 int getY()
          Gets the top end of the element.
 CMaximalExternalizedLocation maximize()
          Returns a location describing an element with the coordinates of this location but that was maximized.
 java.lang.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
 

Field Detail

STATION

public static final CLocation STATION
A location describing the externalize station with the id CControl.EXTERNALIZED_STATION_ID.

Constructor Detail

CExternalizedLocation

public CExternalizedLocation(int x,
                             int y,
                             int width,
                             int height)
Creates a new location.

Parameters:
x - the x-coordinate in pixel
y - the y-coordinate in pixel
width - the width in pixel
height - the height in pixel

CExternalizedLocation

public CExternalizedLocation(CLocation parent,
                             int x,
                             int y,
                             int width,
                             int height)
Creates a new location.

Parameters:
parent - the parent location, can be null
x - the x-coordinate in pixel
y - the y-coordinate in pixel
width - the width in pixel
height - the height in pixel
Method Detail

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

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

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

maximize

public CMaximalExternalizedLocation maximize()
Returns a location describing an element with the coordinates of this location but that was maximized.

Returns:
the maximized version of this 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

toString

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

getParent

public CLocation getParent()
Gets the parent location, if there is any.

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

getX

public int getX()
Gets the left end of the element.

Returns:
the x coordinate

getY

public int getY()
Gets the top end of the element.

Returns:
the y coordinate

getWidth

public int getWidth()
Gets the width of the element.

Returns:
the width

getHeight

public int getHeight()
Gets the height of the element.

Returns:
the height