gov.nih.nlm.mms
Class OpenConfigAction

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

public class OpenConfigAction
extends SaveConfigAction

Opens a configuration file. Used for the File->Open Configuration menu of MetamorphoSysGUI.

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

Nested Class Summary
 
Nested classes inherited from class gov.nih.nlm.mms.SaveConfigAction
SaveConfigAction.PropertiesFileFilter
 
Field Summary
protected  boolean cancelled
           
 
Fields inherited from class gov.nih.nlm.mms.SaveConfigAction
lastConfigFile, mms, 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
OpenConfigAction(MetamorphoSys mms, Frame owner)
          Instantiates an OpenConfigAction.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Opens the specified configuration file.
 boolean isCancelled()
          Indicates whether or not the file chooser was cancelled.
protected  void openConfig()
          Open the configuration, save if changed.
protected  void refreshGui()
          Refresh the GUI.
 void setFileToOpen(File to_open)
          Sets the file to be opened.
 
Methods inherited from class gov.nih.nlm.mms.SaveConfigAction
backupConfig, saveConfig
 
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

cancelled

protected boolean cancelled
Constructor Detail

OpenConfigAction

public OpenConfigAction(MetamorphoSys mms,
                        Frame owner)
Instantiates an OpenConfigAction.

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

setFileToOpen

public void setFileToOpen(File to_open)
Sets the file to be opened.

Parameters:
to_open - File to be opened

actionPerformed

public void actionPerformed(ActionEvent e)
Opens the specified configuration file.

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class SaveConfigAction
Parameters:
e - an ActionEvent

openConfig

protected void openConfig()
Open the configuration, save if changed.


isCancelled

public boolean isCancelled()
Indicates whether or not the file chooser was cancelled.

Returns:
true if so; false if not

refreshGui

protected void refreshGui()
Refresh the GUI.



Copyright ©2005