source: josm/trunk/src/org/openstreetmap/josm/data/SelectionChangedListener.java@ 12540

Last change on this file since 12540 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
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data;
3
4import java.util.Collection;
5
6import org.openstreetmap.josm.data.osm.DataSelectionListener;
7import org.openstreetmap.josm.data.osm.OsmPrimitive;
8import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
9
10/**
11 * This is a listener for selection changes through the dataset's data. Whenever
12 * a selection of any data member changes, the dataSet gets informed about this
13 * and fires a selectionChanged event.
14 *
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.
18 *
19 * @see DataSelectionListener For a more advanced listener class.
20 * @see SelectionEventManager For managing your selection events.
21 *
22 * @author imi
23 * @since 8 (creation)
24 * @since 10600 (functional interface)
25 */
26@FunctionalInterface
27public interface SelectionChangedListener {
28
29 /**
30 * Informs the listener that the selection in the dataset has changed.
31 * @param newSelection The new selection.
32 */
33 void selectionChanged(Collection<? extends OsmPrimitive> newSelection);
34}
Note: See TracBrowser for help on using the repository browser.