|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.RelativeLocator
Places a handle relative to a figure's bounds. The placement is determined by indicating the figure to which the placement is relative, and two floating-point value indicating the horizontal and vertical offset from that figure's top-left corner. The values (0.0, 0.0) would indicate the figure's top-left corner, while the values (1.0, 1.0) would indicate the figure's bottom-right corner.
Constants such as NORTH and SOUTH can be used to set the placement.
| Constructor Summary | |
RelativeLocator()
Null constructor. |
|
RelativeLocator(IFigure reference,
double relativeX,
double relativeY)
Constructs a RelativeLocator with the given reference Figure and offset ratios. |
|
RelativeLocator(IFigure reference,
int location)
Constructs a RelativeLocator with the given reference figure and relative location. |
|
| Method Summary | |
protected Rectangle |
getReferenceBox()
Returns the Reference Box in the Reference Figure's coordinate system. |
protected IFigure |
getReferenceFigure()
Returns the Figure this locator is relative to. |
void |
relocate(IFigure target)
Relocates the target using the relative offset locations. |
void |
setReferenceFigure(IFigure reference)
Sets the reference figure this locator uses to place the target figure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RelativeLocator()
public RelativeLocator(IFigure reference,
int location)
PositionConstants used as a convenient and readable
way to set both the relativeX and relativeY values.
reference - the reference figurelocation - one of NORTH, NORTH_EAST, etc.
public RelativeLocator(IFigure reference,
double relativeX,
double relativeY)
reference - the reference figurerelativeX - the relative X offsetrelativeY - the relative Y offset| Method Detail |
protected Rectangle getReferenceBox()
protected IFigure getReferenceFigure()
public void relocate(IFigure target)
relocate in interface Locatortarget - The figure to relocateLocator.relocate(org.eclipse.draw2d.IFigure)public void setReferenceFigure(IFigure reference)
reference - the reference figure
|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||