borland Packages  Class Hierarchy  dbswing Package 

DBExceptionDialog class

java.lang.Object
   +----java.awt.Component
           +----java.awt.Container
                   +----java.awt.Window
                           +----java.awt.Dialog
                                   +----javax.swing.JDialog
                                           +----com.borland.dbswing.DBExceptionDialog

About the DBExceptionDialog class

Variables  Constructors  Properties  Methods  Event Listeners

Implements ActionListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

Note: This is a feature of JBuilder Professional and Enterprise.

The DBExceptionDialog class can be used to display an error dialog box when a java.lang.Exception is generated. DBExceptionDialog is used by DBExceptionHandler to display information about DataSetExceptions.

The dbSwing components automatically display the DBExceptionDialog when a DataSetException occurs within a dbSwing component. If you decide to implement your own exception handling in your application, however, you can use this dialog to display exceptions to the user. Refer to the DataSetException class for more information.

A DBExceptionDialog always displays an OK button. The following properties allow you to customize the appearance and functionality of DBExceptionDialog:

DBExceptionDialog automatically disposes itself if the user presses the OK or Exit button, or closes the dialog box's window.


DBExceptionDialog variables

Variables implemented in java.awt.Component

Variables implemented in javax.swing.JDialog

DBExceptionDialog constructors

DBExceptionDialog properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.awt.Component

Properties implemented in java.awt.Container

Properties implemented in java.awt.Dialog

Properties implemented in java.awt.Window

Properties implemented in java.lang.Object

Properties implemented in javax.swing.JDialog

DBExceptionDialog methods

Methods implemented in this class

Methods implemented in java.awt.Component

Methods implemented in java.awt.Container

Methods implemented in java.awt.Window

Methods implemented in java.lang.Object

Methods implemented in javax.swing.JDialog

DBExceptionDialog event listeners


DBExceptionDialog constructors

DBExceptionDialog(java.awt.Frame, java.lang.String, java.lang.Throwable)

  public DBExceptionDialog(Frame frame, String title, Throwable ex)
Constructs a DBExceptionDialog object with the following parameters:

Parameters:

frame
The parent Frame.
title
The text string that is displayed on the dialog box title bar.
ex
The Exception that occurred.

DBExceptionDialog(java.awt.Frame, java.lang.String, java.lang.Throwable, boolean)

  public DBExceptionDialog(Frame frame, String title, Throwable exception, boolean modal)
Constructs a DBExceptionDialog object with the following parameters:

Parameters:

frame
The parent Frame.
title
The text string that is displayed on the dialog box title bar.
exception
The Exception that occurred.
modal
Whether the DBExceptionDialog is modal or not. A modal dialog must be dismissed before using the rest of the program.

DBExceptionDialog(java.awt.Frame, java.lang.String, java.lang.Throwable, boolean, java.awt.Component)

  public DBExceptionDialog(Frame frame, String title, Throwable ex, boolean modal, Component c)
Constructs a DBExceptionDialog object with the following parameters:

Parameters:

frame
The parent Frame.
title
The text string that is displayed on the dialog box title bar.
ex
The Exception that occurred.
modal
Whether the DBExceptionDialog is modal or not. A modal dialog must be dismissed before using the rest of the program.
c
The Component for which to display the DBExceptionDialog.

DBExceptionDialog(java.awt.Frame, java.lang.String, java.lang.Throwable, java.awt.Component)

  public DBExceptionDialog(Frame frame, String title, Throwable ex, Component c)
Constructs a DBExceptionDialog object with the following parameters:

Parameters:

frame
The parent Frame.
title
The text string that is displayed on the dialog box title bar.
ex
The Exception that occurred.
c
The Component for which to display the DBExceptionDialog.

DBExceptionDialog properties

allowExit

 public boolean isAllowExit()
 public void setAllowExit(boolean allowExit)
Returns and sets whether an Exit button is displayed when an Exception occurs.

closeConnectionsOnExit

 public boolean isCloseConnectionsOnExit()
 public void setCloseConnectionsOnExit(boolean closeConnections)
Returns and sets whether any open database connections should be closed when the Exit button is used to terminate an application. This property is true by default.

closeDataStoresOnExit

 public boolean isCloseDataStoresOnExit()
 public void setCloseDataStoresOnExit(boolean closeDataStores)
Returns and sets whether DataStores are automatically detected and closed when the Exit button is used to terminate an application. The default value is true.

displayChainedExceptions

 public boolean isDisplayChainedExceptions()
 public void setDisplayChainedExceptions(boolean displayChains)
Returns and sets whether the Next and Previous buttons appear when a ChainedException occurs. For non-chained exceptions, this property has no effect. This property is true by default.

displayStackTraces

 public boolean isDisplayStackTraces()
 public void setDisplayStackTraces(boolean enableStackTrace)
Returns and sets whether the Stack Trace toggle button appears when an Exception occurs. When selected, an exception message is displayed along with its stack trace. This property is true by default.

enableSecretDebugKey

 public boolean isEnableSecretDebugKey()
 public void setEnableSecretDebugKey(boolean enableSecretKey)
Returns and sets whether the Ctrl-Alt-Shift-D key combination can be used to unconditionally force the display of all buttons when the dialog box is visible. This property is true by default.

messageIcon

 public Icon getMessageIcon()
 public void setMessageIcon(Icon messageIcon)
Returns and sets the icon displayed next to the dialog box's message. By default, a JOptionPane's information icon is used. If messageIcon is set to null, no icon is displayed.

DBExceptionDialog methods

addNotify()

  public void addNotify()
Calls addNotify() of the superclass and tweaks the layout of the dialog.

Overrides: java.awt.Dialog.addNotify()

getShowCount()

  public static int getShowCount()
Returns the number of times the dialog box has been called with the show() method.

show()

  public void show()
Displays the dialog box.

Overrides: java.awt.Dialog.show()


DBExceptionDialog event listeners

This class is a source for the following event sets.

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

container

 public synchronized void addContainerListener(java.awt.event.ContainerListener )
 public synchronized void removeContainerListener(java.awt.event.ContainerListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

inputMethod

 public synchronized void addInputMethodListener(java.awt.event.InputMethodListener )
 public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

mouse

 public synchronized void addMouseListener(java.awt.event.MouseListener )
 public synchronized void removeMouseListener(java.awt.event.MouseListener )

mouseMotion

 public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
 public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )

propertyChange

 public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
 public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )

window

 public synchronized void addWindowListener(java.awt.event.WindowListener )
 public synchronized void removeWindowListener(java.awt.event.WindowListener )