gov.nih.nlm.mms
Class SaveConfigAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended bygov.nih.nlm.mms.SaveConfigAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
BeginSubsetAction, ExitAction, OpenConfigAction

public class SaveConfigAction
extends AbstractAction

Saves a config file. Used for the File->Save Configuration menu of MetamorphoSysGUI.

Author:
Brian Carlsen, Deborah Shapiro
See Also:
Serialized Form

Nested Class Summary
protected static class SaveConfigAction.PropertiesFileFilter
          FileFilter class for JFileChooser to limit files to .properties file extension.
 
Field Summary
protected static File lastConfigFile
           
protected  MetamorphoSys mms
           
protected  Frame owner
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
SaveConfigAction(MetamorphoSys mms, Frame owner)
          Instantiates a SaveConfigAction.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Saves the UserConfiguration to a file.
 void backupConfig()
          Backup the config file to mmsys.prop.sav.
protected  void saveConfig()
          Helper method for saving the configuration.
 
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
 

Field Detail

mms

protected MetamorphoSys mms

owner

protected Frame owner

lastConfigFile

protected static File lastConfigFile
Constructor Detail

SaveConfigAction

public SaveConfigAction(MetamorphoSys mms,
                        Frame owner)
Instantiates a SaveConfigAction.

Parameters:
mms - the MetamorphoSys
owner - parent Component
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Saves the UserConfiguration to a file.

Parameters:
e - an ActionEvent

saveConfig

protected void saveConfig()
Helper method for saving the configuration.


backupConfig

public void backupConfig()
Backup the config file to mmsys.prop.sav.



Copyright ©2005