public final class FileCloseAction extends AbstractAction implements Observer
CurrentPortfolio
, and display to the user an empty untitled portfolio,
which does not need a save.
If the CurrentPortfolio needs to be saved, then the user is offered the option of saving its edits.
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
FileCloseAction(CurrentPortfolio aCurrentPortfolio,
EditSaver aEditSaver)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent event) |
void |
update(Observable aPublisher,
Object aData)
Synchronize the state of this object with the state of the
CurrentPortfolio
passed to the constructor. |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public FileCloseAction(CurrentPortfolio aCurrentPortfolio, EditSaver aEditSaver)
aCurrentPortfolio
- will be updated by this action to be untitled and empty of
stocks.aEditSaver
- if aCurrentPortfolio has any unsaved edits, then
aEditSaver will offer the user the option of saving the edits.public void actionPerformed(ActionEvent event)
actionPerformed
in interface ActionListener
public void update(Observable aPublisher, Object aData)
CurrentPortfolio
passed to the constructor. This action is disabled only when the
CurrentPortfolio is untitled and does not need a save.Copyright Hirondelle Systems - License - Generated 2013Sep20.10.58