|
||||||||||
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
DragTracker implements the dragging of the clicked figure.
SelectionTool
Nested Class Summary | |
static class |
DragTracker.UndoActivity
|
Nested classes 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. |
protected Undoable |
createUndoActivity()
Factory method for undo activity |
void |
deactivate()
Deactivates the tool. |
Figure |
getAnchorFigure()
|
protected int |
getLastMouseX()
|
protected int |
getLastMouseY()
|
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. |
protected void |
setAnchorFigure(Figure newAnchorFigure)
|
protected void |
setHasMoved(boolean newMoved)
|
protected void |
setLastMouseX(int newLastMouseX)
|
protected void |
setLastMouseY(int newLastMouseY)
|
Methods inherited from class org.jhotdraw.standard.AbstractTool |
addToolListener, checkUsable, createEventDispatcher, createViewChangeListener, drawing, editor, getActiveDrawing, getActiveView, getAnchorX, getAnchorY, getEventDispatcher, getUndoActivity, isActive, isEnabled, isUsable, keyDown, mouseMove, mouseUp, 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 |
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
protected void setAnchorFigure(Figure newAnchorFigure)
public Figure getAnchorFigure()
protected void setLastMouseX(int newLastMouseX)
protected int getLastMouseX()
protected void setLastMouseY(int newLastMouseY)
protected int getLastMouseY()
public boolean hasMoved()
protected void setHasMoved(boolean newMoved)
public void activate()
AbstractTool
activate
in interface Tool
activate
in class AbstractTool
public void deactivate()
AbstractTool
deactivate
in interface Tool
deactivate
in class AbstractTool
protected Undoable createUndoActivity()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |