|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.trains.TrainScheduleManager
public class TrainScheduleManager
Manages train schedules.
| Field Summary | |
|---|---|
protected Hashtable<String,TrainSchedule> |
_scheduleHashTable
|
static String |
LISTLENGTH_CHANGED_PROPERTY
|
| Constructor Summary | |
|---|---|
TrainScheduleManager()
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
deregister(TrainSchedule schedule)
Forget a NamedBean Object created outside the manager. |
void |
dispose()
|
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
JComboBox |
getComboBox()
Gets a JComboBox loaded with schedules. |
TrainSchedule |
getScheduleById(String id)
|
TrainSchedule |
getScheduleByName(String name)
|
List<String> |
getSchedulesByIdList()
Sort by schedule number |
List<String> |
getSchedulesByNameList()
Sort by schedule name |
JComboBox |
getSelectComboBox()
Gets a JComboBox loaded with schedules starting with an empty string. |
static TrainScheduleManager |
instance()
|
void |
load(Element values)
|
TrainSchedule |
newSchedule(String name)
Finds an existing schedule or creates a new schedule if needed requires schedule's name creates a unique id for this schedule |
int |
numEntries()
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
register(TrainSchedule schedule)
Remember a NamedBean Object created outside the manager. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
Element |
store()
Create an XML element to represent this Entry. |
void |
updateComboBox(JComboBox box)
Update a JComboBox with the latest schedules. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LISTLENGTH_CHANGED_PROPERTY
protected Hashtable<String,TrainSchedule> _scheduleHashTable
| Constructor Detail |
|---|
public TrainScheduleManager()
| Method Detail |
|---|
public static TrainScheduleManager instance()
public void dispose()
public int numEntries()
public TrainSchedule getScheduleByName(String name)
public TrainSchedule getScheduleById(String id)
public TrainSchedule newSchedule(String name)
name -
public void register(TrainSchedule schedule)
public void deregister(TrainSchedule schedule)
public List<String> getSchedulesByNameList()
public List<String> getSchedulesByIdList()
public JComboBox getComboBox()
public JComboBox getSelectComboBox()
public void updateComboBox(JComboBox box)
box - the JComboBox needing an update.public Element store()
public void load(Element values)
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpublic void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
protected void firePropertyChange(String p,
Object old,
Object n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||