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
Nested classes inherited from class CH.ifa.draw.standard.AbstractTool |
CH.ifa.draw.standard.AbstractTool.EventDispatcher |
Fields inherited from class CH.ifa.draw.standard.AbstractTool |
fAnchorX, fAnchorY |
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 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 |
fChild
protected CH.ifa.draw.framework.Tool fChild
context
protected DisplayContext context
SelectionTool
public SelectionTool(CH.ifa.draw.framework.DrawingEditor newDrawingEditor,
DisplayContext context)
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.