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 */ 019public interface SelectionChangedListener { 020 021 /** 022 * Informs the listener that the selection in the dataset has changed. 023 * @param newSelection The new selection. 024 */ 025 void selectionChanged(Collection<? extends OsmPrimitive> newSelection); 026}