com.vividsolutions.jump.workbench.ui.snap
Class SnapIndicatorTool

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
      extended by com.vividsolutions.jump.workbench.ui.snap.SnapIndicatorTool
All Implemented Interfaces:
CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

public class SnapIndicatorTool
extends AbstractCursorTool

Visually indicates the snap point with a coloured dot.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
 
Constructor Summary
SnapIndicatorTool(java.util.Collection snapPolicies)
           
SnapIndicatorTool(java.awt.Color snappedColor, java.awt.Color unsnappedColor, double diameter, java.util.Collection snapPolicies)
           
 
Method Summary
 javax.swing.Icon getIcon()
           
 boolean isGestureInProgress()
          Used by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
activate, add, allowSnapping, cancelGesture, createCursor, createCursor, createStandardSnappingPolicies, deactivate, getColor, getCursor, getName, getSnapManager, getWorkbench, isRightMouseButtonUsed, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, name, setColor, toString, workbench, workbenchFrame
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnapIndicatorTool

public SnapIndicatorTool(java.util.Collection snapPolicies)

SnapIndicatorTool

public SnapIndicatorTool(java.awt.Color snappedColor,
                         java.awt.Color unsnappedColor,
                         double diameter,
                         java.util.Collection snapPolicies)
Method Detail

getIcon

public javax.swing.Icon getIcon()
Returns:
null to use a default icon

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class AbstractCursorTool

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class AbstractCursorTool

isGestureInProgress

public boolean isGestureInProgress()
Description copied from class: AbstractCursorTool
Used by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.

Specified by:
isGestureInProgress in interface CursorTool
Overrides:
isGestureInProgress in class AbstractCursorTool