|
||||||||||
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.DragTracker
public class DragTracker
DragTracker implements the dragging of the clicked figure.
SelectionTool
Nested Class Summary | |
---|---|
static class |
DragTracker.UndoActivity
|
Nested classes/interfaces inherited from class org.jhotdraw.standard.AbstractTool |
---|
AbstractTool.EventDispatcher |
Constructor Summary | |
---|---|
DragTracker(DrawingEditor newDrawingEditor,
Figure anchor)
|
Method Summary | |
---|---|
void |
activate()
Activates the tool for use on the given view. |
void |
deactivate()
Deactivates the tool. |
Figure |
getAnchorFigure()
|
boolean |
hasMoved()
Check whether the selected figure has been moved since the tool has been activated. |
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. |
Methods inherited from class org.jhotdraw.standard.AbstractTool |
---|
addToolListener, drawing, editor, getActiveDrawing, getActiveView, getUndoActivity, isActive, isEnabled, isUsable, keyDown, mouseMove, mouseUp, removeToolListener, setEnabled, setUndoActivity, setUsable, view |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DragTracker(DrawingEditor newDrawingEditor, Figure anchor)
Method Detail |
---|
public void mouseDown(java.awt.event.MouseEvent e, int x, int y)
AbstractTool
mouseDown
in interface Tool
mouseDown
in class AbstractTool
public void mouseDrag(java.awt.event.MouseEvent e, int x, int y)
AbstractTool
mouseDrag
in interface Tool
mouseDrag
in class AbstractTool
public Figure getAnchorFigure()
public boolean hasMoved()
public void activate()
AbstractTool
activate
in interface Tool
activate
in class AbstractTool
public void deactivate()
AbstractTool
deactivate
in interface Tool
deactivate
in class AbstractTool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |