StocksMonitor 1.5.0

hirondelle.stocks.file
Class FileCloseAction

Object
  extended by AbstractAction
      extended by FileCloseAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Observer, Action

public final class FileCloseAction
extends AbstractAction
implements Observer

Close the 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.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class AbstractAction
changeSupport, enabled
 
Fields inherited from interface Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
FileCloseAction(CurrentPortfolio aCurrentPortfolio, EditSaver aEditSaver)
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCloseAction

public FileCloseAction(CurrentPortfolio aCurrentPortfolio,
                       EditSaver aEditSaver)
Constructor.

Parameters:
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.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Specified by:
actionPerformed in interface ActionListener

update

public void update(Observable aPublisher,
                   Object aData)
Synchronize the state of this object with the state of the CurrentPortfolio passed to the constructor. This action is disabled only when the CurrentPortfolio is untitled and does not need a save.

Specified by:
update in interface Observer

StocksMonitor 1.5.0

Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53