|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.common.CLocation
public abstract class CLocation
A class describing the location of a CDockable
. CLocation
s
are combined, and a whole path of CLocation
s describes an actual
location. Some examples how to create a path of locations:
// an externalized element CLocation location = CLocation.external( 20, 20, 400, 300 ); // a minimized element at the left side of the default panel CLocation location = CLocation.base().minimalWest(); // an element in the lower right corner on a stack (tapped pane): CLocation location = CLocation.base().normalSouth( 0.5 ).east( 0.5 ).stack( 2 ); // an element in the middle on a specific CContentArea CContentArea area = ... CLocation location = CLocation.base( area ).normalRectangle( 0.25, 0.25, 0.5, 0.5 );Two
CLocation
s are to be considered equal if findRoot()
, findMode()
and
findProperty()
return the same value.
Constructor Summary | |
---|---|
CLocation()
|
Method Summary | |
---|---|
abstract CLocation |
aside()
Returns a CLocation that describes the location of an element
that should be inserted next to this location. |
static CBaseLocation |
base()
Creates a new location that tells all children to use the default center. |
static CBaseLocation |
base(CContentArea center)
Creates a new location that tells all children to use a station defined on center . |
boolean |
equals(java.lang.Object obj)
|
CLocation |
expandProperty(DockableProperty property)
Tries to create a location that resembles property . |
CLocation |
expandProperty(DockableProperty property,
CLocationExpandStrategy strategy)
Tries to create a location that resembles property . |
static CExternalizedLocation |
external(int x,
int y,
int width,
int height)
Creates a new location representing the externalized mode. |
abstract ExtendedMode |
findMode()
Gets the mode this location represents. |
DockableProperty |
findProperty()
Gets a path describing this location in terms of the DockingFrames. |
abstract DockableProperty |
findProperty(DockableProperty successor)
Gets a path describing this location in terms of the DockingFrames. |
abstract java.lang.String |
findRoot()
Gets the name of the station this location belongs to. |
abstract CLocation |
getParent()
Gets the parent location of this location. |
int |
hashCode()
|
static CMaximizedLocation |
maximized()
Creates a location representing the maximized mode. |
static CMaximizedLocation |
maximized(CContentArea area)
Creates a location representing the maximized mode on area . |
static CMaximizedLocation |
maximized(CGridArea area)
Creates a location representing the maximized mode on area . |
static CMaximalExternalizedLocation |
maximized(int x,
int y,
int width,
int height)
Creates a location representing an element that is externalized and maximized. |
static CMinimizeAreaLocation |
minimized(CMinimizeArea area)
Creates a new location representing a minimize area. |
static CFlapIndexLocation |
minimized(CMinimizeArea area,
int index)
Creates a new location representing a minimize area. |
static CGridAreaLocation |
normalized(CGridArea area)
Creates a new location representing a grid area. |
static CWorkingAreaLocation |
working(CWorkingArea area)
Creates a new location representing the given CWorkingArea . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CLocation()
Method Detail |
---|
public static CBaseLocation base(CContentArea center)
center
.
center
- the base of all new locations, can be null
center
public static CBaseLocation base()
public static CWorkingAreaLocation working(CWorkingArea area)
CWorkingArea
.
area
- an area
area
public static CMinimizeAreaLocation minimized(CMinimizeArea area)
area
- the area to which the location refers
public static CFlapIndexLocation minimized(CMinimizeArea area, int index)
area
- the area to which the location refersindex
- the exact location on area
public static CGridAreaLocation normalized(CGridArea area)
area
- the area that is represented
public static CExternalizedLocation external(int x, int y, int width, int height)
x
- the x-coordinate in pixelsy
- the y-coordinate in pixelswidth
- the width in pixelsheight
- the height in pixels
public static CMaximizedLocation maximized()
public static CMaximizedLocation maximized(CGridArea area)
area
. It is the clients
responsibility to ensure that area
actually allows maximization.
area
- the area on which an element will be maximized
public static CMaximizedLocation maximized(CContentArea area)
area
. It is the clients
responsibility to ensure that area
actually allows maximization.
area
- the area on which an element will be maximized
public static CMaximalExternalizedLocation maximized(int x, int y, int width, int height)
CDockable
is no longer maximized.
x
- the x-coordinate in pixelsy
- the y-coordinate in pixelswidth
- the width in pixelsheight
- the height in pixels
public abstract CLocation getParent()
null
public abstract java.lang.String findRoot()
CStation
.
null
if this location
does not have enough information to find the rootpublic abstract ExtendedMode findMode()
null
public DockableProperty findProperty()
null
public abstract DockableProperty findProperty(DockableProperty successor)
successor
- the path of the elements above this location or null
null
, can also be successor
public final CLocation expandProperty(DockableProperty property)
property
.
property
- some location
findProperty()
would create
property
again, or null
in case that property
can't be usedpublic CLocation expandProperty(DockableProperty property, CLocationExpandStrategy strategy)
property
.
property
- some locationstrategy
- a strategy helping to convert the properties
findProperty()
would create
property
again, or null
in case that property
can't be usedpublic abstract CLocation aside()
CLocation
that describes the location of an element
that should be inserted next to this location.
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |