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, getLocationOnDrawing
addHandleListener, 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, viewTransformChanged
public 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 Handle
draw
in class AbstractHandle
public java.awt.Cursor getCursor()
getCursor
in interface Handle
getCursor
in class AbstractHandle
public void trackStart(java.awt.Point anchor, int modifiersEx)
Handle
anchor
- the position where the interaction startedpublic void trackStep(java.awt.Point anchor, java.awt.Point lead, int modifiersEx)
Handle
anchor
- the position where the interaction startedlead
- the current positionpublic void trackEnd(java.awt.Point anchor, java.awt.Point lead, int modifiersEx)
Handle
anchor
- the position where the interaction startedlead
- the current positionpublic void keyPressed(java.awt.event.KeyEvent evt)
keyPressed
in interface java.awt.event.KeyListener
keyPressed
in class AbstractHandle