org.objectweb.jac.ide.diagrams
Class AbstractActionTool

java.lang.Object
  extended byCH.ifa.draw.standard.AbstractTool
      extended byorg.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


Nested Class Summary
 
Nested classes inherited from class CH.ifa.draw.standard.AbstractTool
CH.ifa.draw.standard.AbstractTool.EventDispatcher
 
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

See Also:
action(CH.ifa.draw.framework.Figure)

mouseUp

public void mouseUp(MouseEvent e,
                    int x,
                    int y)

action

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

isActive

public boolean isActive()