Package org.eclipse.gef.handles
Class MoveHandleLocator
java.lang.Object
org.eclipse.gef.handles.MoveHandleLocator
- All Implemented Interfaces:
org.eclipse.draw2d.Locator
A Locator used to place
MoveHandle
s. By default, a MoveHandle's
bounds are equal to its owner figure's bounds, expanded by the handle's
Insets
.-
Constructor Summary
ConstructorsConstructorDescriptionMoveHandleLocator
(org.eclipse.draw2d.IFigure ref) Creates a new MoveHandleLocator and sets its reference figure toref
. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.draw2d.IFigure
Returns the reference figure for this locator.void
relocate
(org.eclipse.draw2d.IFigure target) Sets the handle's bounds to that of its owner figure's bounds, expanded by the handle's Insets.void
setReference
(org.eclipse.draw2d.IFigure follow) Sets the reference figure.
-
Constructor Details
-
MoveHandleLocator
public MoveHandleLocator(org.eclipse.draw2d.IFigure ref) Creates a new MoveHandleLocator and sets its reference figure toref
. The reference figure should be the handle's owner figure.- Parameters:
ref
- the handle's owner
-
-
Method Details
-
getReference
protected org.eclipse.draw2d.IFigure getReference()Returns the reference figure for this locator.- Returns:
- the handle's owner
-
relocate
public void relocate(org.eclipse.draw2d.IFigure target) Sets the handle's bounds to that of its owner figure's bounds, expanded by the handle's Insets.- Specified by:
relocate
in interfaceorg.eclipse.draw2d.Locator
- Parameters:
target
- The IFigure to relocate
-
setReference
public void setReference(org.eclipse.draw2d.IFigure follow) Sets the reference figure.- Parameters:
follow
- the reference figure, should be the handle's owner figure
-