public abstract class Manipulator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DiagramItem |
item |
Constructor and Description |
---|
Manipulator(DiagramItem item) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Called when the manipulator should cancel the current manipulation.
|
boolean |
drawsInLocalCoordinates()
Returns whether the manipulator object draws in local or global coordinates.
|
DiagramItem |
getItem() |
boolean |
needsPointerMessages(java.awt.geom.Point2D point)
Returns whether the manipulator object needs to track mouse events.
|
void |
onGotFocus()
Called when the manipulator receives input focus.
|
void |
onLostFocus()
Called when the manipulator loses the input focus.
|
void |
onPointerDown(java.awt.geom.Point2D mousePosition)
Called when the left mouse button is pressed while the pointer is over this manipulator.
|
void |
onPointerMove(java.awt.geom.Point2D mousePosition)
Called when the mouse is moved while this manipulator tracks the mouse events.
|
void |
onPointerUp(java.awt.geom.Point2D mousePosition)
Called when the left mouse button is released while this manipulator tracks the mouse events.
|
CursorHint |
setMouseCursor(java.awt.geom.Point2D mousePosition) |
protected DiagramItem item
public Manipulator(DiagramItem item)
public DiagramItem getItem()
public boolean needsPointerMessages(java.awt.geom.Point2D point)
point
- public CursorHint setMouseCursor(java.awt.geom.Point2D mousePosition)
public boolean drawsInLocalCoordinates()
public void onPointerDown(java.awt.geom.Point2D mousePosition)
mousePosition
- A Point2D instance that specifies the current mouse position.public void onPointerMove(java.awt.geom.Point2D mousePosition)
mousePosition
- A Point2D instance that specifies the current mouse position.public void onPointerUp(java.awt.geom.Point2D mousePosition)
mousePosition
- A Point2D instance that specifies the current mouse position.public void onGotFocus()
public void onLostFocus()
public void cancel()