|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.dock.Position
public class Position
This class describes the positions of dockables in LeafDock
s
and the positions of child docks in CompositeDock
s.
A position has a number of dimensions. For each dimension there is an integer that specifies the position in that dimension.
In many cases the positions are one-dimensional, but some docks like FloatDock
have 3-dimensional positions for their child docks:
This class describes also the integer constants for special positions of dockables or docks in other docks. The possible positions are:
Field Summary | |
---|---|
static int |
BOTTOM
A dock or dockable at the bottom of a dock. |
static int |
CENTER
A dock or dockable at the center of a dock. |
static int |
LEFT
A dock or dockable at the left side of a dock. |
static int |
RIGHT
A dock or dockable at the right side of a dock. |
static int |
TOP
A dock or dockable at the top of a dock. |
Constructor Summary | |
---|---|
Position()
Creates a position with 0 dimensions. |
|
Position(int position)
Creates a position with 1 dimension. |
|
Position(int[] positions)
Creates a position with the given integers. |
|
Position(int positionX,
int positionY)
Creates a position with 2 dimensions. |
|
Position(int positionX,
int positionY,
int positionZ)
Creates a position with 3 dimensions. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object object)
|
int |
getDimensions()
Gets the number of dimensions of this position. |
int |
getPosition(int dimension)
Gets the position integer for the given dimension. |
static Position |
getPositionProperty(java.util.Properties properties,
java.lang.String name,
Position defaultValue)
Gets the position property with the given name. |
int |
hashCode()
|
static void |
setPositionProperty(java.util.Properties properties,
java.lang.String name,
Position value)
Adds the position property with the given name and value to the given properties. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CENTER
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
Constructor Detail |
---|
public Position()
public Position(int position)
position
- The position in the only dimension.public Position(int positionX, int positionY)
positionX
- The position in the first dimension.positionY
- The position in the second dimension.public Position(int positionX, int positionY, int positionZ)
positionX
- The position in the first dimension.positionY
- The position in the second dimension.positionZ
- The position in the third dimension.public Position(int[] positions)
positions
- The positions in the different dimensions.Method Detail |
---|
public int getDimensions()
public int getPosition(int dimension)
dimension
- The dimension for which the position is retrieved.
java.lang.IllegalArgumentException
- If the given dimension is < 0 or >= getDimensions().public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static Position getPositionProperty(java.util.Properties properties, java.lang.String name, Position defaultValue)
properties
- The given properties where the property is searched.name
- The name of the property.defaultValue
- The default value of the property.
public static void setPositionProperty(java.util.Properties properties, java.lang.String name, Position value)
properties
- The given properties to which the property is added.name
- The name of the property.value
- The default value of the property.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |