public class ShapeMoveTool extends AbstractTool
| Modifier and Type | Field and Description |
|---|---|
protected Cursor |
cursor
Cursor
|
protected Shape |
movedShape |
protected boolean |
moving |
protected Cursor |
prevCursor
Previous Cursor
|
protected Shape |
shape |
protected int |
startX |
protected int |
startY |
protected Stroke |
stroke |
protected int |
tx |
protected int |
ty |
canvas, enabled, listenerList| Constructor and Description |
|---|
ShapeMoveTool()
Creates a new instance of ShapeMoveTool
|
| Modifier and Type | Method and Description |
|---|---|
void |
endTool()
Overidden to unregister input listener.
|
Shape |
getShape() |
void |
mouseDragged(MouseEvent evt) |
void |
mouseMoved(MouseEvent evt) |
void |
mousePressed(MouseEvent evt) |
void |
mouseReleased(MouseEvent evt) |
void |
paint(Graphics2D g2d)
this methods do nothing
|
protected void |
reset()
reset all the variable
|
void |
setShape(Shape shape) |
addToolListener, fireStateChanged, isEnabled, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, registerInputListener, removeToolListener, setEnabled, startTool, unregisterInputListenerprotected Cursor cursor
protected Cursor prevCursor
protected boolean moving
protected int startX
protected int startY
protected int tx
protected int ty
protected Shape shape
protected Shape movedShape
protected Stroke stroke
public void endTool()
endTool in interface FXToolendTool in class AbstractToolprotected void reset()
public void setShape(Shape shape)
public Shape getShape()
public void paint(Graphics2D g2d)
AbstractToolpaint in interface FXToolpaint in class AbstractToolg2d - Graphics2Dpublic void mouseMoved(MouseEvent evt)
mouseMoved in interface MouseMotionListenermouseMoved in class AbstractToolpublic void mousePressed(MouseEvent evt)
mousePressed in interface MouseListenermousePressed in class AbstractToolpublic void mouseDragged(MouseEvent evt)
mouseDragged in interface MouseMotionListenermouseDragged in class AbstractToolpublic void mouseReleased(MouseEvent evt)
mouseReleased in interface MouseListenermouseReleased in class AbstractTool