Package jmri.configurexml
Class StoreXmlConfigAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.configurexml.LoadStoreBaseAction
-
- jmri.configurexml.StoreXmlConfigAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
- Direct Known Subclasses:
StoreXmlUserAction
public class StoreXmlConfigAction extends LoadStoreBaseAction
Store the JMRI configuration information as XML.Note that this does not store preferences, tools or user information in the file. This is not a complete store! See
ConfigureManager
for information on the various types of information stored in configuration files.- See Also:
XmlFile
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.ResourceBundle
rb
-
Constructor Summary
Constructors Constructor Description StoreXmlConfigAction()
StoreXmlConfigAction(java.lang.String s)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
static java.io.File
getFileCustom(javax.swing.JFileChooser fileChooser)
Do the filename handling: rescan directory to see any new files Prompt user to select a file adds .xml extension if needed if that file exists, check with userstatic java.io.File
getFileName(javax.swing.JFileChooser fileChooser)
-
Methods inherited from class jmri.configurexml.LoadStoreBaseAction
getAllFileChooser, getConfigFileChooser, getUserFileChooser
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
rb
static final java.util.ResourceBundle rb
-
-
Constructor Detail
-
StoreXmlConfigAction
public StoreXmlConfigAction()
-
StoreXmlConfigAction
public StoreXmlConfigAction(java.lang.String s)
-
-
Method Detail
-
getFileName
public static java.io.File getFileName(javax.swing.JFileChooser fileChooser)
-
getFileCustom
@CheckForNull public static java.io.File getFileCustom(javax.swing.JFileChooser fileChooser)
Do the filename handling:- rescan directory to see any new files
- Prompt user to select a file
- adds .xml extension if needed
- if that file exists, check with user
- Parameters:
fileChooser
- the file chooser to use- Returns:
- the file to store or null if the user declined to store a file
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
-
-