|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractTool
org.jhotdraw.standard.SelectionTool
public class SelectionTool
Tool to select and manipulate figures. A selection tool is in one of three states, e.g., background selection, figure selection, handle manipulation. The different states are handled by different child tools.
State
SelectionTool is the StateContext and child is the State.
The SelectionTool delegates state specific
behavior to its current child tool.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jhotdraw.standard.AbstractTool |
---|
AbstractTool.EventDispatcher |
Constructor Summary | |
---|---|
SelectionTool(DrawingEditor newDrawingEditor)
|
Method Summary | |
---|---|
void |
mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse down events and starts the corresponding tracker. |
void |
mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse drag events. |
void |
mouseMove(java.awt.event.MouseEvent evt,
int x,
int y)
Handles mouse moves (if the mouse button is up). |
void |
mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse up events. |
Methods inherited from class org.jhotdraw.standard.AbstractTool |
---|
activate, addToolListener, deactivate, drawing, editor, getActiveDrawing, getActiveView, getUndoActivity, isActive, isEnabled, isUsable, keyDown, removeToolListener, setEnabled, setUndoActivity, setUsable, view |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectionTool(DrawingEditor newDrawingEditor)
Method Detail |
---|
public void mouseDown(java.awt.event.MouseEvent e, int x, int y)
mouseDown
in interface Tool
mouseDown
in class AbstractTool
public void mouseMove(java.awt.event.MouseEvent evt, int x, int y)
mouseMove
in interface Tool
mouseMove
in class AbstractTool
public void mouseDrag(java.awt.event.MouseEvent e, int x, int y)
mouseDrag
in interface Tool
mouseDrag
in class AbstractTool
public void mouseUp(java.awt.event.MouseEvent e, int x, int y)
mouseUp
in interface Tool
mouseUp
in class AbstractTool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |