Class SpecifyFeaturesTool
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
com.vividsolutions.jump.workbench.ui.cursortool.DragTool
com.vividsolutions.jump.workbench.ui.cursortool.SpecifyFeaturesTool
- All Implemented Interfaces:
CursorTool, MouseListener, MouseMotionListener, EventListener
- Direct Known Subclasses:
AbstractClickSelectedLineStringsTool, AbstractDeleteVectorTool, DeleteVertexTool, FeatureInfoTool, SnapVerticesTool
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 AbstractCursorTool
AbstractCursorTool.Listener -
Field Summary
Fields inherited from class DragTool
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSourceFields inherited from class AbstractCursorTool
isLinuxOS, panel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the layers containing the specified features, and the specified features themselves.layerToSpecifiedFeaturesMap(Iterator<Layer> layerIterator, org.locationtech.jts.geom.Envelope boxInModelCoordinates) voidprotected Collection<Feature> specifiedFeatures(Collection<Layer> layers) Methods inherited from class DragTool
deactivate, getBoxInModelCoordinates, getModelDestination, getModelSource, getShape, getShape, getViewDestination, getViewSource, modelClickBuffer, mouseDragged, mousePressed, mouseReleased, setModelDestination, setModelSource, setViewClickBuffer, setViewDestination, setViewSource, wasClickMethods inherited from class AbstractCursorTool
activate, add, allowSnapping, cancelGesture, check, cleanup, clearImage, clearShape, componentWithFocusIsHandledByCursorTools, createCursor, createCursor, createCursor, createStandardSnappingPolicies, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, execute, fireGestureFinished, gestureFinished, getColor, getCursor, getImage, getImagePosition, getName, getPanel, getPanel, getSnapManager, getStroke, getTaskFrame, getWorkbench, getWorkbenchContext, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseEntered, mouseExited, mouseMoved, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setControlPressed, setFilling, setPanel, setShiftPressed, setStroke, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CursorTool
getIcon
-
Constructor Details
-
SpecifyFeaturesTool
-
-
Method Details
-
candidateLayersIterator
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classAbstractCursorTool
-
specifiedFeatures
- Throws:
NoninvertibleTransformException
-
layerToSpecifiedFeaturesMap
protected Map<Layer, Set<Feature>> layerToSpecifiedFeaturesMap() throws NoninvertibleTransformExceptionReturns the layers containing the specified features, and the specified features themselves.- Returns:
- a Map mapping layers to features of this layer and intersecting the box
- Throws:
NoninvertibleTransformException- if a problem occurs during intersection operation
-
layerToSpecifiedFeaturesMap
public static Map<Layer, Set<Feature>> layerToSpecifiedFeaturesMap(Iterator<Layer> layerIterator, org.locationtech.jts.geom.Envelope boxInModelCoordinates) throws NoninvertibleTransformException - Throws:
NoninvertibleTransformException
-
specifiedFeatures
protected Collection<Feature> specifiedFeatures(Collection<Layer> layers) throws NoninvertibleTransformException - Parameters:
layers- Layers to filter in- Returns:
- a collection of features belonging to layers and intersecting the box
- Throws:
NoninvertibleTransformException- if a problem occurs during intersection operation
-