dsto.dfc.swing.persistence
Class BasicSerializeCommand
java.lang.Object
dsto.dfc.swing.commands.AbstractCommand
dsto.dfc.swing.commands.AbstractMutableCommand
dsto.dfc.swing.commands.BasicFileSaveCommand
dsto.dfc.swing.persistence.BasicSerializeCommand
- All Implemented Interfaces:
- Command, Iconic, Copyable, PropertyEventSource, ActionListener, Cloneable, EventListener
public class BasicSerializeCommand
- extends BasicFileSaveCommand
Base implementation for commands that save objects using
Serializer. The UI is customized by initFileChooser() which sets
up an accessory panel (SerializeAccessoryPanel
). The
saveFile () method will usually call save () to save an object
using the options specified in the chooser.
- Version:
- $Revision$
- See Also:
SerializeAccessoryPanel
Methods inherited from class dsto.dfc.swing.commands.BasicFileSaveCommand |
dialogCancelled, execute, getAccelerator, getDescription, getGroupInView, getMnemonic, getName, handleError, handleError, isInteractive, saveFile |
BasicSerializeCommand
public BasicSerializeCommand()
BasicSerializeCommand
public BasicSerializeCommand(Component owner)
initFileChooser
protected void initFileChooser(JFileChooser chooser)
- Sets up the accessory panel.
- Overrides:
initFileChooser
in class BasicFileSaveCommand
save
protected void save(Object object,
JFileChooser chooser)
throws FileNotFoundException,
IOException
- Save an object using the settings in the chooser.
- Parameters:
object
- The object to save.chooser
- The chooser.
- Throws:
FileNotFoundException
IOException
save
protected void save(Object object,
JFileChooser chooser,
File file)
throws FileNotFoundException,
IOException
- Save an object to a specified file, using the option settings in
the chooser.
- Parameters:
object
- The object to save.chooser
- The chooser.file
- The file to save to.
- Throws:
FileNotFoundException
IOException
Copyright © 2008 Commonwealth of Australia