|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.retek.commons.gui.core.WidgetManager
This class manages all the editable widgets in a particular "component space". It handles monitoring whether or not the widget values have been altered (dirty data), it handles masks, validators, actions triggered by the widgets and error management of non-fatal errors.
Retek Inc. Copyright (c) 2002
Field Summary | |
---|---|
static java.lang.String |
DOWN_NAV
|
static java.lang.String |
LEFT_NAV
|
static java.lang.String |
RIGHT_NAV
|
static java.lang.String |
UP_NAV
|
static java.lang.String |
WIDGET_HAS_DATA
|
static java.lang.String |
WIDGET_IS_EMPTY
|
Constructor Summary | |
---|---|
WidgetManager()
Returns new WidgetManager object. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Implements the action listener interface method. |
void |
addWidgetManager(WidgetManager manager)
Adds a child WidgetManager to this monitor. |
static java.lang.String |
buildName(java.lang.String widgetName,
int index)
Constructs a widget name from a widget name and counter index. |
void |
clearAllExceptions()
Clears all messages from the message map and releases all components from error state. |
void |
clearBusinessExceptions()
Clears all messages from the message map and releases all business exceptions. |
void |
clearPrimaryException()
Clears the primary exception. |
void |
clearUIExceptions()
Clears all messages from the message map and releases all GUI exceptions. |
void |
clearWidgetHistory()
Clears the widget history of all stored values. |
void |
displayException(BusinessException exception,
RetekLogger logger)
Displays an entire business exception, highlighting all the appropriate fields and display the appropriate error message. |
void |
displayException(UiBusinessException exception,
RetekLogger logger)
Displays an entire business exception, highlighting all the appropriate fields and display the appropriate error message. |
void |
focusGained(java.awt.event.FocusEvent event)
Method called when focus is gained on a registered test field. |
void |
focusLost(java.awt.event.FocusEvent event)
Whenever a registered widget looses focus, this method determines which widget and calls the appropriate focusLost method. |
RStatusBar |
getStatusBar()
Gets the status bar the widget manager is using. |
boolean |
hasAnyExceptions()
Retrieves whether or not the widget manager or any of its child widget managers currently has any widgets that have errors associated with them. |
boolean |
hasBusinessExceptions()
Retrieves whether or not the widget manager or any of its child widget managers currently has any business exceptions associated with them. |
boolean |
hasUIExceptions()
Retrieves whether or not the widget manager or any of its child widget managers currently has any UI exceptions associated with them. |
boolean |
isModified()
Retrieves whether or not the contents of any registered components or those of any child managers have been altered. |
void |
itemStateChanged(java.awt.event.ItemEvent event)
Implements the item listener interface method. |
void |
keyPressed(java.awt.event.KeyEvent event)
Implements the key listener interface method. |
void |
keyReleased(java.awt.event.KeyEvent event)
Implements the key listener interface method. |
void |
keyTyped(java.awt.event.KeyEvent event)
Implements the key listener interface method. |
protected void |
propagateException(UiBusinessException exception)
Propagates a business exception to children widget managers. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Implementation of the PropertyChangeListener method. |
void |
register(java.lang.String widgetName,
RCheckBox checkBox)
Registers a check box with the widget manager. |
void |
register(java.lang.String widgetName,
RCheckBox checkBox,
boolean monitor)
Registers a check box with the widget manager. |
void |
register(java.lang.String widgetName,
RComboBox comboBox)
Registers a combo box with the widget manager. |
void |
register(java.lang.String widgetName,
RComboBox comboBox,
boolean monitor)
Registers a combo box with the widget manager. |
void |
register(java.lang.String widgetName,
RDateField dateField)
Registers a date field with the widget manager. |
void |
register(java.lang.String widgetName,
RDateField dateField,
boolean monitor)
Registers a date field with the widget manager. |
void |
register(java.lang.String widgetName,
RLabel label)
Registers a label with the widget manager. |
void |
register(java.lang.String widgetName,
RPasswordField passwordField)
Registers a password field with the widget manager. |
void |
register(java.lang.String widgetName,
RPasswordField passwordField,
boolean monitor)
Registers a password field with the widget manager. |
void |
register(java.lang.String widgetName,
RRadioButton radioButton)
Registers a radio button with the widget manager. |
void |
register(java.lang.String widgetName,
RRadioButton radioButton,
boolean monitor)
Registers a radio button with the widget manager. |
void |
register(java.lang.String widgetName,
RTextArea textArea)
Registers a text area with the widget manager. |
void |
register(java.lang.String widgetName,
RTextArea textArea,
boolean monitor)
Registers a text area with the widget manager. |
void |
register(java.lang.String widgetName,
RTextField textField)
Registers a text field with the widget manager. |
void |
register(java.lang.String widgetName,
RTextField textField,
boolean monitor)
Registers a text field with the widget manager. |
void |
registerAction(java.lang.String widgetName,
REventListener listener,
java.lang.String command)
Registers a command to be received as an RActionEvent for the particular widget. |
void |
registerCluster(java.lang.String clusterName,
java.lang.String widgetName)
Registers a widget as part of a cluster |
void |
registerEntryAction(java.lang.String widgetName,
REventListener listener,
java.lang.String command)
Registers a command to be received as an RActionEvent for the particular widget. |
void |
registerKeyAction(java.lang.String widgetName,
REventListener listener)
Registers to receive actions from a widget when keystrokes occur in the widget. |
void |
registerMask(java.lang.String widgetName,
Mask mask)
Registers a format mask for a particular widget name. |
void |
registerValidator(java.lang.String widgetName,
FormatValidator validator)
Registers a format validator for a particular widget. |
void |
releaseWidget(java.lang.String widgetName)
Clears a single widgets of errors, releasing it from error state and removing its error message. |
void |
reregister(java.lang.String widgetName,
javax.swing.JComponent component)
Reregisters a component name with the widget manager without altering any of the other values. |
void |
setActionsEnabled(boolean enabled)
Enables or disables the action triggers in the widget manager. |
static void |
setFieldSizesBundle(RPropertyBundle newFieldSizes)
Sets the fields sizes bundle to be used by all widget managers. |
void |
setModified(boolean modified)
Explicitly sets the state of the WidgetManager. |
void |
setMonitorEnabled(boolean enabled)
Enables or disables the monitor part of the widget manager that tracks the modification of widget contents. |
void |
setNavigationEnabled(boolean enabled)
Enables or disables the navigation functionality of the widget manager. |
void |
setStatusBar(RStatusBar statusBar)
Sets the status bar for the widget manager to use (otherwise it uses its own). |
void |
unregister(java.lang.String widgetName)
Removes a widget and all other registered information from the widget manager. |
void |
unregisterAction(java.lang.String widgetName)
Removes a previous action from the widget manager. |
void |
unregisterEntryAction(java.lang.String widgetName)
Removes a previous entry action from the widget manager. |
void |
unregisterKeyAction(java.lang.String widgetName)
Removes a previous key action from the widget manager. |
void |
unregisterValidator(java.lang.String widgetName)
Removes a previous validator from the widget manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String UP_NAV
public static final java.lang.String DOWN_NAV
public static final java.lang.String LEFT_NAV
public static final java.lang.String RIGHT_NAV
public static final java.lang.String WIDGET_IS_EMPTY
public static final java.lang.String WIDGET_HAS_DATA
Constructor Detail |
public WidgetManager()
Method Detail |
public static void setFieldSizesBundle(RPropertyBundle newFieldSizes)
public void setStatusBar(RStatusBar statusBar)
statusBar
- A status bar.public RStatusBar getStatusBar()
public void register(java.lang.String widgetName, RTextField textField)
widgetName
- The name to assign to the text field.textField
- The text field to be registered.public void register(java.lang.String widgetName, RTextField textField, boolean monitor)
widgetName
- The name to assign to the text field.textField
- The text field to be registered.monitor
- True if the field should be monitored for changes, false if not.public void register(java.lang.String widgetName, RDateField dateField)
widgetName
- The name to assign to the date field.dateField
- The text field to be registered.public void register(java.lang.String widgetName, RDateField dateField, boolean monitor)
widgetName
- The name to assign to the date field.dateField
- The text field to be registered.monitor
- True if the field should be monitored for changes, false if not.public void register(java.lang.String widgetName, RPasswordField passwordField)
widgetName
- The name to assign to the password field.passwordField
- The password field to be registered.public void register(java.lang.String widgetName, RPasswordField passwordField, boolean monitor)
widgetName
- The name to assign to the password field.passwordField
- The password field to be registered.monitor
- True if the field should be monitored for changes, false if not.public void register(java.lang.String widgetName, RTextArea textArea)
widgetName
- The name to assign to the text area.textArea
- The text area to be registered.public void register(java.lang.String widgetName, RTextArea textArea, boolean monitor)
widgetName
- The name to assign to the text area.textArea
- The text area to be registered.public void register(java.lang.String widgetName, RComboBox comboBox)
widgetName
- The name to assign to the combo box.comboBox
- The combo box to be registered.public void register(java.lang.String widgetName, RComboBox comboBox, boolean monitor)
widgetName
- The name to assign to the combo box.comboBox
- The combo box to be registered.public void register(java.lang.String widgetName, RCheckBox checkBox)
widgetName
- The name to assign to the check box.checkBox
- The check box to be registered.public void register(java.lang.String widgetName, RCheckBox checkBox, boolean monitor)
widgetName
- The name to assign to the check box.checkBox
- The check box to be registered.public void register(java.lang.String widgetName, RRadioButton radioButton)
widgetName
- The name to assign to the radio button.radioButton
- The radio button to be registered.public void register(java.lang.String widgetName, RRadioButton radioButton, boolean monitor)
widgetName
- The name to assign to the radio button.radioButton
- The radio button to be registered.public void register(java.lang.String widgetName, RLabel label)
widgetName
- The name to assign to the label.label
- The label to be registered.public void unregister(java.lang.String widgetName)
widgetName
- The name of the widget to remove.public void reregister(java.lang.String widgetName, javax.swing.JComponent component)
widgetName
- The new name of the widget.public void registerCluster(java.lang.String clusterName, java.lang.String widgetName)
clusterName
- The full cluster namepublic void registerMask(java.lang.String widgetName, Mask mask)
widgetName
- The widget name.mask
- The mask to assign to the widget.
java.lang.IllegalArgumentException
- Thrown if the specific group and name has not been
registered.public void registerValidator(java.lang.String widgetName, FormatValidator validator)
widgetName
- The widget name.validator
- The validator to assign to the widget name.public void registerAction(java.lang.String widgetName, REventListener listener, java.lang.String command)
widgetName
- The widget name.listener
- The object that should receive the RActionEvent.command
- The command to receive inside RActionEvent.public void unregisterAction(java.lang.String widgetName)
widgetName
- The widget name.public void unregisterValidator(java.lang.String widgetName)
widgetName
- The widget name.public void registerEntryAction(java.lang.String widgetName, REventListener listener, java.lang.String command)
widgetName
- The widget name.listener
- The object that should receive the RActionEvent.command
- The command to receive inside RActionEvent.public void unregisterEntryAction(java.lang.String widgetName)
widgetName
- The widget name.public void registerKeyAction(java.lang.String widgetName, REventListener listener)
widgetName
- The widget name.listener
- The object that should receive the RActionEvent.public void unregisterKeyAction(java.lang.String widgetName)
widgetName
- The widget name.public static java.lang.String buildName(java.lang.String widgetName, int index)
widgetName
- The widget name.index
- The index of the particular group (if more than one identical grouping).
public void addWidgetManager(WidgetManager manager)
public void setNavigationEnabled(boolean enabled)
enabled
- True if the navigation should be enabled, false if not.public void setActionsEnabled(boolean enabled)
enabled
- True if the actions should be sent, false if they should be ignored.public void setMonitorEnabled(boolean enabled)
enabled
- True if the monitor should be active, false if not.public void setModified(boolean modified)
modified
- True is the widget contents are altered, false if not.public boolean isModified()
public void keyPressed(java.awt.event.KeyEvent event)
keyPressed
in interface java.awt.event.KeyListener
event
- Details about the key event that has occurred.public void keyTyped(java.awt.event.KeyEvent event)
keyTyped
in interface java.awt.event.KeyListener
event
- Details about the key event that has occurred.public void keyReleased(java.awt.event.KeyEvent event)
keyReleased
in interface java.awt.event.KeyListener
event
- Details about the key event that has occurred.public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- Details about the PropertyChangeEvent.public void focusGained(java.awt.event.FocusEvent event)
focusGained
in interface java.awt.event.FocusListener
event
- Details about the focus event that has occurred.public void focusLost(java.awt.event.FocusEvent event)
focusLost
in interface java.awt.event.FocusListener
event
- Details about the focus event that occurred.public void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged
in interface java.awt.event.ItemListener
event
- Details about the item event that has occurred.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- Details about the action event that has occurred.public void clearWidgetHistory()
public void releaseWidget(java.lang.String widgetName)
widgetName
- The widget name of the component to clear.public void displayException(BusinessException exception, RetekLogger logger)
exception
- The business exception to display.public void displayException(UiBusinessException exception, RetekLogger logger)
exception
- The business exception to display.protected void propagateException(UiBusinessException exception)
exception
- The business exception to propagage.public boolean hasAnyExceptions()
public boolean hasBusinessExceptions()
public boolean hasUIExceptions()
public void clearPrimaryException()
public void clearAllExceptions()
public void clearBusinessExceptions()
public void clearUIExceptions()
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |