com.retek.commons.gui.widget
Class RDialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended bycom.retek.commons.gui.widget.RDialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, REventListener, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants, java.awt.event.WindowListener
Direct Known Subclasses:
CustomerCommentDialog, CustomerCreditPreApprovalDialog, ItemAllProductDialog, ItemUdaDialog, LoginDialog, LoginDialog, MatchCodeDialog, OrderCommentDialog, RChoiceDialog, RcomDialog, RFatalDialog, RmmDialog, RSearchDialog

public abstract class RDialog
extends javax.swing.JDialog
implements java.awt.event.WindowListener, REventListener

This class sublcasses the standard JDialog class in the Swing package to provide custom functionality for the RCOM Client application. Dialog windows are modal windows that "lock" the system until exited. WindowListener is fully defined so that subclasses only have to implement methods that require functionality.

Retek Inc. Copyright (c) 2002

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RDialog(javax.swing.JDialog dialog)
          Returns new RDialog associated with a parent JFrame.
RDialog(javax.swing.JDialog dialog, boolean modal)
          Returns new RDialog associated with a parent JFrame.
RDialog(javax.swing.JFrame frame)
          Returns new RDialog associated with a parent JFrame.
RDialog(javax.swing.JFrame frame, boolean modal)
          Returns new RDialog associated with a parent JFrame.
 
Method Summary
 void addREventListener(REventListener listener)
          Adds a REventListener to the REventListener list.
 void centerWindow()
          Centers the dialog window within its owner (or parent) window.
 void clearAllExceptions()
          Clears the exceptions in the widget manager.
 void clearBusinessExceptions()
          Clears the business exceptions in the widget manager.
 void clearStatusBar()
          Clears the status bar.
 void clearUIExceptions()
          Clears the UI exceptions in the widget manager.
 void clearWidgetHistory()
          Clears the widget history.
 void displayException(BusinessException exception)
          Displays a Business exception on the status bar.
 void displayException(ConcurrentUpdateException exception)
          Displays a ConcurrentUpdateException in a fatal window.
 void displayException(RErrorEvent event)
          Displays a RErrorEvent exception on the status bar.
 void displayException(java.lang.RuntimeException exception)
          Displays a runtime severe exception in the fatal window and then closes the dialog.
 void displayException(SystemException exception)
          Displays a System exception in a fatal window.
 void displayException(java.lang.Throwable throwable)
          Displays an exception in the appropriate manner.
 void displayException(UiBusinessException exception)
          Displays a GUI exception on the status bar.
 void displayMessage(java.lang.String message)
          Displays a message in the status bar (defaults to ErrorSeverity.INFO);
 void displaySearchMessage(java.lang.String message)
          Displays a message in the status bar (defaults to ErrorSeverity.INFO) and sends the status bar into searching mode.
protected  void displaySearchMessage(java.lang.String message, java.lang.String valueOne)
          Displays a message in the status bar (defaults to ErrorSeverity.INFO) and sends the status bar into searching mode.
 void displayWarning(java.lang.String warning)
          Displays a message in the status bar (defaults to ErrorSeverity.INFO);
protected  RetekLogger getLogger()
          Retrieves the logger object to be used for this dialog window.
 RStatusBar getStatusBar()
          Retrieves the status bar.
 WidgetManager getWidgetManager()
          Retrieves the widget manager for this dialog window.
 boolean hasAnyExceptions()
          Returns whether or not the widget manager has any widgets that have errors.
 boolean hasBusinessExceptions()
          Returns whether or not the widget manager has any business exceptions in memory.
 boolean hasUIExceptions()
          Returns whether or not the widget manager has any widgets that have errors.
 void indentWindow(java.awt.Window parent, int indent)
          Idents this window within another window from both the top and left side of the parent window.
 boolean isDialogModified()
          Retrieves whether or not the dialog contents have been modified.
protected  void logDebug(java.lang.String message)
          Displays a debut message.
 void notifyREventListeners(RActionEvent event)
          Notifies all listeners of an action event.
 void notifyREventListeners(RErrorEvent event)
          Notifies all listeners of an error event.
 void performActionEvent(RActionEvent event)
          Implements the required REventListener method.
 void performErrorEvent(RErrorEvent event)
          Implements the required REventListener method.
protected  void recover()
          Called after a system error to recover the state of the application.
 void releaseWidget(java.lang.String widgetName)
          Releases a widget from error state based on a widget name.
 void removeAllREventListeners()
          Removes a REventListener from the REventListener list.
 void removeREventListener(REventListener listener)
          Removes a REventListener from the REventListener list.
 void setActionsEnabled(boolean enabled)
          Sets whether or not the widget manager should send actions.
 void setDialogModified(boolean modified)
          Sets the manager state of the dialog to modified (meaning widgets values are considered altered.
 void setMonitorEnabled(boolean enabled)
          Enables or disables the monitor part of the widget manager that tracks the modification of widget contents.
 void setTitle(java.lang.String title)
          Sets the title of the window.
 void windowActivated(java.awt.event.WindowEvent event)
          Implements default window listener interface 'window activated' method.
 void windowClosed(java.awt.event.WindowEvent event)
          Implements default window listener interface 'window closed' method.
 void windowClosing(java.awt.event.WindowEvent event)
          Implements default window listener interface 'window opened' method.
 void windowDeactivated(java.awt.event.WindowEvent event)
          Implements default window listener interface 'window deactivated' method.
 void windowDeiconified(java.awt.event.WindowEvent event)
          Implements default window listener interface 'window deiconified' method.
 void windowIconified(java.awt.event.WindowEvent event)
          Implements default window listener interface 'window iconified' method.
 void windowOpened(java.awt.event.WindowEvent event)
          Implements default window listener interface 'window opened' method.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, removeNotify, setModal, setResizable, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RDialog

public RDialog(javax.swing.JFrame frame)
Returns new RDialog associated with a parent JFrame.

Parameters:
frame - The owner to associate this dialog box with.

RDialog

public RDialog(javax.swing.JFrame frame,
               boolean modal)
Returns new RDialog associated with a parent JFrame.

Parameters:
frame - The owner to associate this dialog box with.

RDialog

public RDialog(javax.swing.JDialog dialog)
Returns new RDialog associated with a parent JFrame.

Parameters:
dialog - The owner to associated this dialog box with.

RDialog

public RDialog(javax.swing.JDialog dialog,
               boolean modal)
Returns new RDialog associated with a parent JFrame.

Parameters:
dialog - The owner to associated this dialog box with.
Method Detail

setTitle

public void setTitle(java.lang.String title)
Sets the title of the window. This method provides automatic language translation.

Parameters:
title - The title to set in the window.

centerWindow

public void centerWindow()
Centers the dialog window within its owner (or parent) window.


indentWindow

public void indentWindow(java.awt.Window parent,
                         int indent)
Idents this window within another window from both the top and left side of the parent window.

Parameters:
parent - The window to calculate the indentation from.
indent - The number of pixels to indent.

addREventListener

public void addREventListener(REventListener listener)
Adds a REventListener to the REventListener list.

Parameters:
listener - The REventListener to add.

removeREventListener

public void removeREventListener(REventListener listener)
Removes a REventListener from the REventListener list.

Parameters:
listener - The REventListener to remove.

removeAllREventListeners

public void removeAllREventListeners()
Removes a REventListener from the REventListener list.


notifyREventListeners

public void notifyREventListeners(RActionEvent event)
Notifies all listeners of an action event.

Parameters:
event - An RActionEvent.

notifyREventListeners

public void notifyREventListeners(RErrorEvent event)
Notifies all listeners of an error event.

Parameters:
event - An RErrorEvent.

performActionEvent

public void performActionEvent(RActionEvent event)
Implements the required REventListener method. It sends the event to all current REventListeners of the panel.

Specified by:
performActionEvent in interface REventListener
Parameters:
event - The RActionEvent that triggered this listener method.

performErrorEvent

public void performErrorEvent(RErrorEvent event)
Implements the required REventListener method. It sends the event to all current REventListeners of the panel.

Specified by:
performErrorEvent in interface REventListener
Parameters:
event - The RErrorEvent that triggered this listener method.

windowIconified

public void windowIconified(java.awt.event.WindowEvent event)
Implements default window listener interface 'window iconified' method.

Specified by:
windowIconified in interface java.awt.event.WindowListener
Parameters:
event - Details about the window event that occurred.

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent event)
Implements default window listener interface 'window deiconified' method.

Specified by:
windowDeiconified in interface java.awt.event.WindowListener
Parameters:
event - Details about the window event that occurred.

windowActivated

public void windowActivated(java.awt.event.WindowEvent event)
Implements default window listener interface 'window activated' method.

Specified by:
windowActivated in interface java.awt.event.WindowListener
Parameters:
event - Details about the window event that occurred.

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent event)
Implements default window listener interface 'window deactivated' method.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Parameters:
event - Details about the window event that occurred.

windowClosed

public void windowClosed(java.awt.event.WindowEvent event)
Implements default window listener interface 'window closed' method.

Specified by:
windowClosed in interface java.awt.event.WindowListener
Parameters:
event - Details about the window event that occurred.

windowOpened

public void windowOpened(java.awt.event.WindowEvent event)
Implements default window listener interface 'window opened' method.

Specified by:
windowOpened in interface java.awt.event.WindowListener
Parameters:
event - Details about the window event that occurred.

windowClosing

public void windowClosing(java.awt.event.WindowEvent event)
Implements default window listener interface 'window opened' method.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
event - Details about the window event that occurred.

recover

protected void recover()
Called after a system error to recover the state of the application. By default the dialog will take no action to recover but continue from the last state it was in. This method should be subclasses if specific error recover is needed.


getStatusBar

public RStatusBar getStatusBar()
Retrieves the status bar.

Returns:
The status bar for the dialog window,.

clearStatusBar

public void clearStatusBar()
Clears the status bar.


getWidgetManager

public WidgetManager getWidgetManager()
Retrieves the widget manager for this dialog window.

Returns:
The widget manager for the dialog window.

getLogger

protected RetekLogger getLogger()
Retrieves the logger object to be used for this dialog window.

Returns:
The logger object.

logDebug

protected void logDebug(java.lang.String message)
Displays a debut message.

Parameters:
message - The message for the logger to display.

setActionsEnabled

public void setActionsEnabled(boolean enabled)
Sets whether or not the widget manager should send actions.

Returns:
True if a the widget manager should send actions, false if not.

setMonitorEnabled

public void setMonitorEnabled(boolean enabled)
Enables or disables the monitor part of the widget manager that tracks the modification of widget contents.

Parameters:
enabled - True if the monitor should be active, false if not.

setDialogModified

public void setDialogModified(boolean modified)
Sets the manager state of the dialog to modified (meaning widgets values are considered altered.

Parameters:
modified - True if the dialog is considered modified, false if not.

isDialogModified

public boolean isDialogModified()
Retrieves whether or not the dialog contents have been modified.

Returns:
True if a widget value has been modified in the manager, false if not.

clearAllExceptions

public void clearAllExceptions()
Clears the exceptions in the widget manager.


clearBusinessExceptions

public void clearBusinessExceptions()
Clears the business exceptions in the widget manager.


clearUIExceptions

public void clearUIExceptions()
Clears the UI exceptions in the widget manager.


clearWidgetHistory

public void clearWidgetHistory()
Clears the widget history. Resets the last value of widgets to empty.


hasAnyExceptions

public boolean hasAnyExceptions()
Returns whether or not the widget manager has any widgets that have errors.

Returns:
True if a the widget manager currently contains errors, false if not.

hasBusinessExceptions

public boolean hasBusinessExceptions()
Returns whether or not the widget manager has any business exceptions in memory.

Returns:
True if a the widget manager currently contains business exceptions, false if not.

hasUIExceptions

public boolean hasUIExceptions()
Returns whether or not the widget manager has any widgets that have errors.

Returns:
True if a the widget manager currently contains UI business exceptions, false if not.

releaseWidget

public void releaseWidget(java.lang.String widgetName)
Releases a widget from error state based on a widget name.

Parameters:
widgetName - The widget name.

displayException

public void displayException(java.lang.Throwable throwable)
Displays an exception in the appropriate manner. It determines if the exception is a UiBusinessException, SystemException or Runtime Exception and calls the appropriate abstract method. If the exception is none of these types, the logger displays the exception.

Parameters:
throwable - An throwable exception.

displayMessage

public void displayMessage(java.lang.String message)
Displays a message in the status bar (defaults to ErrorSeverity.INFO);

Parameters:
message - A message code to translate and display.

displaySearchMessage

public void displaySearchMessage(java.lang.String message)
Displays a message in the status bar (defaults to ErrorSeverity.INFO) and sends the status bar into searching mode.

Parameters:
message - A message code to translate and display.

displaySearchMessage

protected void displaySearchMessage(java.lang.String message,
                                    java.lang.String valueOne)
Displays a message in the status bar (defaults to ErrorSeverity.INFO) and sends the status bar into searching mode.

Parameters:
message - A message code to translate and display.
valueOne - A fill-in value for message

displayWarning

public void displayWarning(java.lang.String warning)
Displays a message in the status bar (defaults to ErrorSeverity.INFO);


displayException

public void displayException(RErrorEvent event)
Displays a RErrorEvent exception on the status bar.


displayException

public void displayException(BusinessException exception)
Displays a Business exception on the status bar.

Parameters:
exception - A BusinessExcpetion (or sub-class thereof).

displayException

public void displayException(UiBusinessException exception)
Displays a GUI exception on the status bar.

Parameters:
exception - A UiException (or sub-class thereof).

displayException

public void displayException(SystemException exception)
Displays a System exception in a fatal window.

Parameters:
exception - A System Exception (or sub-class thereof).

displayException

public void displayException(ConcurrentUpdateException exception)
Displays a ConcurrentUpdateException in a fatal window.

Parameters:
exception - A System Exception (or sub-class thereof).

displayException

public void displayException(java.lang.RuntimeException exception)
Displays a runtime severe exception in the fatal window and then closes the dialog.

Parameters:
exception - A Runtime Exception (or sub-class thereof).


Copyright © 2005 Retek Inc. All Rights Reserved. - Generated at Fri, 01/21/2005 14:25