borland Packages Class Hierarchy dbswing Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----java.awt.Window +----java.awt.Dialog +----javax.swing.JDialog +----com.borland.dbswing.DBExceptionDialog
Variables Constructors Properties Methods Event Listeners
Implements ActionListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants
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 DataSetException
s.
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
:
messageIcon
- Sets an icon to be displayed next to the dialog box's message area.
displayChainedExceptions
- Sets whether Next and Previous buttons are displayed when a ChainedException
occurs. These buttons allow viewing of individual exceptions in the exception chain.
displayStackTraces
- Sets whether the Stack Trace toggle button is displayed when a DataSetException
occurs. When selected, an exception's stack trace is displayed in the dialog box in addition to its message.
allowExit
- Sets whether an Exit button allowing the user to terminate an application is displayed in the dialog box.
closeDataStoresOnExit
- If the closeDataStoresOnExit
property is true
, any open DataStores
attached to the dialog box's parent frame are automatically closed if the Exit button is pressed.
closeConnectionsOnExit
- If the closeConnectionsOnExit
property is true
, any open database connections are automatically closed if the Exit button is pressed.
enableSecretDebugKey
- Sets whether the Ctrl-Alt-Shift-D key can be used to toggle the display of all of DBExceptionDialog's
buttons at runtime, despite other property settings.
DBExceptionDialog
automatically disposes itself if the user presses the OK or Exit button, or closes the dialog box's window.
public DBExceptionDialog(Frame frame, String title, Throwable ex)Constructs a
DBExceptionDialog
object with the following parameters:
frame
Frame
.
title
ex
Exception
that occurred.
public DBExceptionDialog(Frame frame, String title, Throwable exception, boolean modal)Constructs a
DBExceptionDialog
object with the following parameters:
frame
Frame
.
title
exception
Exception
that occurred.
modal
DBExceptionDialog
is modal or not. A modal dialog must be dismissed before using the rest of the program.
public DBExceptionDialog(Frame frame, String title, Throwable ex, boolean modal, Component c)Constructs a
DBExceptionDialog
object with the following parameters:
frame
Frame
.
title
ex
Exception
that occurred.
modal
DBExceptionDialog
is modal or not. A modal dialog must be dismissed before using the rest of the program.
c
Component
for which to display the DBExceptionDialog
.
public DBExceptionDialog(Frame frame, String title, Throwable ex, Component c)Constructs a
DBExceptionDialog
object with the following parameters:
frame
Frame
.
title
ex
Exception
that occurred.
c
Component
for which to display the DBExceptionDialog
.
public boolean isAllowExit() public void setAllowExit(boolean allowExit)Returns and sets whether an Exit button is displayed when an
Exception
occurs.
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.
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
.
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.
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.
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.
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.
public void addNotify()Calls
addNotify()
of the superclass and tweaks the layout of the dialog.
public static int getShowCount()Returns the number of times the dialog box has been called with the
show()
method.
public void show()Displays the dialog box.
public synchronized void addComponentListener(java.awt.event.ComponentListener ) public synchronized void removeComponentListener(java.awt.event.ComponentListener )
public synchronized void addContainerListener(java.awt.event.ContainerListener ) public synchronized void removeContainerListener(java.awt.event.ContainerListener )
public synchronized void addFocusListener(java.awt.event.FocusListener ) public synchronized void removeFocusListener(java.awt.event.FocusListener )
public synchronized void addInputMethodListener(java.awt.event.InputMethodListener ) public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )
public synchronized void addKeyListener(java.awt.event.KeyListener ) public synchronized void removeKeyListener(java.awt.event.KeyListener )
public synchronized void addMouseListener(java.awt.event.MouseListener ) public synchronized void removeMouseListener(java.awt.event.MouseListener )
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener ) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener ) public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )
public synchronized void addWindowListener(java.awt.event.WindowListener ) public synchronized void removeWindowListener(java.awt.event.WindowListener )