Class LoadXmlConfigAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
    Direct Known Subclasses:
    LoadXmlUserAction

    public class LoadXmlConfigAction
    extends LoadStoreBaseAction
    Load configuration information from an XML file.

    The file context for this is the "config" file chooser.

    This will load whatever information types are present in the file. See ConfigureManager for information on the various types of information stored in configuration files.

    See Also:
    XmlFile, Serialized Form
    • Field Summary

      • 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 Deprecated Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)  
      static java.io.File getFile​(javax.swing.JFileChooser fileChooser)
      Deprecated, for removal: This API element is subject to removal in a future version.
      static java.io.File getFile​(javax.swing.JFileChooser fileChooser, java.awt.Component component)
      Get the File from an Open File JFileChooser.
      static java.io.File getFileCustom​(javax.swing.JFileChooser fileChooser)
      Deprecated, for removal: This API element is subject to removal in a future version.
      static java.io.File getFileCustom​(javax.swing.JFileChooser fileChooser, java.awt.Component component)
      Get the File from a JFileChooser.
      protected boolean loadFile​(javax.swing.JFileChooser fileChooser, java.awt.Component component)
      Load a File from a given JFileChooser.
      • 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
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
      • loadFile

        protected boolean loadFile​(@Nonnull
                                   javax.swing.JFileChooser fileChooser,
                                   @CheckForNull
                                   java.awt.Component component)
        Load a File from a given JFileChooser.
        Parameters:
        fileChooser - JFileChooser to use for file selection
        component - a Component which has called the File Chooser.
        Returns:
        true if successful
      • getFile

        @CheckForNull
        @Deprecated(since="5.7.8",
                    forRemoval=true)
        public static java.io.File getFile​(@Nonnull
                                           javax.swing.JFileChooser fileChooser)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Get the File from a given JFileChooser.
        Parameters:
        fileChooser - the JFileChooser for the file.
        Returns:
        the selected File.
      • getFile

        @CheckForNull
        public static java.io.File getFile​(@Nonnull
                                           javax.swing.JFileChooser fileChooser,
                                           @CheckForNull
                                           java.awt.Component component)
        Get the File from an Open File JFileChooser. If a Component is provided, this helps the JFileChooser to not get stuck behind an Always On Top Window.
        Parameters:
        fileChooser - the FileChooser to get from.
        component - a Component within a JFrame / Window / Popup Menu, or the JFrame or Window itself.
        Returns:
        the File, may be null if none selected.
      • getFileCustom

        @CheckForNull
        public static java.io.File getFileCustom​(@Nonnull
                                                 javax.swing.JFileChooser fileChooser,
                                                 @CheckForNull
                                                 java.awt.Component component)
        Get the File from a JFileChooser. If a Component is provided, this helps the JFileChooser to not get stuck behind an Always On Top Window.
        Parameters:
        fileChooser - the FileChooser to get from.
        component - a Component within a JFrame / Window / Popup Menu, or the JFrame or Window itself.
        Returns:
        the File, may be null if none selected.