|
Eclipse Draw2d 3.0.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.AbstractLocator
Repositions a Figure attached to a Connection when the Connection is moved.
| Constructor Summary | |
AbstractLocator()
Creates a new AbstractLocator. |
|
| Method Summary | |
int |
getGap()
Returns the number of pixels the figure's bounding rectangle is from the connection. |
protected Rectangle |
getNewBounds(Dimension size,
Point center)
Recalculate the location of the figure according to its desired position relative to the center point. |
protected abstract Point |
getReferencePoint()
Returns a reference point used to calculate the location. |
int |
getRelativePosition()
Returns the position of the figure with respect to the center point. |
void |
relocate(IFigure target)
Recalculates the position of the figure and returns the updated bounds. |
void |
setGap(int i)
Sets the number of pixels the figure's bounding rectangle is from the connection. |
void |
setRelativePosition(int pos)
Sets the position of the figure with respect to the center point. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractLocator()
| Method Detail |
public int getGap()
getRelativePosition() returns something other than
PositionConstants.CENTER.
protected abstract Point getReferencePoint()
protected Rectangle getNewBounds(Dimension size,
Point center)
size - The size of the figurecenter - The center point
public int getRelativePosition()
PositionConstants and include CENTER, NORTH, SOUTH, EAST, WEST,
NORTH_EAST, NORTH_WEST, SOUTH_EAST, or SOUTH_WEST.
public void relocate(IFigure target)
relocate in interface Locatortarget - The figure to relocatepublic void setGap(int i)
PositionConstants.CENTER.
i - The gappublic void setRelativePosition(int pos)
PositionConstants and include CENTER, NORTH, SOUTH, EAST, WEST,
NORTH_EAST, NORTH_WEST, SOUTH_EAST, or SOUTH_WEST.
pos - The relative position
|
Eclipse Draw2d 3.0.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||