Class StoreAndCompare

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

    public class StoreAndCompare
    extends javax.swing.AbstractAction
    Determine if there have been changes made to the PanelPro data. If so, then a prompt will be displayed to store the data before the JMRI shutdown process proceeds.

    If the JMRI application is DecoderPro, the checking does not occur. If the PanelPro tables contain only 3 time related beans and no panels, the checking does not occur.

    The main check process uses the checkFile process which is used by the load and store tests. The current configuration is stored to a temporary file. This temp file is compared to the file that was loaded manually or via a start up action. If there are differences and the shutdown store check preference is enabled, a store request prompt is displayed. The prompt does not occur when running in headless mode.

    See Also:
    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 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)  
      static boolean checkFile​(java.io.File inFile1, java.io.File inFile2)  
      static boolean dataHasChanged()  
      static void requestStoreIfNeeded()  
      • 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)
      • checkFile

        public static boolean checkFile​(java.io.File inFile1,
                                        java.io.File inFile2)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception