com.vividsolutions.jump.workbench.ui.snap
Class SnapIndicatorTool
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
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.
|
Constructor Summary |
SnapIndicatorTool(java.util.Collection snapPolicies)
|
SnapIndicatorTool(java.awt.Color snappedColor,
java.awt.Color unsnappedColor,
double diameter,
java.util.Collection snapPolicies)
|
| Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool |
activate, add, allowSnapping, cancelGesture, check, cleanup, clearShape, createCursor, createCursor, createStandardSnappingPolicies, deactivate, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getCursor, getName, getPanel, getSnapManager, getTaskFrame, getWorkbench, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, name, redrawShape, reportNothingToUndoYet, setColor, setFilling, setStroke, setStrokeWidth, setup, snap, snap, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrame |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SnapIndicatorTool
public SnapIndicatorTool(java.util.Collection snapPolicies)
SnapIndicatorTool
public SnapIndicatorTool(java.awt.Color snappedColor,
java.awt.Color unsnappedColor,
double diameter,
java.util.Collection snapPolicies)
getIcon
public javax.swing.Icon getIcon()
- Returns:
- null to use a default icon
gestureFinished
protected void gestureFinished()
throws java.lang.Exception
- Specified by:
gestureFinished in class AbstractCursorTool
- Throws:
java.lang.Exception
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
getShape
protected java.awt.Shape getShape()
throws java.awt.geom.NoninvertibleTransformException
- Specified by:
getShape in class AbstractCursorTool
- Returns:
- null if nothing should be drawn
- Throws:
java.awt.geom.NoninvertibleTransformException
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