Class TrainSchedule
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.jmrit.operations.trains.schedules.TrainSchedule
- All Implemented Interfaces:
PropertyChangeFirer,PropertyChangeProvider
Represents a schedule for trains. For example, can be a day of the week. Useful when
determining which trains to build and run.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionTrainSchedule(String id, String name) TrainSchedule(org.jdom2.Element e) Construct this Entry from XML. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTrainId(String id) Adds the train id for a train that needs to be builtbooleanUsed to determine if train is to be built using this schedulegetId()getName()voidvoidremoveTrainId(String id) Removes the train id for a train that needs to be builtvoidsetComment(String comment) protected voidsetDirtyAndFirePropertyChange(String p, Object old, Object n) voidorg.jdom2.Elementstore()Create an XML element to represent this Entry.toString()Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
NONE
- See Also:
-
ANY
- See Also:
-
NAME_CHANGED_PROPERTY
- See Also:
-
SCHEDULE_CHANGED_PROPERTY
- See Also:
-
_id
-
_name
-
_comment
-
_trainIds
-
-
Constructor Details
-
TrainSchedule
-
TrainSchedule
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-trains.xml- Parameters:
e- Consist XML element
-
-
Method Details
-
getId
-
setName
-
toString
-
getName
-
setComment
-
getComment
-
addTrainId
Adds the train id for a train that needs to be built- Parameters:
id- The train id
-
removeTrainId
Removes the train id for a train that needs to be built- Parameters:
id- The train id
-
containsTrainId
Used to determine if train is to be built using this schedule- Parameters:
id- the id of the train to be tested- Returns:
- true if this train's build enable should be set
-
store
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-config.xml.- Returns:
- Contents in a JDOM Element
-
propertyChange
-
setDirtyAndFirePropertyChange
-