org.jhotdraw.draw
Class HandleTracker
java.lang.Object
org.jhotdraw.draw.AbstractTool
org.jhotdraw.draw.HandleTracker
- All Implemented Interfaces:
- Tool
public class HandleTracker
- extends AbstractTool
HandleTracker implements interactions with the handles of a Figure.
- Version:
- <$CURRENT_VERSION$>
- See Also:
SelectionTool
|
Method Summary |
void |
activate()
Activates the tool for use on the given view. |
void |
mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse down events in the drawing view. |
void |
mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse drag events in the drawing view. |
void |
mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse up in the drawing view. |
| Methods inherited from class org.jhotdraw.draw.AbstractTool |
addToolListener, checkUsable, createEventDispatcher, createViewChangeListener, deactivate, drawing, editor, getActiveDrawing, getActiveView, getAnchorX, getAnchorY, getEventDispatcher, getUndoActivity, isActive, isEnabled, isUsable, keyDown, mouseMove, removeToolListener, setAnchorX, setAnchorY, setEditor, setEnabled, setUndoActivity, setUsable, setView, view, viewCreated, viewDestroying, viewSelectionChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fAnchorHandle
private Handle fAnchorHandle
HandleTracker
public HandleTracker(DrawingEditor newDrawingEditor,
Handle anchorHandle)
mouseDown
public void mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
- Description copied from class:
AbstractTool
- Handles mouse down events in the drawing view.
- Specified by:
mouseDown in interface Tool- Overrides:
mouseDown in class AbstractTool
mouseDrag
public void mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
- Description copied from class:
AbstractTool
- Handles mouse drag events in the drawing view.
- Specified by:
mouseDrag in interface Tool- Overrides:
mouseDrag in class AbstractTool
mouseUp
public void mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
- Description copied from class:
AbstractTool
- Handles mouse up in the drawing view.
- Specified by:
mouseUp in interface Tool- Overrides:
mouseUp in class AbstractTool
activate
public void activate()
- Description copied from class:
AbstractTool
- Activates the tool for use on the given view. This method is called
whenever the user switches to this tool. Use this method to
reinitialize a tool.
Since tools will be disabled unless it is useable, there will always
be an active view when this is called. based on isUsable()
Tool should never be activated if the view is null.
Ideally, the dditor should take care of that.
- Specified by:
activate in interface Tool- Overrides:
activate in class AbstractTool