StocksMonitor 1.5.0

hirondelle.stocks.portfolio
Class EditPortfolioAction

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

public final class EditPortfolioAction
extends AbstractAction

Present dialog to edit the list of Stock objects in the CurrentPortfolio. (See StockEditor as well.)

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
EditPortfolioAction(CurrentPortfolio aCurrentPortfolio, JFrame aFrame)
          Constructor.
 
Method Summary
 void actionPerformed(ActionEvent aEvent)
          Display a modal dialog, centered on the main window, to allow the user to edit their portfolio of stocks.
 
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

EditPortfolioAction

public EditPortfolioAction(CurrentPortfolio aCurrentPortfolio,
                           JFrame aFrame)
Constructor.

Parameters:
aCurrentPortfolio - contains the stocks in which the user has an interest.
aFrame - parent frame to which this editor is attached (the main window).
Method Detail

actionPerformed

public void actionPerformed(ActionEvent aEvent)
Display a modal dialog, centered on the main window, to allow the user to edit their portfolio of stocks.

If the user selects OK, save any edits and update the display of the main window - otherwise, discard all edits.

The current stocks are presented in a table, along with Add-Change-Delete buttons. The Add button is always enabled, while the Change and Delete buttons are enabled only if a table row is selected.

Add and Change operations will verify input of each field : when focus leaves a field, any invalid input will cause a short message to be placed in the field. Selecting OK while any item is still invalid will cause a message to be displayed, asking for correction before proceeding. The only difference between Add and Change is that the Change operation will pre-populate data entry areas.


StocksMonitor 1.5.0

Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53