Class 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  
      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields 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
    • 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 user
      static java.io.File getFileName​(javax.swing.JFileChooser fileChooser)  
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Field Detail

      • rb

        static final java.util.ResourceBundle rb
    • 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:
        1. rescan directory to see any new files
        2. Prompt user to select a file
        3. adds .xml extension if needed
        4. 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)