public abstract class StandardEditor extends Object
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)
Modifier and Type | Class and Description |
---|---|
protected static class |
StandardEditor.CloseAction
Forces calls to constructor to have greater clarity, by using an
enumeration instead of integers.
|
Modifier | Constructor and Description |
---|---|
protected |
StandardEditor(String aTitle,
JFrame aParent,
StandardEditor.CloseAction aCloseAction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.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()
Copyright Hirondelle Systems - License - Generated 2013Sep20.10.58