CH.ifa.draw.standard
Class ActionTool

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractTool
      extended by CH.ifa.draw.standard.ActionTool
All Implemented Interfaces:
Tool
Direct Known Subclasses:
BorderTool

public abstract class ActionTool
extends AbstractTool

A tool that performs an action when it is active and the mouse is clicked.


Field Summary
 
Fields inherited from class CH.ifa.draw.standard.AbstractTool
fAnchorX, fAnchorY, fView
 
Constructor Summary
ActionTool(DrawingView itsView)
           
 
Method Summary
abstract  void action(Figure figure)
          Performs an action with the touched figure.
 void mouseDown(java.awt.event.MouseEvent e, int x, int y)
          Add the touched figure to the selection an invoke action
 void mouseUp(java.awt.event.MouseEvent e, int x, int y)
          Handles mouse up in the drawing view.
 
Methods inherited from class CH.ifa.draw.standard.AbstractTool
activate, deactivate, drawing, editor, keyDown, mouseDrag, mouseMove, view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionTool

public ActionTool(DrawingView itsView)
Method Detail

mouseDown

public void mouseDown(java.awt.event.MouseEvent e,
                      int x,
                      int y)
Add the touched figure to the selection an invoke action

Specified by:
mouseDown in interface Tool
Overrides:
mouseDown in class AbstractTool
See Also:
action(CH.ifa.draw.framework.Figure)

mouseUp

public void mouseUp(java.awt.event.MouseEvent e,
                    int x,
                    int y)
Description copied from class: AbstractTool
Handles mouse up in the drawing view.

Specified by:
mouseUp in interface Tool
Overrides:
mouseUp in class AbstractTool

action

public abstract void action(Figure figure)
Performs an action with the touched figure.