001package jmri.jmrit.roster.swing; 002 003import jmri.jmrit.roster.Roster; 004 005/** 006 * A {@link RosterEntryComboBox} that lists all roster entries in the Roster 007 * without respect to a roster group. 008 * 009 * @author Randall Wood Copyright (C) 2011 010 * @see RosterEntryComboBox 011 */ 012public class GlobalRosterEntryComboBox extends RosterEntryComboBox { 013 014 /** 015 * Create a combo box with all roster entries in the default Roster. 016 */ 017 public GlobalRosterEntryComboBox() { 018 super(Roster.getDefault(), Roster.ALLENTRIES, null, null, null, null, null, null, null); 019 } 020 021 /** 022 * Create a combo box with all roster entries in an arbitrary Roster. 023 * 024 * @param roster roster to use. 025 */ 026 public GlobalRosterEntryComboBox(Roster roster) { 027 super(roster, Roster.ALLENTRIES, null, null, null, null, null, null, null); 028 } 029 030 /** 031 * Create a combo box with roster entries in the default Roster matching the 032 * specified attributes. 033 * @param roadName road name. 034 * @param roadNumber road number. 035 * @param dccAddress dcc address. 036 * @param mfg manufacturer. 037 * @param decoderMfgID decoder manufacturer. 038 * @param decoderVersionID decoder version id. 039 * @param id roster id. * 040 */ 041 public GlobalRosterEntryComboBox(String roadName, 042 String roadNumber, 043 String dccAddress, 044 String mfg, 045 String decoderMfgID, 046 String decoderVersionID, 047 String id) { 048 super(Roster.getDefault(), 049 Roster.ALLENTRIES, 050 roadName, 051 roadNumber, 052 dccAddress, 053 mfg, 054 decoderMfgID, 055 decoderVersionID, 056 id); 057 } 058 059 /** 060 * Create a combo box with roster entries in an arbitrary Roster matching 061 * the specified attributes. 062 * 063 * @param roster roster to use. 064 * @param roadName road name. 065 * @param roadNumber road number. 066 * @param dccAddress dcc address. 067 * @param mfg manufacturer. 068 * @param decoderMfgID decoder manufacturer. 069 * @param decoderVersionID decoder version id. 070 * @param id roster id. 071 */ 072 public GlobalRosterEntryComboBox(Roster roster, 073 String roadName, 074 String roadNumber, 075 String dccAddress, 076 String mfg, 077 String decoderMfgID, 078 String decoderVersionID, 079 String id) { 080 super(roster, 081 Roster.ALLENTRIES, 082 roadName, 083 roadNumber, 084 dccAddress, 085 mfg, 086 decoderMfgID, 087 decoderVersionID, 088 id); 089 090 } 091 092 @Override 093 public void update() { 094 update(Roster.ALLENTRIES, 095 _roadName, 096 _roadNumber, 097 _dccAddress, 098 _mfg, 099 _decoderMfgID, 100 _decoderVersionID, 101 _id); 102 } 103 104 @Override 105 public void update(String roadName, 106 String roadNumber, 107 String dccAddress, 108 String mfg, 109 String decoderMfgID, 110 String decoderVersionID, 111 String id) { 112 update(Roster.ALLENTRIES, 113 roadName, 114 roadNumber, 115 dccAddress, 116 mfg, 117 decoderMfgID, 118 decoderVersionID, 119 id); 120 } 121}