|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.RelativeLocator
A locator that specfies a point that is relative to the bounds
of a Figure
. There are two double
values that
determine where the target Figure will be placed. These amounts
represent the percentage of the reference Figure's bounds the
target Figure should be displaced from the reference Figure's
top-left corner. The values 0.0 and 0.0 will result in the target
Figure being located at the reference Figure's top-left corner.
The values 1.0 and 1.0 will result in the target Figure being
located at the reference Figure's bottom-right corner.
Constructor Summary | |
RelativeLocator()
Creates a new RelativeLocator which will locate its target Figure in the top-left corner of the reference Figure (which must be set separately). |
|
RelativeLocator(IFigure reference,
double _relativeX,
double _relativeY)
Creates a new RelativeLocator with the given reference Figure that locates its target Figure based on _relativeX
and _relativeY . |
|
RelativeLocator(IFigure reference,
int location)
Creates a new RelativeLocator with the given reference Figure, that will locate its target figure based on location , which is one of the compass
directions defined in PositionConstants . |
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 given IFigure. |
void |
setReferenceFigure(IFigure reference)
Sets the Figure this locator should be relative to. |
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)
location
, which is one of the compass
directions defined in PositionConstants
.
public RelativeLocator(IFigure reference, double _relativeX, double _relativeY)
_relativeX
and _relativeY
.
Method Detail |
protected Rectangle getReferenceBox()
protected IFigure getReferenceFigure()
public void relocate(IFigure target)
Locator
relocate
in interface Locator
target
- The figure to relocatepublic void setReferenceFigure(IFigure reference)
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |