001 // License: GPL. Copyright 2007 by Immanuel Scholz and others 002 package org.openstreetmap.josm.data; 003 004 import java.util.Collection; 005 006 import 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 */ 019 public interface SelectionChangedListener { 020 021 /** 022 * Informs the listener that the selection in the dataset has changed. 023 * @param newSelection The new selection. 024 */ 025 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection); 026 }