|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.locations.ScheduleManager
public class ScheduleManager
Manages schedules.
| Field Summary | |
|---|---|
protected Hashtable<String,Schedule> |
_scheduleHashTable
|
static String |
LISTLENGTH_CHANGED_PROPERTY
|
| Constructor Summary | |
|---|---|
ScheduleManager()
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
deregister(Schedule 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. |
Schedule |
getScheduleById(String id)
|
Schedule |
getScheduleByName(String name)
|
List<String> |
getSchedulesByIdList()
Sort by schedule number |
List<String> |
getSchedulesByNameList()
Sort by schedule name |
JComboBox |
getSidingsByScheduleComboBox(Schedule schedule)
Gets a JComboBox with a list of spurs that use this schedule. |
static ScheduleManager |
instance()
|
Schedule |
newSchedule(String name)
Finds an exsisting 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)
Check for car type and road name changes. |
void |
register(Schedule schedule)
Remember a NamedBean Object created outside the manager. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
replaceLoad(String type,
String oldLoad,
String newLoad)
Replaces car loads in all schedules with specific car type. |
void |
replaceRoad(String oldRoad,
String newRoad)
Replaces car roads in all schedules. |
void |
replaceType(String oldType,
String newType)
Replaces car type in all schedules. |
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,Schedule> _scheduleHashTable
| Constructor Detail |
|---|
public ScheduleManager()
| Method Detail |
|---|
public static ScheduleManager instance()
public void dispose()
public int numEntries()
public Schedule getScheduleByName(String name)
public Schedule getScheduleById(String id)
public Schedule newSchedule(String name)
name -
public void register(Schedule schedule)
public void deregister(Schedule schedule)
public List<String> getSchedulesByNameList()
public List<String> getSchedulesByIdList()
public JComboBox getComboBox()
public void updateComboBox(JComboBox box)
box - the JComboBox needing an update.
public void replaceType(String oldType,
String newType)
oldType - car type to be replaced.newType - replacement car type.
public void replaceRoad(String oldRoad,
String newRoad)
oldRoad - car road to be replaced.newRoad - replacement car road.
public void replaceLoad(String type,
String oldLoad,
String newLoad)
type - car type.oldLoad - car load to be replaced.newLoad - replacement car load.public JComboBox getSidingsByScheduleComboBox(Schedule schedule)
schedule - The schedule for this JComboBox.
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 | |||||||||