public class MoveHandle extends LocatorHandle
listenerList, view| Constructor and Description |
|---|
MoveHandle(Figure owner,
Locator locator)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addMoveHandles(Figure f,
java.util.Collection<Handle> handles)
Creates handles for each corner of a
figure and adds them to the provided collection.
|
void |
draw(java.awt.Graphics2D g)
Draws this handle.
|
static Handle |
east(Figure owner) |
java.awt.Cursor |
getCursor()
Returns a cursor for the handle.
|
void |
keyPressed(java.awt.event.KeyEvent evt) |
static Handle |
north(Figure owner) |
static Handle |
northEast(Figure owner) |
static Handle |
northWest(Figure owner) |
static Handle |
south(Figure owner) |
static Handle |
southEast(Figure owner) |
static Handle |
southWest(Figure owner) |
void |
trackEnd(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
Tracks the end of the interaction.
|
void |
trackStart(java.awt.Point anchor,
int modifiersEx)
Tracks the start of the interaction.
|
void |
trackStep(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
Tracks a step of the interaction.
|
static Handle |
west(Figure owner) |
basicGetBounds, getLocation, getLocationOnDrawingaddHandleListener, areaInvalidated, attributeChanged, contains, createSecondaryHandles, dispose, drawCircle, drawDiamond, drawRectangle, figureAdded, figureChanged, figureHandlesChanged, figureRemoved, figureRequestRemove, fireAreaInvalidated, fireHandleRequestRemove, fireHandleRequestSecondaryHandles, fireUndoableEditHappened, getBounds, getDrawingArea, getEditor, getHandlesize, getOwner, getToolTipText, getView, invalidate, isCombinableWith, keyReleased, keyTyped, removeHandleListener, setToolTipText, setView, trackDoubleClick, updateBounds, viewTransformChangedpublic static void addMoveHandles(Figure f, java.util.Collection<Handle> handles)
public void draw(java.awt.Graphics2D g)
If the figure is transformable, the handle is drawn as a filled rectangle. If the figure is not transformable, the handle is drawn as an unfilled rectangle.
draw in interface Handledraw in class AbstractHandlepublic java.awt.Cursor getCursor()
getCursor in interface HandlegetCursor in class AbstractHandlepublic void trackStart(java.awt.Point anchor,
int modifiersEx)
Handleanchor - the position where the interaction startedpublic void trackStep(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
Handleanchor - the position where the interaction startedlead - the current positionpublic void trackEnd(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
Handleanchor - the position where the interaction startedlead - the current positionpublic void keyPressed(java.awt.event.KeyEvent evt)
keyPressed in interface java.awt.event.KeyListenerkeyPressed in class AbstractHandle