|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectStandardEditor
public abstract class StandardEditor
Abstract Base Class for a dialog with standard layout, buttons, and behavior. (The name StandardEditor was chosen since almost all non-trivial dialogs allow the user to edit data in some way.)
Use of this class will apply a standard appearance to dialogs in the application.
Subclasses implement the body of the dialog (wherein business objects are manipulated), and the action taken by the OK button.
Services of a StandardEditor include:
The Escape key does not always work (for example, when a JTable row has the focus)
| Nested Class Summary | |
|---|---|
protected static class |
StandardEditor.CloseAction
Forces calls to constructor to have greater clarity, by using an enumeration instead of integers. |
| Constructor Summary | |
|---|---|
protected |
StandardEditor(String aTitle,
JFrame aParent,
StandardEditor.CloseAction aCloseAction)
Constructor. |
| Method Summary | |
|---|---|
void |
dispose()
Close the editor dialog. |
protected abstract JComponent |
getEditorUI()
Return the GUI which allows the user to manipulate the business objects related to this dialog; this GUI will be placed above the OK and Cancel buttons, in a standard manner. |
protected abstract void |
okAction()
The action taken when the user hits the OK button. |
void |
showDialog()
Display this StandardEditor to the user. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected StandardEditor(String aTitle,
JFrame aParent,
StandardEditor.CloseAction aCloseAction)
aTitle - text which appears in the title bar after the name of
the application; must have content.aParent - window to which this dialog is attached.aCloseAction - sets the behaviour of the dialog upon close.| Method Detail |
|---|
public final void showDialog()
Follows the Java Look and Feel guidelines for spacing elements.
public final void dispose()
protected abstract JComponent getEditorUI()
protected abstract void okAction()
|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||