001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data; 003 004import java.util.Collection; 005 006import org.openstreetmap.josm.data.osm.OsmPrimitive; 007 008/** 009 * This is a listener for selection changes through the dataset's data. Whenever 010 * a selection of any data member changes, the dataSet gets informed about this 011 * and fires a selectionChanged event. 012 * 013 * Note that these events are not fired immediately but are inserted in the 014 * Swing event queue and packed together. So only one selection changed event 015 * is issued within a one message dispatch routine. 016 * 017 * @author imi 018 * @since 8 (creation) 019 * @since 10600 (functional interface) 020 */ 021@FunctionalInterface 022public interface SelectionChangedListener { 023 024 /** 025 * Informs the listener that the selection in the dataset has changed. 026 * @param newSelection The new selection. 027 */ 028 void selectionChanged(Collection<? extends OsmPrimitive> newSelection); 029}