org.objectweb.jac.ide.diagrams
Class SelectionTool

java.lang.Object
  |
  +--CH.ifa.draw.standard.AbstractTool
        |
        +--org.objectweb.jac.ide.diagrams.AbstractTool
              |
              +--org.objectweb.jac.ide.diagrams.SelectionTool
All Implemented Interfaces:
EventListener, CH.ifa.draw.framework.Tool, CH.ifa.draw.framework.ViewChangeListener

public class SelectionTool
extends AbstractTool


Field Summary
protected  DisplayContext context
           
protected  CH.ifa.draw.framework.Tool fChild
           
 
Fields inherited from class CH.ifa.draw.standard.AbstractTool
fAnchorX, fAnchorY
 
Constructor Summary
SelectionTool(CH.ifa.draw.framework.DrawingEditor newDrawingEditor, DisplayContext context)
           
 
Method Summary
protected  CH.ifa.draw.framework.Tool createAreaTracker()
          Factory method to create an area tracker.
protected  CH.ifa.draw.framework.Tool createDragTracker(CH.ifa.draw.framework.Figure f)
          Factory method to create a Drag tracker.
protected  CH.ifa.draw.framework.Tool createHandleTracker(CH.ifa.draw.framework.DrawingView view, CH.ifa.draw.framework.Handle handle)
          Factory method to create a Handle tracker.
 void mouseDown(MouseEvent e, int x, int y)
          Handles mouse down events and starts the corresponding tracker.
 void mouseDrag(MouseEvent e, int x, int y)
          Handles mouse drag events.
 void mouseMove(MouseEvent evt, int x, int y)
          Handles mouse moves (if the mouse button is up).
 void mouseUp(MouseEvent e, int x, int y)
          Handles mouse up events.
 
Methods inherited from class org.objectweb.jac.ide.diagrams.AbstractTool
diagramView, isActive
 
Methods inherited from class CH.ifa.draw.standard.AbstractTool
activate, addToolListener, checkUsable, createEventDispatcher, deactivate, drawing, editor, getEventDispatcher, isEnabled, isUsable, keyDown, 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

fChild

protected CH.ifa.draw.framework.Tool fChild

context

protected DisplayContext context
Constructor Detail

SelectionTool

public SelectionTool(CH.ifa.draw.framework.DrawingEditor newDrawingEditor,
                     DisplayContext context)
Method Detail

mouseDown

public void mouseDown(MouseEvent e,
                      int x,
                      int y)
Handles mouse down events and starts the corresponding tracker.

Specified by:
mouseDown in interface CH.ifa.draw.framework.Tool
Overrides:
mouseDown in class CH.ifa.draw.standard.AbstractTool

mouseMove

public void mouseMove(MouseEvent evt,
                      int x,
                      int y)
Handles mouse moves (if the mouse button is up). Switches the cursors depending on whats under them.

Specified by:
mouseMove in interface CH.ifa.draw.framework.Tool
Overrides:
mouseMove in class CH.ifa.draw.standard.AbstractTool

mouseDrag

public void mouseDrag(MouseEvent e,
                      int x,
                      int y)
Handles mouse drag events. The events are forwarded to the current tracker.

Specified by:
mouseDrag in interface CH.ifa.draw.framework.Tool
Overrides:
mouseDrag in class CH.ifa.draw.standard.AbstractTool

mouseUp

public void mouseUp(MouseEvent e,
                    int x,
                    int y)
Handles mouse up events. The events are forwarded to the current tracker.

Specified by:
mouseUp in interface CH.ifa.draw.framework.Tool
Overrides:
mouseUp in class CH.ifa.draw.standard.AbstractTool

createHandleTracker

protected CH.ifa.draw.framework.Tool createHandleTracker(CH.ifa.draw.framework.DrawingView view,
                                                         CH.ifa.draw.framework.Handle handle)
Factory method to create a Handle tracker. It is used to track a handle.


createDragTracker

protected CH.ifa.draw.framework.Tool createDragTracker(CH.ifa.draw.framework.Figure f)
Factory method to create a Drag tracker. It is used to drag a figure.


createAreaTracker

protected CH.ifa.draw.framework.Tool createAreaTracker()
Factory method to create an area tracker. It is used to select an area.