org.jhotdraw.contrib.zoom
Class AreaTracker
java.lang.Object
org.jhotdraw.standard.AbstractTool
org.jhotdraw.contrib.zoom.AreaTracker
- All Implemented Interfaces:
- Tool
- Direct Known Subclasses:
- ZoomAreaTracker
public abstract class AreaTracker
- extends AbstractTool
A rubberband area tracker. It can be extended to do anything with
the resulting area, e.g. select it or zoom it. This code is
derived from SelectAreaTracker, which is a bit too specific to
allow for extension.
- Version:
- <$CURRENT_VERSION$>
- Author:
- Andre Spiegel
Method Summary |
java.awt.Rectangle |
getArea()
|
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.standard.AbstractTool |
activate, addToolListener, deactivate, drawing, editor, getActiveDrawing, getActiveView, getUndoActivity, isActive, isEnabled, isUsable, keyDown, mouseMove, removeToolListener, setEnabled, setUndoActivity, setUsable, view |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getArea
public java.awt.Rectangle getArea()
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