001package jmri.jmrit.roster; 002 003import java.beans.PropertyChangeListener; 004 005/** 006 * The getter method for a roster entry selection. 007 * <p> 008 * Classes that implement this interface will be able to provide a source for 009 * getting a roster entry or entries to other objects that manipulate roster 010 * entries. 011 * <p> 012 * <b>Note:</b> Classes implementing this interface must fire a 013 * propertyChangeEvent for the <i>selectedRosterEntries</i> property whenever 014 * the selected roster entries change. 015 * 016 * @author Randall Wood 017 */ 018public interface RosterEntrySelector { 019 020 static final String SELECTED_ROSTER_ENTRIES = "selectedRosterEntries"; 021 022 /** 023 * Get the currently selected roster entries. Since the selection could 024 * contain multiple roster entries, this returns an array of RosterEntry 025 * instead of a single RosterEntry. 026 * 027 * @return an array of RosterEntries 028 */ 029 public RosterEntry[] getSelectedRosterEntries(); 030 031 public void addPropertyChangeListener(PropertyChangeListener listener); 032 033 public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener); 034 035 public void removePropertyChangeListener(PropertyChangeListener listener); 036 037 public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener); 038 039}