dsto.dfc.swing.persistence
Class BasicDocumentSaveCommand

java.lang.Object
  extended by dsto.dfc.swing.commands.AbstractCommand
      extended by dsto.dfc.swing.commands.AbstractMutableCommand
          extended by dsto.dfc.swing.commands.BasicFileSaveCommand
              extended by dsto.dfc.swing.persistence.BasicDocumentSaveCommand
All Implemented Interfaces:
Command, Iconic, Copyable, PropertyEventSource, ActionListener, PropertyChangeListener, Cloneable, EventListener

public class BasicDocumentSaveCommand
extends BasicFileSaveCommand
implements PropertyChangeListener

Command to invoke the save () method on a Document. This command is only enabled then the document has been changed (Document.isChanged().

Version:
$Revision$
Author:
Matthew Phillips

Field Summary
 
Fields inherited from class dsto.dfc.swing.commands.BasicFileSaveCommand
owner
 
Fields inherited from class dsto.dfc.swing.commands.AbstractMutableCommand
listeners
 
Fields inherited from class dsto.dfc.swing.commands.AbstractCommand
displayName, icon
 
Fields inherited from interface dsto.dfc.swing.icons.Iconic
NULL_ICON
 
Constructor Summary
BasicDocumentSaveCommand(Document document)
           
 
Method Summary
 void execute()
          Provides a basic implementation: pops up a file chooser and calls either saveFile () or dialogCancelled ().
 String getDescription()
          A short description of the command, suitable for a tooltip or use in a status panel.
 void propertyChange(PropertyChangeEvent e)
           
 
Methods inherited from class dsto.dfc.swing.commands.BasicFileSaveCommand
dialogCancelled, getAccelerator, getGroupInView, getMnemonic, getName, handleError, handleError, initFileChooser, isInteractive, saveFile
 
Methods inherited from class dsto.dfc.swing.commands.AbstractMutableCommand
addPropertyChangeListener, clone, isEnabled, removePropertyChangeListener, setEnabled, setIcon
 
Methods inherited from class dsto.dfc.swing.commands.AbstractCommand
actionPerformed, canReplace, getDefaultDisplayName, getDisplayName, getIcon, getLargeIcon, getLogString, setDisplayName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicDocumentSaveCommand

public BasicDocumentSaveCommand(Document document)
Method Detail

execute

public void execute()
Description copied from class: BasicFileSaveCommand
Provides a basic implementation: pops up a file chooser and calls either saveFile () or dialogCancelled ().

Specified by:
execute in interface Command
Overrides:
execute in class BasicFileSaveCommand
See Also:
BasicFileSaveCommand.initFileChooser(javax.swing.JFileChooser), BasicFileSaveCommand.saveFile(javax.swing.JFileChooser), BasicFileSaveCommand.dialogCancelled(javax.swing.JFileChooser)

getDescription

public String getDescription()
Description copied from interface: Command
A short description of the command, suitable for a tooltip or use in a status panel.

Specified by:
getDescription in interface Command
Overrides:
getDescription in class BasicFileSaveCommand

propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener


Copyright © 2008 Commonwealth of Australia