hirondelle.stocks.file
Class FileNewAction
Object
AbstractAction
FileNewAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
public final class FileNewAction
- extends AbstractAction
Create a new Portfolio which has a unique name,
is placed in storage, and is displayed to the user as the (empty)
CurrentPortfolio, and which does not need a save.
If the CurrentPortfolio needs to be saved,
then the appropriate Save or Save As action is called.
This action is always enabled.
- See Also:
- Serialized Form
FileNewAction
public FileNewAction(CurrentPortfolio aCurrentPortfolio,
JFrame aFrame,
EditSaver aEditSaver)
- Constructor.
- Parameters:
aCurrentPortfolio - is updated by this actionaFrame - parent windowaEditSaver - allows the user to save any unsaved edits of the old
CurrentPortfolio
actionPerformed
public void actionPerformed(ActionEvent event)
- Present dialog for the input of a name for the new Portfolio.
The supplied name must have a non-zero trimmed length, and must not be the
the same name as any currently stored Portfolio.
If the name entered by the user is invalid, then when OK is selected
an info box informs the users of the problem, and they
are asked to enter another name.
If the CurrentPortfolio being replaced by this action has
any unsaved edits, then allow the user the option of saving such edits.
Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53