Package jmri.jmrit.symbolicprog
Class TcsExportAction
java.lang.Object
javax.swing.AbstractAction
jmri.jmrit.symbolicprog.TcsExportAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Action to export the RosterEntry values to a TCS-format data file.
TODO: Note: This first does an update of the RosterEntry from the GUI, then writes out from the Roster entry. This means that they (RE and GUI) now agree, which has the side effect of erasing the dirty state. Better would be to do the export directly from the GUI.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) JFileChooser(package private) PaneProgFrame(package private) CvTableModelCvTableModel to load(package private) RosterEntry(package private) VariableTableModelVariableTableModel to loadFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
ConstructorsConstructorDescriptionTcsExportAction(String actionName, CvTableModel mModel, VariableTableModel vModel, RosterEntry rosterEntry, PaneProgFrame pParent) -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidformatTcsVirtualNodeDefinition(PrintStream str, RosterEntry rosterEntry, CvTableModel model, VariableTableModel vModel) Format the contents of the locomotive definition.(package private) static intMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
fileChooser
-
frame
-
rosterEntry
-
mModel
CvTableModel to load -
vModel
VariableTableModel to load
-
-
Constructor Details
-
TcsExportAction
public TcsExportAction(String actionName, CvTableModel mModel, VariableTableModel vModel, RosterEntry rosterEntry, PaneProgFrame pParent)
-
-
Method Details
-
actionPerformed
-
formatTcsVirtualNodeDefinition
public static void formatTcsVirtualNodeDefinition(PrintStream str, RosterEntry rosterEntry, CvTableModel model, VariableTableModel vModel) Format the contents of the locomotive definition. This method is public static so it can be used elsewhere for e.g. direct writing to a node.- Parameters:
str- receives the formatted definition StringrosterEntry- defines the information to storemodel- provides CV contents as availablevModel- provides variable contents as available
-
intFromFunctionString
-