StocksMonitor 1.5.0

hirondelle.stocks.portfolio
Class EditSaver

Object
  extended by EditSaver

public final class EditSaver
extends Object

Allow the user the choice of saving edits to the CurrentPortfolio.


Constructor Summary
EditSaver(Action aSaveAction, Action aSaveAsAction, JFrame aFrame)
          Constructor.
 
Method Summary
 void save(CurrentPortfolio aCurrentPortfolio, ActionEvent aEvent)
          Save aCurrentPortfolio, if necessary.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditSaver

public EditSaver(Action aSaveAction,
                 Action aSaveAsAction,
                 JFrame aFrame)
Constructor.

Parameters:
aSaveAction - performed if the user decides to save edits and the CurrentPortfolio has a title.
aSaveAsAction - performed if the user decides to save edits and the CurrentPortfolio does not have a title.
aFrame - parent window to which this dialog belongs.
Method Detail

save

public void save(CurrentPortfolio aCurrentPortfolio,
                 ActionEvent aEvent)
Save aCurrentPortfolio, if necessary.

If aCurrentPortfolio has no unsaved edits, or if the user does not wish to save edits, then do nothing. Otherwise, perform either SaveAction or SaveAsAction, according to whether aCurrentPortfoilo is titled or untitled, respectively.

Parameters:
aEvent - is passed to either SaveAction or SaveAsAction.

StocksMonitor 1.5.0

Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53