Class TrainManualBuild
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.jmrit.operations.trains.manualtrainbuilder.TrainManualBuild
- All Implemented Interfaces:
PropertyChangeListener,EventListener,PropertyChangeFirer,PropertyChangeProvider
Train Manual Build. Allows a user to manually assign cars to a train.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected intprotected Hashtable<String,TrainManualBuildItem> protected intprotected Stringstatic final Stringstatic final StringFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionTrainManualBuild(String id, String trainId) TrainManualBuild(org.jdom2.Element e) Construct this Entry from XML. -
Method Summary
Modifier and TypeMethodDescriptionaddItem()Adds build item to the end of this manual buildaddItem(int sequence) Add a manual build item at a specific place (sequence) in the manual build.voidDelete a manual build itemvoiddispose()getId()getItemById(String id) Get a ManualBuildItem by idgetItemBySequenceId(int sequenceId) Get a list of ManualBuildItems sorted by sequence orderintgetSize()voidPlaces a ManualBuildItem later in the manualBuildvoidPlaces a ManualBuildItem earlier in the manual buildvoidvoidRemember a NamedBean Object created outside the manager.voidsetComment(String comment) protected voidsetDirtyAndFirePropertyChange(String p, Object old, Object n) voidsetTrainId(String trainId) org.jdom2.Elementstore()Create an XML element to represent this Entry.Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
_id
-
_trainId
-
_comment
-
_manualBuildHashTable
-
_IdNumber
-
_sequenceNum
-
LISTCHANGE_CHANGED_PROPERTY
- See Also:
-
DISPOSE
- See Also:
-
-
Constructor Details
-
TrainManualBuild
-
TrainManualBuild
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-config.xml- Parameters:
e- Consist XML element
-
-
Method Details
-
getId
-
setTrainId
-
getTrainId
-
getTrainName
-
getSize
-
setComment
-
getComment
-
dispose
-
addItem
Adds build item to the end of this manual build- Returns:
- ManualBuildItem created
-
addItem
Add a manual build item at a specific place (sequence) in the manual build. Allowable sequence numbers are 0 to max size of manual build. 0 = start of list.- Parameters:
sequence- Where in the Manual Build to add the item.- Returns:
- manual build item
-
register
Remember a NamedBean Object created outside the manager.- Parameters:
mbi- The manual build item to add.
-
deleteItem
Delete a manual build item- Parameters:
mbi- The manual build item to delete.
-
getItemById
Get a ManualBuildItem by id- Parameters:
id- The string id of the ManualBuildItem.- Returns:
- manual build item
-
getItemsBySequenceList
Get a list of ManualBuildItems sorted by sequence order- Returns:
- list of ManualBuildItems ordered by sequence
-
moveItemUp
Places a ManualBuildItem earlier in the manual build- Parameters:
mbi- The ManualBuildItem to move.
-
moveItemDown
Places a ManualBuildItem later in the manualBuild- Parameters:
mbi- The ManualBuildItem to move.
-
getItemBySequenceId
-
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
- Specified by:
propertyChangein interfacePropertyChangeListener
-
setDirtyAndFirePropertyChange
-