|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectalgoanim.util.Node
algoanim.util.Offset
public class Offset
This is a concrete kind of a Node. The coordinates are
measured from a given offset Primitive.
For example, to place an element 20 pixels to the right and 10 pixels
below the lower west point of object a, you would use the following:
Node n = new Offset(20, 10, a, "SW");
| Field Summary | |
|---|---|
static int |
ID_REFERENCE
Constant for an offset based on an identifier |
static int |
NODE_REFERENCE
Constant for an offset based on a node |
static int |
PRIMITIVE_REFERENCE
Constant for an offset based on a primitive |
| Constructor Summary | |
|---|---|
Offset(int xCoordinate,
int yCoordinate,
Node baseNode,
java.lang.String targetDirection)
Creates a new Offset instance at a distance of (xCoordinate, yCoordinate) in direction "targetDirection" from the base Node "baseNode". |
|
Offset(int xCoordinate,
int yCoordinate,
Primitive reference,
java.lang.String targetDirection)
Creates a new Offset instance at a distance of (xCoordinate, yCoordinate) in direction "targetDirection" from the base primitive "reference". |
|
Offset(int xCoordinate,
int yCoordinate,
java.lang.String baseIDRef,
java.lang.String targetDirection)
Creates a new Offset instance at a distance of (xCoordinate, yCoordinate) in direction "targetDirection" from the base reference ID "baseIDRef". |
|
| Method Summary | |
|---|---|
java.lang.String |
getBaseID()
Returns the reference. |
java.lang.String |
getDirection()
Returns the direction. |
Node |
getNode()
Returns the reference. |
Primitive |
getRef()
Returns the reference. |
int |
getReferenceMode()
Returns the reference mode |
int |
getX()
Returns the x-axis offset. |
int |
getY()
Returns the y-axis offset. |
| Methods inherited from class algoanim.util.Node |
|---|
convertToNode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PRIMITIVE_REFERENCE
public static final int NODE_REFERENCE
public static final int ID_REFERENCE
| Constructor Detail |
|---|
public Offset(int xCoordinate,
int yCoordinate,
Primitive reference,
java.lang.String targetDirection)
xCoordinate - the x-axis offset.yCoordinate - the y-axis offset.reference - the referenced PrimitivetargetDirection - the relative placement of this Node seen from the
reference.
public Offset(int xCoordinate,
int yCoordinate,
Node baseNode,
java.lang.String targetDirection)
xCoordinate - the x-axis offset.yCoordinate - the y-axis offset.baseNode - the referenced NodetargetDirection - the relative placement of this Node seen from the
reference.
public Offset(int xCoordinate,
int yCoordinate,
java.lang.String baseIDRef,
java.lang.String targetDirection)
xCoordinate - the x-axis offset.yCoordinate - the y-axis offset.baseIDRef - the referenced identifiertargetDirection - the relative placement of this Node seen from the
reference.| Method Detail |
|---|
public java.lang.String getBaseID()
public java.lang.String getDirection()
public Node getNode()
public Primitive getRef()
public int getReferenceMode()
public int getX()
public int getY()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||