org.objectweb.jac.ide.diagrams
Class SelectionTool

java.lang.Object
  extended byCH.ifa.draw.standard.AbstractTool
      extended byorg.objectweb.jac.ide.diagrams.AbstractTool
          extended byorg.objectweb.jac.ide.diagrams.SelectionTool
All Implemented Interfaces:
EventListener, CH.ifa.draw.framework.Tool, CH.ifa.draw.framework.ViewChangeListener

public class SelectionTool
extends 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
           
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.


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.


mouseDrag

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


mouseUp

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


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.