Class AbstractSelection
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.AbstractSelection
-
- Direct Known Subclasses:
FeatureSelection,LineStringSelection,PartSelection
public abstract class AbstractSelection extends Object
Superclass for holding a user-selected collection ofFeatureitems.
-
-
Constructor Summary
Constructors Constructor Description AbstractSelection(SelectionManager selectionManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected AbstractSelectiongetChild()Collection<Feature>getFeaturesWithSelectedItems()Collection<Feature>getFeaturesWithSelectedItems(Layer layer)Map<Feature,List<org.locationtech.jts.geom.Geometry>>getFeatureToSelectedItemCollectionMap(Layer layer)Returns a mapping of each feature to selected items in this feature.Map<Feature,Set<Integer>>getFeatureToSelectedItemIndexCollectionMap(Layer layer)Returns a mapping of each feature to indices of selected items in this feature.Collection<Layer>getLayersWithSelectedItems()protected AbstractSelectiongetParent()abstract StringgetRendererContentID()Set<Integer>getSelectedItemIndices(Layer layer, Feature feature)Returns indices of selected items in this feature.Collection<org.locationtech.jts.geom.Geometry>getSelectedItems()Collection<org.locationtech.jts.geom.Geometry>getSelectedItems(Layer layer)Collection<org.locationtech.jts.geom.Geometry>getSelectedItems(Layer layer, Feature feature)Collection<org.locationtech.jts.geom.Geometry>getSelectedItems(Layer layer, Feature feature, org.locationtech.jts.geom.Geometry geometry)Set<Integer>indices(org.locationtech.jts.geom.Geometry geometry, Collection<org.locationtech.jts.geom.Geometry> items)Returns indices of items in geometry.abstract List<org.locationtech.jts.geom.Geometry>items(org.locationtech.jts.geom.Geometry geometry)Each selection implementation has the responsability to return the list of items composing a parent geometry.List<org.locationtech.jts.geom.Geometry>items(org.locationtech.jts.geom.Geometry geometry, Collection<Integer> indices)Returns items having these indices in geometry.Collection<org.locationtech.jts.geom.Geometry>itemsNotSelectedInAncestors(Layer layer, Feature feature, Collection<org.locationtech.jts.geom.Geometry> items)protected abstract booleanselectedInAncestors(Layer layer, Feature feature, org.locationtech.jts.geom.Geometry item)voidselectItems(Layer layer, Feature feature)voidselectItems(Layer layer, Feature feature, Collection<org.locationtech.jts.geom.Geometry> items)voidselectItems(Layer layer, Collection features)voidselectItems(Layer layer, Map<Feature,List<org.locationtech.jts.geom.Geometry>> featureToItemCollectionMap)voidsetChild(AbstractSelection child)voidsetParent(AbstractSelection parent)voidunselectFromFeaturesWithModifiedItemCounts(Layer layer, Collection<Feature> features, Collection<Feature> oldFeatureClones)protected abstract voidunselectInDescendants(Layer layer, Feature feature, Collection<org.locationtech.jts.geom.Geometry> items)voidunselectItem(Layer layer, Feature feature, int selectedItemIndex)voidunselectItems()voidunselectItems(Layer layer)voidunselectItems(Layer layer, Feature feature)voidunselectItems(Layer layer, Feature feature, Collection<org.locationtech.jts.geom.Geometry> items)voidunselectItems(Layer layer, Collection features)voidunselectItems(Layer layer, Map<Feature,List<org.locationtech.jts.geom.Geometry>> featureToItemCollectionMap)
-
-
-
Constructor Detail
-
AbstractSelection
public AbstractSelection(SelectionManager selectionManager)
-
-
Method Detail
-
getRendererContentID
public abstract String getRendererContentID()
-
items
public abstract List<org.locationtech.jts.geom.Geometry> items(org.locationtech.jts.geom.Geometry geometry)
Each selection implementation has the responsability to return the list of items composing a parent geometry.
-
items
public List<org.locationtech.jts.geom.Geometry> items(org.locationtech.jts.geom.Geometry geometry, Collection<Integer> indices)
Returns items having these indices in geometry.- Parameters:
geometry- geometry to analyseindices- indices of wanted geometries
-
getFeatureToSelectedItemIndexCollectionMap
public Map<Feature,Set<Integer>> getFeatureToSelectedItemIndexCollectionMap(Layer layer)
Returns a mapping of each feature to indices of selected items in this feature. Note that some features in the map may not have selected items.
-
getSelectedItemIndices
public Set<Integer> getSelectedItemIndices(Layer layer, Feature feature)
Returns indices of selected items in this feature.
-
getFeatureToSelectedItemCollectionMap
public Map<Feature,List<org.locationtech.jts.geom.Geometry>> getFeatureToSelectedItemCollectionMap(Layer layer)
Returns a mapping of each feature to selected items in this feature.
-
getLayersWithSelectedItems
public Collection<Layer> getLayersWithSelectedItems()
-
getFeaturesWithSelectedItems
public Collection<Feature> getFeaturesWithSelectedItems()
-
getFeaturesWithSelectedItems
public Collection<Feature> getFeaturesWithSelectedItems(Layer layer)
-
getSelectedItems
public Collection<org.locationtech.jts.geom.Geometry> getSelectedItems()
-
getSelectedItems
public Collection<org.locationtech.jts.geom.Geometry> getSelectedItems(Layer layer)
-
getSelectedItems
public Collection<org.locationtech.jts.geom.Geometry> getSelectedItems(Layer layer, Feature feature)
-
getSelectedItems
public Collection<org.locationtech.jts.geom.Geometry> 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.
-
indices
public Set<Integer> indices(org.locationtech.jts.geom.Geometry geometry, Collection<org.locationtech.jts.geom.Geometry> items)
Returns indices of items in geometry.
-
unselectItems
public void unselectItems(Layer layer, Map<Feature,List<org.locationtech.jts.geom.Geometry>> featureToItemCollectionMap)
-
selectItems
public void selectItems(Layer layer, Map<Feature,List<org.locationtech.jts.geom.Geometry>> featureToItemCollectionMap)
-
selectItems
public void selectItems(Layer layer, Feature feature, Collection<org.locationtech.jts.geom.Geometry> items)
-
unselectItems
public void unselectItems(Layer layer, Feature feature, Collection<org.locationtech.jts.geom.Geometry> items)
-
itemsNotSelectedInAncestors
public Collection<org.locationtech.jts.geom.Geometry> itemsNotSelectedInAncestors(Layer layer, Feature feature, Collection<org.locationtech.jts.geom.Geometry> items)
-
selectedInAncestors
protected abstract boolean selectedInAncestors(Layer layer, Feature feature, org.locationtech.jts.geom.Geometry item)
-
unselectInDescendants
protected abstract void unselectInDescendants(Layer layer, Feature feature, Collection<org.locationtech.jts.geom.Geometry> items)
-
selectItems
public void selectItems(Layer layer, Collection features)
-
unselectFromFeaturesWithModifiedItemCounts
public void unselectFromFeaturesWithModifiedItemCounts(Layer layer, Collection<Feature> features, Collection<Feature> oldFeatureClones)
-
unselectItems
public void unselectItems()
-
unselectItems
public void unselectItems(Layer layer)
-
unselectItems
public void unselectItems(Layer layer, Collection features)
-
setChild
public void setChild(AbstractSelection child)
-
setParent
public void setParent(AbstractSelection parent)
-
getChild
protected AbstractSelection getChild()
-
getParent
protected AbstractSelection getParent()
-
-