com.vividsolutions.jump.workbench.ui.cursortool
Class QuasimodeTool

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.cursortool.DelegatingTool
      extended by com.vividsolutions.jump.workbench.ui.cursortool.QuasimodeTool
All Implemented Interfaces:
CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.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
static class QuasimodeTool.ModifierKeySpec
           
 
Constructor Summary
QuasimodeTool(CursorTool defaultTool)
           
 
Method Summary
 void activate(LayerViewPanel panel)
           
 QuasimodeTool add(QuasimodeTool.ModifierKeySpec keySpec, CursorTool tool)
           
static QuasimodeTool addStandardQuasimodes(CursorTool tool)
           
 void deactivate()
           
 java.awt.Cursor getCursor()
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.DelegatingTool
cancelGesture, getDelegate, getIcon, getName, isGestureInProgress, isRightMouseButtonUsed, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, setDelegate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuasimodeTool

public QuasimodeTool(CursorTool defaultTool)
Method Detail

getCursor

public java.awt.Cursor getCursor()
Specified by:
getCursor in interface CursorTool
Overrides:
getCursor in class DelegatingTool

activate

public void activate(LayerViewPanel panel)
Specified by:
activate in interface CursorTool
Overrides:
activate in class DelegatingTool

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class DelegatingTool

deactivate

public void deactivate()
Specified by:
deactivate in interface CursorTool
Overrides:
deactivate in class DelegatingTool

add

public QuasimodeTool add(QuasimodeTool.ModifierKeySpec keySpec,
                         CursorTool tool)

addStandardQuasimodes

public static QuasimodeTool addStandardQuasimodes(CursorTool tool)