Class QuasimodeTool
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.cursortool.DelegatingTool
-
- com.vividsolutions.jump.workbench.ui.cursortool.QuasimodeTool
-
- All Implemented Interfaces:
CursorTool,MouseListener,MouseMotionListener,EventListener
- Direct Known Subclasses:
SnapVerticesToSelectedVertexTool
public class QuasimodeTool extends DelegatingTool
Delegates to different CursorTools depending on whether various modifier keys are pressed (Ctrl, Shift, Alt). The term "quasimode" refers to a mode that is only in existence as long as a key is held down -- the mode vanishes as soon as the key is released. For more information, see the book "Humane Interfaces" by Jef Raskin.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQuasimodeTool.ModifierKeySetstatic classQuasimodeTool.ModifierKeySpecstatic classQuasimodeTool.Setup
-
Constructor Summary
Constructors Constructor Description QuasimodeTool(CursorTool defaultTool)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(LayerViewPanel panel)QuasimodeTooladd(QuasimodeTool.ModifierKeySpec keySpec, CursorTool tool)voidcancelGesture()Notifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.QuasimodeToolcloneAndSetDefaultTool(CursorTool defaultTool)static QuasimodeToolcreateWithDefaults(CursorTool tool)voiddeactivate()static Set<QuasimodeTool.ModifierKeySpec>getDefaultKeyboardShortcuts()static CursorToolgetDefaultKeyboardShortcutTool(QuasimodeTool.ModifierKeySpec key)CursorToolgetDefaultTool()KeyListenergetKeyListener()QuasimodeToolremove(QuasimodeTool.ModifierKeySpec keySpec)StringtoString()voiduseDefaults(boolean onoff)-
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.DelegatingTool
getCursor, getDelegate, getIcon, getName, isGestureInProgress, isRightMouseButtonUsed, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, setDelegate
-
-
-
-
Constructor Detail
-
QuasimodeTool
public QuasimodeTool(CursorTool defaultTool)
-
-
Method Detail
-
getDefaultTool
public CursorTool getDefaultTool()
-
add
public QuasimodeTool add(QuasimodeTool.ModifierKeySpec keySpec, CursorTool tool)
-
remove
public QuasimodeTool remove(QuasimodeTool.ModifierKeySpec keySpec)
-
cloneAndSetDefaultTool
public QuasimodeTool cloneAndSetDefaultTool(CursorTool defaultTool)
-
cancelGesture
public void cancelGesture()
Description copied from interface:CursorToolNotifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.- Specified by:
cancelGesturein interfaceCursorTool- Overrides:
cancelGesturein classDelegatingTool
-
getKeyListener
public KeyListener getKeyListener()
-
activate
public void activate(LayerViewPanel panel)
- Specified by:
activatein interfaceCursorTool- Overrides:
activatein classDelegatingTool
-
deactivate
public void deactivate()
- Specified by:
deactivatein interfaceCursorTool- Overrides:
deactivatein classDelegatingTool
-
createWithDefaults
public static QuasimodeTool createWithDefaults(CursorTool tool)
-
useDefaults
public void useDefaults(boolean onoff)
-
getDefaultKeyboardShortcutTool
public static CursorTool getDefaultKeyboardShortcutTool(QuasimodeTool.ModifierKeySpec key)
-
getDefaultKeyboardShortcuts
public static Set<QuasimodeTool.ModifierKeySpec> getDefaultKeyboardShortcuts()
-
-