jbcl.control Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----java.awt.Window +----java.awt.Dialog +----javax.swing.JDialog +----com.borland.jbcl.control.ButtonDialog +----com.borland.jbcl.control.ExceptionDialog
Variables Constructors Properties Methods Event Listeners
Implements ActionListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants
The ExceptionDialog
class displays an error dialog when a DataSetException
is generated. The DataSetException
class can have other types of exceptions chained to it, for example, java.io.IOException
and java.sql.SQLException
exceptions.
In these cases the DataSetException
has an appropriate message that describes the error from the perspective of the higher level API. Select the Previous, Next, or Details buttons to view the stack of exceptions in the chain.
If the exception thrown is of type ValidationException
(a subclass of DataSetException
), the Exception dialog displays only if there are no StatusEvent
listeners on the DataSet
, for example, the StatusBar
control. A ValidationException
is generated by a constraint violation, for example, a minimum or maximum value outside specified ranges, a data entry that doesn't meet an edit mask specification, an attempt at updating a read-only column, and so on. If a StatusBar
control is bound to a DataSet
, it automatically becomes a StatusEvent
listener. This allows users to see the messages resulting from constraint violations on the status bar.
This dialog is suppressed when a DataSetException
is generated in the JBuilder UI Designer.
To programmatically suppress this dialog at run time, set the displayErrors
property of the DataSet
to false.
public ExceptionDialog(Frame frame, String title, Exception ex)Constructs an
ExceptionDialog
by calling its superclass constructor with the properties specified by its parameters. This constructor creates a modal dialog. To create a non-modal ExceptionDialog
, use the
ExceptionDialog(java.awt.Frame, java.lang.String, java.lang.Exception, boolean)
constructor.
Parameters:
frame
Frame
class that is passed to its superclass constructor.
title
ex
Exception
class.
public ExceptionDialog(Frame frame, String title, Exception ex, boolean modal)Constructs an
ExceptionDialog
by calling its superclass constructor with the properties specified by its parameters.
Parameters:
frame
Frame
class that is passed to its superclass constructor.
title
ex
Exception
class.
modal
ExceptionDialog
is modal or not. A modal dialog must be dismissed before using the rest of the program.
public ExceptionDialog(Frame frame, String title, Exception ex, boolean modal, Component c)
public ExceptionDialog(Frame frame, String title, Exception ex, Component c)
public static int getShowCount()Returns the number of errors in the chain.
protected void processActionEvent(ActionEvent e)Protected method that calls its superclass constructor
processActionEvent()
method with
the chained Exception
event, then determines the appropriate action based on user input.
For example, if the Next button is clicked, show the next Exception
in the chained list.
Parameters:
e
Exception
event.
Overrides: com.borland.jbcl.control.ButtonDialog.processActionEvent(ActionEvent)
protected void processWindowEvent(WindowEvent e)Protected method that overrides the windows event handler.
Parameters:
e
Exception
event.
Overrides: com.borland.jbcl.control.ButtonDialog.processWindowEvent(WindowEvent)
public synchronized void addActionListener(ActionListener l) public synchronized void removeActionListener(ActionListener l)
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 )