|
JHotDraw 7.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jhotdraw.beans.AbstractBean
org.jhotdraw.draw.AbstractTool
org.jhotdraw.draw.DragTracker
public class DragTracker
DragTracker implements interactions with the content area of a
Figure.
The DragTracker handles one of the three states of the
SelectionTool. It comes into action, when the user presses
the mouse button over the content area of a Figure.
SelectionTool,
Serialized Form| Field Summary | |
|---|---|
protected Figure |
anchorFigure
|
protected java.awt.geom.Point2D.Double |
anchorOrigin
The anchorOrigin holds the origin of all dragged figures of the mousePressed event. |
protected java.awt.geom.Point2D.Double |
anchorPoint
The anchorPoint holds the location of the mouse of the mousePressed event. |
protected java.awt.geom.Rectangle2D.Double |
dragRect
The drag rectangle encompasses the bounds of all dragged figures. |
protected java.awt.geom.Point2D.Double |
previousOrigin
The previousOrigin holds the origin of all dragged figures of the previous mouseDragged event. |
protected java.awt.geom.Point2D.Double |
previousPoint
The previousPoint holds the location of the mouse of the previous mouseDragged event. |
| Fields inherited from class org.jhotdraw.draw.AbstractTool |
|---|
anchor, editor, isWorking, listenerList |
| Fields inherited from class org.jhotdraw.beans.AbstractBean |
|---|
propertySupport |
| Constructor Summary | |
|---|---|
DragTracker(Figure figure)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
mouseDragged(java.awt.event.MouseEvent evt)
|
void |
mouseMoved(java.awt.event.MouseEvent evt)
|
void |
mousePressed(java.awt.event.MouseEvent evt)
|
void |
mouseReleased(java.awt.event.MouseEvent evt)
|
| Methods inherited from class org.jhotdraw.draw.AbstractTool |
|---|
activate, addToolListener, addUndoableEditListener, constrainPoint, constrainPoint, createActionMap, createInputMap, deactivate, draw, editCopy, editCut, editDelete, editDuplicate, editPaste, fireAreaInvalidated, fireAreaInvalidated, fireToolDone, fireToolStarted, getActionMap, getDrawing, getEditor, getInputMap, getView, isActive, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, removeToolListener, removeUndoableEditListener, setActionMap, setInputMap, updateCursor, viewToDrawing |
| Methods inherited from class org.jhotdraw.beans.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Figure anchorFigure
protected java.awt.geom.Rectangle2D.Double dragRect
protected java.awt.geom.Point2D.Double previousOrigin
protected java.awt.geom.Point2D.Double anchorOrigin
protected java.awt.geom.Point2D.Double previousPoint
protected java.awt.geom.Point2D.Double anchorPoint
| Constructor Detail |
|---|
public DragTracker(Figure figure)
| Method Detail |
|---|
public void mouseMoved(java.awt.event.MouseEvent evt)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class AbstractToolpublic void mousePressed(java.awt.event.MouseEvent evt)
mousePressed in interface java.awt.event.MouseListenermousePressed in class AbstractToolpublic void mouseDragged(java.awt.event.MouseEvent evt)
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class AbstractTool
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||