Package org.openstreetmap.josm.data.osm
Interface DataSelectionListener.SelectionChangeEvent
-
- All Known Implementing Classes:
DataSelectionListener.AbstractSelectionEvent
,DataSelectionListener.SelectionAddEvent
,DataSelectionListener.SelectionRemoveEvent
,DataSelectionListener.SelectionReplaceEvent
,DataSelectionListener.SelectionToggleEvent
- Enclosing interface:
- DataSelectionListener
public static interface DataSelectionListener.SelectionChangeEvent
The event that is fired when the selection changed.- Since:
- 12048
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Set<OsmPrimitive>
getAdded()
Gets the primitives that have been added to the selection.java.util.Set<OsmPrimitive>
getOldSelection()
Gets the previous selectionjava.util.Set<OsmPrimitive>
getRemoved()
Gets the primitives that have been removed from the selection.java.util.Set<OsmPrimitive>
getSelection()
Gets the new selection.DataSet
getSource()
Gets the data set that triggered this selection event.default boolean
isNop()
Test if this event did not change anything.
-
-
-
Method Detail
-
getOldSelection
java.util.Set<OsmPrimitive> getOldSelection()
Gets the previous selectionThis collection cannot be modified and will not change.
- Returns:
- The old selection
-
getSelection
java.util.Set<OsmPrimitive> getSelection()
Gets the new selection. New elements are added to the end of the collection.This collection cannot be modified and will not change.
- Returns:
- The new selection
-
getRemoved
java.util.Set<OsmPrimitive> getRemoved()
Gets the primitives that have been removed from the selection.Those are the primitives contained in
getOldSelection()
but not ingetSelection()
This collection cannot be modified and will not change.
- Returns:
- The primitives that were removed
-
getAdded
java.util.Set<OsmPrimitive> getAdded()
Gets the primitives that have been added to the selection.Those are the primitives contained in
getSelection()
but not ingetOldSelection()
This collection cannot be modified and will not change.
- Returns:
- The primitives that were added
-
getSource
DataSet getSource()
Gets the data set that triggered this selection event.- Returns:
- The data set.
-
isNop
default boolean isNop()
Test if this event did not change anything.This will return
false
for all events that are sent to listeners, so you don't need to test it.- Returns:
true
if this did not change the selection.
-
-