Class ConstrainedMoveVertexTool
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
-
- org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedDragTool
-
- org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedMoveVertexTool
-
- All Implemented Interfaces:
CursorTool
,MouseListener
,MouseMotionListener
,EventListener
public class ConstrainedMoveVertexTool extends ConstrainedDragTool
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
-
-
Field Summary
Fields Modifier and Type Field Description static int
TOLERANCE
-
Fields inherited from class org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedDragTool
coordinates, DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSource
-
Fields inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
isLinuxOS, panel
-
-
Constructor Summary
Constructors Constructor Description ConstrainedMoveVertexTool(WorkbenchContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
gestureFinished()
Cursor
getCursor()
Icon
getIcon()
String
getName()
Returns a very brief description of this CursorTool.protected Shape
getShape(Point2D source, Point2D destination)
void
mousePressed(MouseEvent e)
Begins handling of the drag.void
moveVertices(org.locationtech.jts.geom.Coordinate initialLocation, org.locationtech.jts.geom.Coordinate finalLocation)
-
Methods inherited from class org.openjump.core.ui.plugin.edittoolbox.cursortools.ConstrainedDragTool
activate, doConstraint, getBoxInModelCoordinates, getCoordinates, getModelDestination, getModelSource, getShape, getViewDestination, getViewSource, modelClickBuffer, mouseDragged, mouseLocationChanged, mouseReleased, setModelSource, setViewClickBuffer, setViewSource, wasClick
-
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
add, allowSnapping, cancelGesture, check, cleanup, clearImage, clearShape, componentWithFocusIsHandledByCursorTools, createCursor, createCursor, createCursor, createStandardSnappingPolicies, deactivate, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, execute, fireGestureFinished, getColor, getImage, getImagePosition, getPanel, getPanel, getSnapManager, getStroke, getTaskFrame, getWorkbench, getWorkbenchContext, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mouseMoved, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setControlPressed, setFilling, setPanel, setShiftPressed, setStroke, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressed
-
-
-
-
Field Detail
-
TOLERANCE
public static final int TOLERANCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConstrainedMoveVertexTool
public ConstrainedMoveVertexTool(WorkbenchContext context)
-
-
Method Detail
-
getCursor
public Cursor getCursor()
- Specified by:
getCursor
in interfaceCursorTool
- Overrides:
getCursor
in classAbstractCursorTool
-
getIcon
public Icon getIcon()
- Returns:
- null to use a default icon
-
getName
public String getName()
Description copied from interface:CursorTool
Returns a very brief description of this CursorTool.- Specified by:
getName
in interfaceCursorTool
- Overrides:
getName
in classAbstractCursorTool
- Returns:
- the name of this CursorTool
-
gestureFinished
protected void gestureFinished() throws Exception
- Specified by:
gestureFinished
in classAbstractCursorTool
- Throws:
Exception
-
mousePressed
public void mousePressed(MouseEvent e)
Description copied from class:ConstrainedDragTool
Begins handling of the drag. Subclasses can prevent handling of the drag by overriding this method and not calling it.- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classConstrainedDragTool
-
moveVertices
public void moveVertices(org.locationtech.jts.geom.Coordinate initialLocation, org.locationtech.jts.geom.Coordinate finalLocation) throws Exception
- Throws:
Exception
-
-