All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.standard.AbstractTool
java.lang.Object
|
+----CH.ifa.draw.standard.AbstractTool
- public class AbstractTool
- extends Object
- implements Tool
Default implementation support for Tools.
- See Also:
- DrawingView, Tool
-
fAnchorX
- The position of the initial mouse down.
-
fAnchorY
- The position of the initial mouse down.
-
fView
-
-
AbstractTool(DrawingView)
- Constructs a tool for the given view.
-
activate()
- Activates the tool for the given view.
-
deactivate()
- Deactivates the tool.
-
drawing()
- Gets the tool's drawing.
-
editor()
- Gets the tool's editor.
-
keyDown(KeyEvent, int)
- Handles key down events in the drawing view.
-
mouseDown(MouseEvent, int, int)
- Handles mouse down events in the drawing view.
-
mouseDrag(MouseEvent, int, int)
- Handles mouse drag events in the drawing view.
-
mouseMove(MouseEvent, int, int)
- Handles mouse moves (if the mouse button is up).
-
mouseUp(MouseEvent, int, int)
- Handles mouse up in the drawing view.
-
view()
- Gets the tool's view.
fView
protected DrawingView fView
fAnchorX
protected int fAnchorX
- The position of the initial mouse down.
fAnchorY
protected int fAnchorY
- The position of the initial mouse down.
AbstractTool
public AbstractTool(DrawingView itsView)
- Constructs a tool for the given view.
activate
public void activate()
- Activates the tool for the given view. This method is called
whenever the user switches to this tool. Use this method to
reinitialize a tool.
deactivate
public void deactivate()
- Deactivates the tool. This method is called whenever the user
switches to another tool. Use this method to do some clean-up
when the tool is switched. Subclassers should always call
super.deactivate.
mouseDown
public void mouseDown(MouseEvent e,
int x,
int y)
- Handles mouse down events in the drawing view.
mouseDrag
public void mouseDrag(MouseEvent e,
int x,
int y)
- Handles mouse drag events in the drawing view.
mouseUp
public void mouseUp(MouseEvent e,
int x,
int y)
- Handles mouse up in the drawing view.
mouseMove
public void mouseMove(MouseEvent evt,
int x,
int y)
- Handles mouse moves (if the mouse button is up).
keyDown
public void keyDown(KeyEvent evt,
int key)
- Handles key down events in the drawing view.
drawing
public Drawing drawing()
- Gets the tool's drawing.
editor
public DrawingEditor editor()
- Gets the tool's editor.
view
public DrawingView view()
- Gets the tool's view.
All Packages Class Hierarchy This Package Previous Next Index