Last change
on this file since 13808 was 12098, checked in by michael2402, 7 years ago |
Allow to globally add the new selection listeners that get detailed events.
|
-
Property svn:eol-style
set to
native
|
File size:
1.2 KB
|
Rev | Line | |
---|
[6380] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
[8] | 2 | package org.openstreetmap.josm.data;
|
---|
| 3 |
|
---|
| 4 | import java.util.Collection;
|
---|
| 5 |
|
---|
[12098] | 6 | import org.openstreetmap.josm.data.osm.DataSelectionListener;
|
---|
[8] | 7 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
[12098] | 8 | import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
|
---|
[8] | 9 |
|
---|
| 10 | /**
|
---|
| 11 | * This is a listener for selection changes through the dataset's data. Whenever
|
---|
[655] | 12 | * a selection of any data member changes, the dataSet gets informed about this
|
---|
| 13 | * and fires a selectionChanged event.
|
---|
[1169] | 14 | *
|
---|
[655] | 15 | * Note that these events are not fired immediately but are inserted in the
|
---|
| 16 | * Swing event queue and packed together. So only one selection changed event
|
---|
| 17 | * is issued within a one message dispatch routine.
|
---|
[1169] | 18 | *
|
---|
[12098] | 19 | * @see DataSelectionListener For a more advanced listener class.
|
---|
| 20 | * @see SelectionEventManager For managing your selection events.
|
---|
| 21 | *
|
---|
[8] | 22 | * @author imi
|
---|
[10600] | 23 | * @since 8 (creation)
|
---|
| 24 | * @since 10600 (functional interface)
|
---|
[8] | 25 | */
|
---|
[10600] | 26 | @FunctionalInterface
|
---|
[8] | 27 | public interface SelectionChangedListener {
|
---|
| 28 |
|
---|
[1169] | 29 | /**
|
---|
| 30 | * Informs the listener that the selection in the dataset has changed.
|
---|
| 31 | * @param newSelection The new selection.
|
---|
| 32 | */
|
---|
[8512] | 33 | void selectionChanged(Collection<? extends OsmPrimitive> newSelection);
|
---|
[8] | 34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.