Class SelectionManager
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.SelectionManager
-
public class SelectionManager extends Object
Provides aggregate information for selected features, parts, and linestrings. Note that there is a difference between "selected features" and "features with selected items": the former consists of wholly selected features; the latter, wholly and partially selected features. To access a specific level of selection, use #getFeatureSelection, #getPartSelection, or #getLineStringSelection. "Parts" are components of GeometryCollections.To get wholly selected features (i.e. not those that just have selected parts or linestrings), use
getFeatureSelection().getFeaturesWithSelectedItems()
To get features that are selected or have selected parts or linestrings, use
getFeaturesWithSelectedItems()
-
-
Constructor Summary
Constructors Constructor Description SelectionManager(LayerViewPanel panel, LayerManagerProxy layerManagerProxy)
-
Method Summary
-
-
-
Constructor Detail
-
SelectionManager
public SelectionManager(LayerViewPanel panel, LayerManagerProxy layerManagerProxy)
-
-
Method Detail
-
createFeaturesFromSelectedItems
public Collection createFeaturesFromSelectedItems()
A feature may get split into two or more -- for example, if two linestrings of a feature are selected.
-
createFeaturesFromSelectedItems
public Collection createFeaturesFromSelectedItems(Layer layer)
-
clear
public void clear()
-
getFeatureSelection
public FeatureSelection getFeatureSelection()
-
getLineStringSelection
public LineStringSelection getLineStringSelection()
-
getSelections
public Collection getSelections()
- Returns:
- AbstractSelections
-
getSelectedItems
public Collection getSelectedItems()
"items" rather than "geometries" because the user may have selected a part of a Geometry (an element of a GeometryCollection or a ring of a Polygon).- Returns:
- a collection of Geometries
-
getSelectedItems
public Collection getSelectedItems(Layer layer)
-
getSelectedItems
public Collection getSelectedItems(Layer layer, Feature feature)
-
getSelectedItems
public Collection getSelectedItems(Layer layer, Feature feature, org.locationtech.jts.geom.Geometry geometry)
- Parameters:
geometry
- the feature's Geometry or equivalent; that is, a clone or similar enough Geometry from which Geometries can be retrieved using the selection indices
-
getLayersWithSelectedItems
public Collection getLayersWithSelectedItems()
-
getPartSelection
public PartSelection getPartSelection()
-
updatePanel
public void updatePanel()
-
setPanelUpdatesEnabled
public void setPanelUpdatesEnabled(boolean panelUpdatesEnabled)
-
getFeaturesWithSelectedItems
public Collection getFeaturesWithSelectedItems(Layer layer)
-
unselectItems
public void unselectItems(Layer layer)
-
unselectItems
public void unselectItems(Layer layer, Collection features)
-
unselectFromFeaturesWithModifiedItemCounts
public void unselectFromFeaturesWithModifiedItemCounts(Layer layer, Collection features, Collection oldFeatureClones)
-
getFeaturesWithSelectedItems
public Collection getFeaturesWithSelectedItems()
-
arePanelUpdatesEnabled
public boolean arePanelUpdatesEnabled()
-
dispose
public void dispose()
-
-