public class BoardActionTool extends AbstractTool
editor, fAnchorX, fAnchorY
Constructor and Description |
---|
BoardActionTool(DrawingEditor editor)
Construct the tool.
|
Modifier and Type | Method and Description |
---|---|
void |
mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse down events in the drawing view.
|
void |
mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse drag events in the drawing view (while mouse button is down).
|
void |
mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse up in the drawing view.
|
editor, keyDown, mouseMove
public BoardActionTool(DrawingEditor editor)
editor
- drawing editor to be associated with.public void mouseDown(java.awt.event.MouseEvent e, int x, int y)
Tool
mouseDown
in interface Tool
mouseDown
in class AbstractTool
e
- the original mouse event from AWTx
- the x coordinate of the mouse cursory
- the y coordinate of the mouse cursorpublic void mouseDrag(java.awt.event.MouseEvent e, int x, int y)
Tool
mouseDrag
in interface Tool
mouseDrag
in class AbstractTool
e
- the original mouse event from AWTx
- the x coordinate of the mouse cursory
- the y coordinate of the mouse cursorpublic void mouseUp(java.awt.event.MouseEvent e, int x, int y)
Tool
mouseUp
in interface Tool
mouseUp
in class AbstractTool
e
- the original mouse event from AWTx
- the x coordinate of the mouse cursory
- the y coordinate of the mouse cursorFrom the book: Flexible, Reliable Software, © CRC Press 2010. Author: Henrik B. Christensen, Aarhus University, Denmark