org.openjump.core.ui.plugin.edittoolbox.cursortools
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, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
public class ConstrainedMoveVertexTool
- extends ConstrainedDragTool
|
Method Summary |
protected void |
gestureFinished()
|
java.awt.Cursor |
getCursor()
|
javax.swing.Icon |
getIcon()
|
java.lang.String |
getName()
Returns a very brief description of this CursorTool. |
protected java.awt.Shape |
getShape(java.awt.geom.Point2D source,
java.awt.geom.Point2D destination)
|
void |
mousePressed(java.awt.event.MouseEvent e)
Begins handling of the drag. |
void |
moveVertices(com.vividsolutions.jts.geom.Coordinate initialLocation,
com.vividsolutions.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, clearShape, createCursor, createCursor, createStandardSnappingPolicies, deactivate, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getPanel, getSnapManager, getTaskFrame, getWorkbench, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mouseMoved, 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 |
TOLERANCE
public static final int TOLERANCE
- See Also:
- Constant Field Values
ConstrainedMoveVertexTool
public ConstrainedMoveVertexTool(EnableCheckFactory checkFactory)
getCursor
public java.awt.Cursor getCursor()
- Specified by:
getCursor in interface CursorTool- Overrides:
getCursor in class AbstractCursorTool
getIcon
public javax.swing.Icon getIcon()
- Returns:
- null to use a default icon
getName
public java.lang.String getName()
- Description copied from interface:
CursorTool
- Returns a very brief description of this CursorTool.
- Specified by:
getName in interface CursorTool- Overrides:
getName in class AbstractCursorTool
- Returns:
- the name of this CursorTool
gestureFinished
protected void gestureFinished()
throws java.lang.Exception
- Specified by:
gestureFinished in class AbstractCursorTool
- Throws:
java.lang.Exception
mousePressed
public void mousePressed(java.awt.event.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 interface java.awt.event.MouseListener- Overrides:
mousePressed in class ConstrainedDragTool
moveVertices
public void moveVertices(com.vividsolutions.jts.geom.Coordinate initialLocation,
com.vividsolutions.jts.geom.Coordinate finalLocation)
throws java.lang.Exception
- Throws:
java.lang.Exception
getShape
protected java.awt.Shape getShape(java.awt.geom.Point2D source,
java.awt.geom.Point2D destination)
throws java.lang.Exception
- Overrides:
getShape in class ConstrainedDragTool
- Returns:
- null if nothing should be drawn
- Throws:
java.lang.Exception