| java.awt.Container java.awt.Window java.awt.Dialog javax.swing.JDialog org.jdesktop.swingx.JXErrorDialog
JXErrorDialog | public class JXErrorDialog extends JDialog (Code) | | Common Error Dialog, suitable for representing information about errors and
exceptions happened in application. The common usage of the
JXErrorDialog is to show collected data about the incident and
probably ask customer for a feedback. The data about the incident consists
from the title which will be displayed in the dialog header, short
description of the problem that will be immediately seen after dialog is
became visible, full description of the problem which will be visible after
user clicks "Details" button and Throwable that contains stack trace and
another usable information that may be displayed in the dialog.
To ask user for feedback extend abstract class ErrorReporter
and set your reporter using setReporter method. Report button
will be added to the dialog automatically.
See
MailErrorReporter MailErrorReporter documentation for the example
of error reporting usage.
For example, to show simple JXErrorDialog call
JXErrorDialog.showDialog(null, "Application Error",
"The application encountered the unexpected error,
please contact developers")
author: Richard Bair author: Alexander Zuev |
Method Summary | |
public static ErrorReporter | getReporter() Returns the current reporting engine that will be used to report a
problem if user clicks on 'Report' button or null if no
reporting engine set. | public static void | setReporter(ErrorReporter rep) Set reporting engine which will handle error reporting if user clicks
'report' button. | public static void | showDialog(Window owner, String title, Throwable e) Constructs and shows the error dialog for the given exception. | public static void | showDialog(Window owner, String title, String errorMessage, String details) Show the error dialog.
Parameters: owner - Owner of this error dialog Parameters: title - Title of the error dialog Parameters: errorMessage - Message for the error dialog Parameters: details - Details to be shown in the detail section of the dialog. | public static void | showDialog(Window owner, IncidentInfo info) Show the error dialog. |
JXErrorDialog | public JXErrorDialog(Frame owner)(Code) | | Create a new ErrorDialog with the given Frame as the owner
Parameters: owner - Owner of this error dialog. |
getReporter | public static ErrorReporter getReporter()(Code) | | Returns the current reporting engine that will be used to report a
problem if user clicks on 'Report' button or null if no
reporting engine set.
reporting engine |
setReporter | public static void setReporter(ErrorReporter rep)(Code) | | Set reporting engine which will handle error reporting if user clicks
'report' button.
Parameters: rep - ErrorReporter to be used or null to turn reporting facility off. |
showDialog | public static void showDialog(Window owner, String title, Throwable e)(Code) | | Constructs and shows the error dialog for the given exception. The
exceptions message will be the errorMessage, and the stacktrace will be
the details.
Parameters: owner - Owner of this error dialog. Parameters: title - Title of the error dialog Parameters: e - Exception that contains information about the error cause andstack trace |
showDialog | public static void showDialog(Window owner, String title, String errorMessage, String details)(Code) | | Show the error dialog.
Parameters: owner - Owner of this error dialog Parameters: title - Title of the error dialog Parameters: errorMessage - Message for the error dialog Parameters: details - Details to be shown in the detail section of the dialog. Thiscan be null if you do not want to display the details sectionof the dialog. |
showDialog | public static void showDialog(Window owner, IncidentInfo info)(Code) | | Show the error dialog.
Parameters: owner - Owner of this error dialog. Parameters: info - IncidentInfo that incorporates all theinformation about the error |
Fields inherited from java.awt.Dialog | final public static ModalityType DEFAULT_MODALITY_TYPE(Code)(Java Doc)
|
Methods inherited from java.awt.Container | public Component add(Component comp)(Code)(Java Doc) public Component add(String name, Component comp)(Code)(Java Doc) public Component add(Component comp, int index)(Code)(Java Doc) public void add(Component comp, Object constraints)(Code)(Java Doc) public void add(Component comp, Object constraints, int index)(Code)(Java Doc) public synchronized void addContainerListener(ContainerListener l)(Code)(Java Doc) protected void addImpl(Component comp, Object constraints, int index)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public void addPropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public void applyComponentOrientation(ComponentOrientation o)(Code)(Java Doc) public boolean areFocusTraversalKeysSet(int id)(Code)(Java Doc) public int countComponents()(Code)(Java Doc) public void deliverEvent(Event e)(Code)(Java Doc) public void doLayout()(Code)(Java Doc) public Component findComponentAt(int x, int y)(Code)(Java Doc) public Component findComponentAt(Point p)(Code)(Java Doc) public float getAlignmentX()(Code)(Java Doc) public float getAlignmentY()(Code)(Java Doc) public Component getComponent(int n)(Code)(Java Doc) public Component getComponentAt(int x, int y)(Code)(Java Doc) public Component getComponentAt(Point p)(Code)(Java Doc) public int getComponentCount()(Code)(Java Doc) public int getComponentZOrder(Component comp)(Code)(Java Doc) public Component[] getComponents()(Code)(Java Doc) public synchronized ContainerListener[] getContainerListeners()(Code)(Java Doc) public Set<AWTKeyStroke> getFocusTraversalKeys(int id)(Code)(Java Doc) public FocusTraversalPolicy getFocusTraversalPolicy()(Code)(Java Doc) public Insets getInsets()(Code)(Java Doc) public LayoutManager getLayout()(Code)(Java Doc) public T[] getListeners(Class<T> listenerType)(Code)(Java Doc) public Dimension getMaximumSize()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public Point getMousePosition(boolean allowChildren) throws HeadlessException(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) public Insets insets()(Code)(Java Doc) public void invalidate()(Code)(Java Doc) public boolean isAncestorOf(Component c)(Code)(Java Doc) public boolean isFocusCycleRoot(Container container)(Code)(Java Doc) public boolean isFocusCycleRoot()(Code)(Java Doc) final public boolean isFocusTraversalPolicyProvider()(Code)(Java Doc) public boolean isFocusTraversalPolicySet()(Code)(Java Doc) public void layout()(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public Component locate(int x, int y)(Code)(Java Doc) public Dimension minimumSize()(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintComponents(Graphics g)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) public Dimension preferredSize()(Code)(Java Doc) public void print(Graphics g)(Code)(Java Doc) public void printComponents(Graphics g)(Code)(Java Doc) protected void processContainerEvent(ContainerEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) public void remove(int index)(Code)(Java Doc) public void remove(Component comp)(Code)(Java Doc) public void removeAll()(Code)(Java Doc) public synchronized void removeContainerListener(ContainerListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void setComponentZOrder(Component comp, int index)(Code)(Java Doc) public void setFocusCycleRoot(boolean focusCycleRoot)(Code)(Java Doc) public void setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)(Code)(Java Doc) public void setFocusTraversalPolicy(FocusTraversalPolicy policy)(Code)(Java Doc) final public void setFocusTraversalPolicyProvider(boolean provider)(Code)(Java Doc) public void setFont(Font f)(Code)(Java Doc) public void setLayout(LayoutManager mgr)(Code)(Java Doc) public void transferFocusDownCycle()(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) public void validate()(Code)(Java Doc) protected void validateTree()(Code)(Java Doc)
|
|
|