org.objectweb.jac.ide.diagrams
Class AbstractActionTool

java.lang.Object
  |
  +--CH.ifa.draw.standard.AbstractTool
        |
        +--org.objectweb.jac.ide.diagrams.AbstractActionTool
All Implemented Interfaces:
EventListener, CH.ifa.draw.framework.Tool, CH.ifa.draw.framework.ViewChangeListener
Direct Known Subclasses:
FieldCreationTool, MethodCreationTool, RelationLinkShowTool

public abstract class AbstractActionTool
extends CH.ifa.draw.standard.AbstractTool


Field Summary
protected  DisplayContext context
           
 
Fields inherited from class CH.ifa.draw.standard.AbstractTool
fAnchorX, fAnchorY
 
Constructor Summary
AbstractActionTool(CH.ifa.draw.framework.DrawingEditor drawingEditor, DisplayContext context, Class figureClass)
           
 
Method Summary
abstract  void action(CH.ifa.draw.framework.Figure figure)
           
 boolean isActive()
           
 void mouseDown(MouseEvent e, int x, int y)
          Add the touched figure to the selection an invoke action
 void mouseUp(MouseEvent e, int x, int y)
           
 
Methods inherited from class CH.ifa.draw.standard.AbstractTool
activate, addToolListener, checkUsable, createEventDispatcher, deactivate, drawing, editor, getEventDispatcher, isEnabled, isUsable, keyDown, mouseDrag, mouseMove, removeToolListener, setEnabled, setUsable, view, viewCreated, viewDestroying, viewSelectionChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected DisplayContext context
Constructor Detail

AbstractActionTool

public AbstractActionTool(CH.ifa.draw.framework.DrawingEditor drawingEditor,
                          DisplayContext context,
                          Class figureClass)
Parameters:
drawingEditor - the editor the tool is attached to
context - the display context
figureClass - the type of figures the action applies to
Method Detail

mouseDown

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

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

mouseUp

public void mouseUp(MouseEvent e,
                    int x,
                    int y)
Specified by:
mouseUp in interface CH.ifa.draw.framework.Tool
Overrides:
mouseUp in class CH.ifa.draw.standard.AbstractTool

action

public abstract void action(CH.ifa.draw.framework.Figure figure)

isActive

public boolean isActive()
Specified by:
isActive in interface CH.ifa.draw.framework.Tool
Overrides:
isActive in class CH.ifa.draw.standard.AbstractTool