|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectAbstractAction
EditPortfolioAction
public final class EditPortfolioAction
Present dialog to edit the list of Stock
objects in the CurrentPortfolio. (See StockEditor as well.)
| 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 |
|---|
public EditPortfolioAction(CurrentPortfolio aCurrentPortfolio,
JFrame aFrame)
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 |
|---|
public void actionPerformed(ActionEvent aEvent)
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 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||