Package jmri.jmrit.operations.automation
Class Automation
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.jmrit.operations.automation.Automation
- All Implemented Interfaces:
PropertyChangeListener,EventListener,PropertyChangeFirer,PropertyChangeProvider
Automation for operations
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMap<String,AutomationItem> protected Stringprotected AutomationItemprotected AutomationItemprotected Stringprotected intprotected AutomationItemprotected Stringprotected booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionAutomation(String id, String name) Automation(org.jdom2.Element e) Construct this Entry from XML. -
Method Summary
Modifier and TypeMethodDescriptionaddItem()addNewItem(int sequence) Add a automation item at a specific place (sequence) in the automation Allowable sequence numbers are 0 to max size of automation. 0 = start of list.voidcopyAutomation(Automation automation) Copies automation.voiddeleteItem(AutomationItem item) Delete a AutomationItemvoiddispose()Gets a JComboBox loaded with automation items.getId()getItemById(String id) Get a AutomationItem by idgetItemBySequenceId(int sequenceId) Get a list of AutomationItems sorted by automation ordergetName()intgetSize()booleanbooleanbooleanUsed to determine if automation is at the start of its sequence.booleanvoidmoveItemDown(AutomationItem item) Places a AutomationItem later in the automation.voidmoveItemUp(AutomationItem item) Places a AutomationItem earlier in the automationvoidvoidregister(AutomationItem item) Remember a NamedBean Object created outside the manager.voidreset()voidvoidresume()voidrun()voidsetComment(String comment) voidprotected voidsetDirtyAndFirePropertyChange(String p, Object old, Object n) voidvoidvoidsetRunning(boolean running) voidstep()voidstop()org.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
-
_id
-
_name
-
_comment
-
_currentAutomationItem
-
_lastAutomationItem
-
_gotoAutomationItem
-
_running
-
_automationHashTable
-
_IdNumber
-
REGEX
- See Also:
-
LISTCHANGE_CHANGED_PROPERTY
- See Also:
-
CURRENT_ITEM_CHANGED_PROPERTY
- See Also:
-
RUNNING_CHANGED_PROPERTY
- See Also:
-
DISPOSE
- See Also:
-
-
Constructor Details
-
Automation
-
Automation
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-trains.dtd- Parameters:
e- Consist XML element
-
-
Method Details
-
getId
-
setName
-
toString
-
getName
-
getSize
-
setComment
-
getComment
-
getCurrentActionString
-
getActionStatus
-
getMessage
-
setRunning
-
isRunning
-
isActionRunning
-
isReadyToRun
Used to determine if automation is at the start of its sequence.- Returns:
- true if the current action is the first action in the list.
-
run
-
step
-
stop
-
resume
-
reset
-
resetAutomationItems
-
setNextAutomationItem
-
setCurrentAutomationItem
-
getCurrentAutomationItem
-
getLastAutomationItem
-
isLastActionSuccessful
-
dispose
-
addItem
-
addNewItem
Add a automation item at a specific place (sequence) in the automation Allowable sequence numbers are 0 to max size of automation. 0 = start of list.- Parameters:
sequence- where to add a new item in the automation- Returns:
- automation item
-
register
Remember a NamedBean Object created outside the manager.- Parameters:
item- the item to be added to this automation.
-
deleteItem
Delete a AutomationItem- Parameters:
item- The item to be deleted.
-
getItemById
Get a AutomationItem by id- Parameters:
id- The string id of the item.- Returns:
- automation item
-
getItemsBySequenceList
Get a list of AutomationItems sorted by automation order- Returns:
- list of AutomationItems ordered by sequence
-
getComboBox
Gets a JComboBox loaded with automation items.- Returns:
- JComboBox with a list of automation items.
-
moveItemUp
Places a AutomationItem earlier in the automation- Parameters:
item- The item to move up one position in the automation.
-
moveItemDown
Places a AutomationItem later in the automation.- Parameters:
item- The item to move later in the automation.
-
getItemBySequenceId
-
copyAutomation
Copies automation.- Parameters:
automation- the automation to copy
-
store
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-trains.dtd.- Returns:
- Contents in a JDOM Element
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
setDirtyAndFirePropertyChange
-