StocksMonitor 1.5.0

hirondelle.stocks.util.ui
Class StandardEditor

Object
  extended by StandardEditor

public abstract class StandardEditor
extends Object

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

StandardEditor

protected StandardEditor(String aTitle,
                         JFrame aParent,
                         StandardEditor.CloseAction aCloseAction)
Constructor.

Parameters:
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

showDialog

public final void showDialog()
Display this StandardEditor to the user.

Follows the Java Look and Feel guidelines for spacing elements.


dispose

public final void dispose()
Close the editor dialog.


getEditorUI

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.


okAction

protected abstract void okAction()
The action taken when the user hits the OK button.


StocksMonitor 1.5.0

Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53