com.mtp.pounder.controller
Class SaveAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--com.mtp.pounder.controller.SaveAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, PounderConstants, Serializable
Direct Known Subclasses:
SaveAsAction

public class SaveAction
extends AbstractAction
implements PounderConstants

Action for saving a PounderModel.

Author:
Matthew Pekar
See Also:
Serialized Form

Field Summary
protected  PounderController controller
           
protected  PounderModel model
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface com.mtp.pounder.PounderConstants
FILE_EXTENSION, FILE_FORMAT_VERSION, VERSION
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
SaveAction(PounderController c, PounderModel pm)
           
SaveAction(String name, PounderController c, PounderModel pm)
          Customized versions of SaveAction use this constructor, which does not add any action information.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
protected  File fixExtension(File f)
          Return a new File with the extension fixed, if necessary.
protected  File getFileForWriting()
           
protected  File showFileChooser()
           
 
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

controller

protected PounderController controller

model

protected PounderModel model
Constructor Detail

SaveAction

public SaveAction(String name,
                  PounderController c,
                  PounderModel pm)
Customized versions of SaveAction use this constructor, which does not add any action information.


SaveAction

public SaveAction(PounderController c,
                  PounderModel pm)
Method Detail

getFileForWriting

protected File getFileForWriting()

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

fixExtension

protected File fixExtension(File f)
Return a new File with the extension fixed, if necessary.


showFileChooser

protected File showFileChooser()


Copyright © 2002 Matthew Pekar. All Rights Reserved.