Class EditDelineationTool
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
-
- org.locationtech.jts.jump.workbench.ui.cursortool.DragTool
-
- org.locationtech.jts.jump.demo.delineation.EditDelineationTool
-
- All Implemented Interfaces:
MouseListener,MouseMotionListener,EventListener,CursorTool
public class EditDelineationTool extends DragTool
Enables the user to move a vertex of an existing delineation. Thus, the user can take an unanchored vertex and anchor it to a point on a coastline.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
-
-
Field Summary
-
Fields inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.DragTool
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSource
-
-
Constructor Summary
Constructors Constructor Description EditDelineationTool(Collection snapPolicies)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgestureFinished()CursorgetCursor()IcongetIcon()protected ShapegetShape(Point2D source, Point2D destination)voidmousePressed(MouseEvent e)Begins handling of the drag.-
Methods inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.DragTool
getBoxInModelCoordinates, getModelDestination, getModelSource, getShape, getViewDestination, getViewSource, modelClickBuffer, mouseDragged, mouseReleased, setModelDestination, setModelSource, setViewClickBuffer, setViewDestination, setViewSource, wasClick
-
Methods inherited from class org.locationtech.jts.jump.workbench.ui.cursortool.AbstractCursorTool
activate, add, allowSnapping, cancelGesture, check, cleanup, clearShape, createCursor, createCursor, createStandardSnappingPolicies, deactivate, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getName, 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
-
-
-
-
Constructor Detail
-
EditDelineationTool
public EditDelineationTool(Collection snapPolicies)
-
-
Method Detail
-
getIcon
public Icon getIcon()
- Returns:
- null to use a default icon
-
getCursor
public Cursor getCursor()
- Specified by:
getCursorin interfaceCursorTool- Overrides:
getCursorin classAbstractCursorTool
-
mousePressed
public void mousePressed(MouseEvent e)
Description copied from class:DragToolBegins handling of the drag. Subclasses can prevent handling of the drag by overriding this method and not calling it.- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classDragTool
-
getShape
protected Shape getShape(Point2D source, Point2D destination) throws NoninvertibleTransformException
- Overrides:
getShapein classDragTool- Returns:
- null if nothing should be drawn
- Throws:
NoninvertibleTransformException
-
gestureFinished
protected void gestureFinished() throws Exception- Specified by:
gestureFinishedin classAbstractCursorTool- Throws:
Exception
-
-