hirondelle.stocks.export
Class ExportAction
Object
AbstractAction
ExportAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
public final class ExportAction
- extends AbstractAction
Present dialog to allow user to save all Portfolio
data as a single text file.
The text file is not intended to be edited by the end user, but rather
as the input to the corresponding ImportAction. The format of the
file is defined by Preferences.exportSubtree(java.io.OutputStream).
The file name and extension are arbitrary, and defined entirely by the user.
- See Also:
- Serialized Form
|
Method Summary |
void |
actionPerformed(ActionEvent event)
Allow the user to choose a destination file, then write the content of
all saved Portfolio objects to this file as XML. |
ExportAction
public ExportAction(JFrame aFrame)
- Constructor.
- Parameters:
aFrame - parent frame to which this dialog is attached.
actionPerformed
public void actionPerformed(ActionEvent event)
- Allow the user to choose a destination file, then write the content of
all saved Portfolio objects to this file as XML.
- If a file is not selected, then take no action.
- If a nonexisting file is selected, the write proceeds immediately.
- If an existing file is selected but it has no write access, then the user is
informed and asked to select a different file.
- If an existing file is selected and it has write access, then the user is informed
that the file will be overwritten, and is asked to confirm this operation.
User navigation is minimized by storing the apparent directory of current interest.
If the user selects this action a second time, then the file
selection dialog is pre-set to this directory of interest, so that repeated
navigation of the file system is often avoided.
Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53