|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.rolemodelsoft.drawlet.basics.AbstractLocator
|
+--com.rolemodelsoft.drawlet.basics.RelativePoint
This class implements RelativeLocator and MovableLocator by providing movable x and y offsets to some base locator.
| Field Summary | |
protected Locator |
base
The locator to which this is relative. |
protected int |
offsetX
The x offset from the base locator. |
protected int |
offsetY
The y offset from the base locator. |
| Constructor Summary | |
RelativePoint(Locator base,
int x,
int y)
Constructs and initializes a RelativePoint with the specified parameters. |
|
| Method Summary | |
protected int |
defaultOffsetX()
Answer the default/initial value of offsetX. |
protected int |
defaultOffsetY()
Answer the default/initial value of offsetY. |
java.lang.Object |
duplicate()
Duplicates the receiver. |
java.lang.Object |
duplicateIn(java.util.Hashtable duplicates)
Duplicates the receiver in the given Hashtable. |
Locator |
getBase()
Answer the base concrete locator of the receiver. |
void |
move(int x,
int y)
Moves the receiver to the x and y coordinates |
void |
postDuplicate(java.util.Hashtable duplicates)
After a series of Objects are duplicated, this can be sent to each of the duplicates to resolve any changes it might like to reconcile. |
void |
translate(int x,
int y)
Moves the receiver in the x and y direction. |
int |
x()
Answer the x coordinate. |
void |
x(int x)
Set the x coordinate. |
int |
y()
Answer the y coordinate. |
void |
y(int y)
Set the y coordinate. |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractLocator |
r,
theta,
toString |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected Locator base
protected int offsetX
protected int offsetY
| Constructor Detail |
public RelativePoint(Locator base,
int x,
int y)
base - the Locator to which the constructed point is relative.x - the x coordinate of the offsety - the y coordinate of the offset| Method Detail |
protected int defaultOffsetX()
protected int defaultOffsetY()
public java.lang.Object duplicate()
public java.lang.Object duplicateIn(java.util.Hashtable duplicates)
Hashtable.duplicates - the Hashtable to put the new duplicate inpublic Locator getBase()
public void move(int x,
int y)
x - the new x coordinatey - the new x coordinatepublic void postDuplicate(java.util.Hashtable duplicates)
duplicates - a Hashtable where originals as keys and duplicates as elements
public void translate(int x,
int y)
x - amount to move in the x directiony - amount to move in the y directionpublic int x()
public void x(int x)
x - its new desired x coordinate.public int y()
public void y(int y)
y - its new desired y coordinate.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||