Class ObservableFeatureCollection
- java.lang.Object
-
- org.locationtech.jts.jump.feature.FeatureCollectionWrapper
-
- org.locationtech.jts.jump.workbench.model.ObservableFeatureCollection
-
- All Implemented Interfaces:
FeatureCollection
public class ObservableFeatureCollection extends FeatureCollectionWrapper
Notifies listeners when features are added to or removed from a FeatureCollection.Prefer #addAll and #removeAll to #add and #remove, so that fewer events will be fired.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceObservableFeatureCollection.ListenerListens for features being added to or removed from a FeatureCollection.
-
Constructor Summary
Constructors Constructor Description ObservableFeatureCollection(FeatureCollection fc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Feature feature)Adds a feature to this collection.voidadd(ObservableFeatureCollection.Listener listener)voidaddAll(Collection features)Adds multiple features to this collection.Collectionremove(org.locationtech.jts.geom.Envelope env)Removes the features which intersect the given envelopevoidremove(Feature feature)Removes a feature from this collection.voidremoveAll(Collection features)Removes multiple features from this collection.-
Methods inherited from class org.locationtech.jts.jump.feature.FeatureCollectionWrapper
checkNotWrappingSameClass, clear, getEnvelope, getFeatures, getFeatureSchema, getUltimateWrappee, getWrappee, hasWrapper, isEmpty, iterator, query, size
-
-
-
-
Constructor Detail
-
ObservableFeatureCollection
public ObservableFeatureCollection(FeatureCollection fc)
-
-
Method Detail
-
add
public void add(ObservableFeatureCollection.Listener listener)
-
add
public void add(Feature feature)
Description copied from interface:FeatureCollectionAdds a feature to this collection.- Specified by:
addin interfaceFeatureCollection- Overrides:
addin classFeatureCollectionWrapper- Parameters:
feature- a Feature to add to the end of this collection
-
remove
public void remove(Feature feature)
Description copied from interface:FeatureCollectionRemoves a feature from this collection.- Specified by:
removein interfaceFeatureCollection- Overrides:
removein classFeatureCollectionWrapper- Parameters:
feature- a Feature to remove from this collection
-
addAll
public void addAll(Collection features)
Description copied from interface:FeatureCollectionAdds multiple features to this collection. To be preferred over #add for adding multiple features, because in some systems (like the JUMP Workbench) fewer events will be fired.- Specified by:
addAllin interfaceFeatureCollection- Overrides:
addAllin classFeatureCollectionWrapper
-
removeAll
public void removeAll(Collection features)
Description copied from interface:FeatureCollectionRemoves multiple features from this collection. To be preferred over #remove for removing multiple features, because in some systems (like the JUMP Workbench) fewer events will be fired.- Specified by:
removeAllin interfaceFeatureCollection- Overrides:
removeAllin classFeatureCollectionWrapper
-
remove
public Collection remove(org.locationtech.jts.geom.Envelope env)
Description copied from interface:FeatureCollectionRemoves the features which intersect the given envelope- Specified by:
removein interfaceFeatureCollection- Overrides:
removein classFeatureCollectionWrapper- Returns:
- the removed features
-
-