com.vividsolutions.jump.demo.delineation
Class EditDelineationTool

java.lang.Object
  extended bycom.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
      extended bycom.vividsolutions.jump.workbench.ui.cursortool.DragTool
          extended bycom.vividsolutions.jump.demo.delineation.EditDelineationTool
All Implemented Interfaces:
CursorTool, java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

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 inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
 
Field Summary
 
Fields inherited from class com.vividsolutions.jump.workbench.ui.cursortool.DragTool
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSource
 
Constructor Summary
EditDelineationTool(java.util.Collection snapPolicies)
           
 
Method Summary
protected  void gestureFinished()
           
 java.awt.Cursor getCursor()
           
 javax.swing.Icon getIcon()
           
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.
 
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.DragTool
getBoxInModelCoordinates, getModelDestination, getModelSource, getShape, getViewDestination, getViewSource, modelClickBuffer, mouseDragged, mouseReleased, setModelDestination, setModelSource, setViewClickBuffer, setViewDestination, setViewSource, wasClick
 
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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EditDelineationTool

public EditDelineationTool(java.util.Collection snapPolicies)
Method Detail

getIcon

public javax.swing.Icon getIcon()
Returns:
null to use a default icon

getCursor

public java.awt.Cursor getCursor()
Specified by:
getCursor in interface CursorTool
Overrides:
getCursor in class AbstractCursorTool

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Description copied from class: DragTool
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 DragTool

getShape

protected java.awt.Shape getShape(java.awt.geom.Point2D source,
                                  java.awt.geom.Point2D destination)
                           throws java.awt.geom.NoninvertibleTransformException
Overrides:
getShape in class DragTool
Returns:
null if nothing should be drawn
Throws:
java.awt.geom.NoninvertibleTransformException

gestureFinished

protected void gestureFinished()
                        throws java.lang.Exception
Specified by:
gestureFinished in class AbstractCursorTool
Throws:
java.lang.Exception