Class SnapIndicatorTool
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
-
- com.vividsolutions.jump.workbench.ui.snap.SnapIndicatorTool
-
- All Implemented Interfaces:
CursorTool,MouseListener,MouseMotionListener,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
-
-
Field Summary
-
Fields inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
isLinuxOS, panel
-
-
Constructor Summary
Constructors Constructor Description SnapIndicatorTool(Color snappedColor, Color unsnappedColor, double diameter, Collection snapPolicies, WorkbenchContext context)SnapIndicatorTool(Collection snapPolicies, WorkbenchContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgestureFinished()IcongetIcon()protected ShapegetShape()booleanisGestureInProgress()Used by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.voidmouseDragged(MouseEvent e)voidmouseMoved(MouseEvent e)-
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
activate, add, allowSnapping, cancelGesture, check, cleanup, clearImage, clearShape, componentWithFocusIsHandledByCursorTools, createCursor, createCursor, createCursor, createStandardSnappingPolicies, deactivate, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, execute, fireGestureFinished, getColor, getCursor, getImage, getImagePosition, getName, getPanel, getPanel, getSnapManager, getStroke, getTaskFrame, getWorkbench, getWorkbenchContext, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setControlPressed, setFilling, setPanel, setShiftPressed, setStroke, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressed
-
-
-
-
Constructor Detail
-
SnapIndicatorTool
public SnapIndicatorTool(Collection snapPolicies, WorkbenchContext context)
-
SnapIndicatorTool
public SnapIndicatorTool(Color snappedColor, Color unsnappedColor, double diameter, Collection snapPolicies, WorkbenchContext context)
-
-
Method Detail
-
getIcon
public Icon getIcon()
- Returns:
- null to use a default icon
-
gestureFinished
protected void gestureFinished() throws Exception- Specified by:
gestureFinishedin classAbstractCursorTool- Throws:
Exception
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classAbstractCursorTool
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classAbstractCursorTool
-
getShape
protected Shape getShape() throws NoninvertibleTransformException
- Specified by:
getShapein classAbstractCursorTool- Returns:
- null if nothing should be drawn
- Throws:
NoninvertibleTransformException
-
isGestureInProgress
public boolean isGestureInProgress()
Description copied from class:AbstractCursorToolUsed by OrCompositeTool to determine whether a CursorTool is busy interacting with the user.- Specified by:
isGestureInProgressin interfaceCursorTool- Overrides:
isGestureInProgressin classAbstractCursorTool
-
-