com.vividsolutions.jump.workbench.ui.cursortool
Class SpecifyFeaturesTool

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
      extended by com.vividsolutions.jump.workbench.ui.cursortool.DragTool
          extended by com.vividsolutions.jump.workbench.ui.cursortool.SpecifyFeaturesTool
All Implemented Interfaces:
CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
Direct Known Subclasses:
AbstractClickSelectedLineStringsTool, AbstractDeleteVectorTool, DeleteVertexTool, FeatureInfoTool, SnapVerticesTool

public abstract class SpecifyFeaturesTool
extends DragTool

Allows the user to specify features by clicking on them or drawing a box around them. Works with invalid features (using EnvelopeIntersector).


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.DragTool
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSource
 
Constructor Summary
SpecifyFeaturesTool()
           
 
Method Summary
protected  java.util.Iterator candidateLayersIterator()
           
protected  java.util.Map layerToSpecifiedFeaturesMap()
          Returns the layers containing the specified features, and the specified features themselves.
static java.util.Map layerToSpecifiedFeaturesMap(java.util.Iterator layerIterator, com.vividsolutions.jts.geom.Envelope boxInModelCoordinates)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
protected  java.util.Set specifiedFeatures()
           
protected  java.util.Collection specifiedFeatures(java.util.Collection layers)
           
 
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.DragTool
getBoxInModelCoordinates, getModelDestination, getModelSource, getShape, getShape, getViewDestination, getViewSource, modelClickBuffer, mouseDragged, mousePressed, 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, gestureFinished, getColor, getCursor, getName, getPanel, getSnapManager, getTaskFrame, getWorkbench, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, 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
 
Methods inherited from interface com.vividsolutions.jump.workbench.ui.cursortool.CursorTool
getIcon
 

Constructor Detail

SpecifyFeaturesTool

public SpecifyFeaturesTool()
Method Detail

candidateLayersIterator

protected java.util.Iterator candidateLayersIterator()

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class AbstractCursorTool

specifiedFeatures

protected java.util.Set specifiedFeatures()
                                   throws java.awt.geom.NoninvertibleTransformException
Throws:
java.awt.geom.NoninvertibleTransformException

layerToSpecifiedFeaturesMap

protected java.util.Map layerToSpecifiedFeaturesMap()
                                             throws java.awt.geom.NoninvertibleTransformException
Returns the layers containing the specified features, and the specified features themselves.

Throws:
java.awt.geom.NoninvertibleTransformException

layerToSpecifiedFeaturesMap

public static java.util.Map layerToSpecifiedFeaturesMap(java.util.Iterator layerIterator,
                                                        com.vividsolutions.jts.geom.Envelope boxInModelCoordinates)
                                                 throws java.awt.geom.NoninvertibleTransformException
Throws:
java.awt.geom.NoninvertibleTransformException

specifiedFeatures

protected java.util.Collection specifiedFeatures(java.util.Collection layers)
                                          throws java.awt.geom.NoninvertibleTransformException
Parameters:
layers - Layers to filter in
Throws:
java.awt.geom.NoninvertibleTransformException