|
JHotDraw 7.5.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.tool.AbstractTool
org.jhotdraw.draw.tool.DefaultHandleTracker
public class DefaultHandleTracker
DefaultHandleTracker implements interactions with the handles of a Figure.
The DefaultHandleTracker handles one of the three states of the
SelectionTool. Iz comes into action, when the user presses
the mouse button over a Figure.
Design pattern:
Name: Chain of Responsibility.
Role: Handler.
Partners: SelectionTool as Handler, SelectAreaTracker as
Handler, DragTracker as Handler, DefaultHandleTracker as Handler.
Design pattern:
Name: State.
Role: State.
Partners: SelectAreaTracker as State, DragTracker as
State, SelectionTool as Context.
SelectionTool,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.jhotdraw.draw.tool.AbstractTool |
|---|
anchor, editor, isWorking, listenerList |
| Fields inherited from class org.jhotdraw.beans.AbstractBean |
|---|
propertySupport |
| Constructor Summary | |
|---|---|
DefaultHandleTracker()
|
|
DefaultHandleTracker(Handle handle)
Creates a new instance. |
|
DefaultHandleTracker(Handle master,
java.util.Collection<Handle> handles)
|
|
| Method Summary | |
|---|---|
void |
activate(DrawingEditor editor)
Activates the tool for the given editor. |
protected void |
clearHoverHandles()
|
void |
deactivate(DrawingEditor editor)
Deactivates the tool. |
void |
draw(java.awt.Graphics2D g)
Draws the tool. |
void |
keyPressed(java.awt.event.KeyEvent evt)
The Tool uses the InputMap to determine what to do, when a key is pressed. |
void |
keyReleased(java.awt.event.KeyEvent evt)
|
void |
keyTyped(java.awt.event.KeyEvent evt)
|
void |
mouseClicked(java.awt.event.MouseEvent evt)
|
void |
mouseDragged(java.awt.event.MouseEvent evt)
|
void |
mouseEntered(java.awt.event.MouseEvent evt)
|
void |
mouseExited(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)
|
void |
setHandles(Handle handle,
java.util.Collection<Handle> compatibleHandles)
|
protected void |
updateHoverHandles(DrawingView view,
Figure f)
|
| Methods inherited from class org.jhotdraw.beans.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jhotdraw.draw.tool.Tool |
|---|
addToolListener, editCopy, editCut, editDelete, editDuplicate, editPaste, getToolTipText, removeToolListener, supportsHandleInteraction |
| Constructor Detail |
|---|
public DefaultHandleTracker(Handle handle)
public DefaultHandleTracker(Handle master,
java.util.Collection<Handle> handles)
public DefaultHandleTracker()
| Method Detail |
|---|
public void draw(java.awt.Graphics2D g)
Tool
draw in interface Tooldraw in class AbstractToolpublic void activate(DrawingEditor editor)
Tool
activate in interface Toolactivate in class AbstractToolpublic void deactivate(DrawingEditor editor)
Tool
deactivate in interface Tooldeactivate in class AbstractToolpublic void keyPressed(java.awt.event.KeyEvent evt)
AbstractTool
keyPressed in interface java.awt.event.KeyListenerkeyPressed in class AbstractToolpublic void keyReleased(java.awt.event.KeyEvent evt)
keyReleased in interface java.awt.event.KeyListenerkeyReleased in class AbstractToolpublic void keyTyped(java.awt.event.KeyEvent evt)
keyTyped in interface java.awt.event.KeyListenerkeyTyped in class AbstractToolpublic void mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractToolpublic void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseEntered(java.awt.event.MouseEvent evt)
mouseEntered in interface java.awt.event.MouseListenermouseEntered in class AbstractToolpublic void mouseExited(java.awt.event.MouseEvent evt)
mouseExited in interface java.awt.event.MouseListenermouseExited in class AbstractToolpublic 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 mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class AbstractToolprotected void clearHoverHandles()
protected void updateHoverHandles(DrawingView view,
Figure f)
public void setHandles(Handle handle,
java.util.Collection<Handle> compatibleHandles)
setHandles in interface HandleTracker
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||