Class ApplicationErrorHelper
java.lang.Object
org.nuiton.jaxx.application.swing.util.ApplicationErrorHelper
- All Implemented Interfaces:
org.jdesktop.swingx.error.ErrorReporter
public class ApplicationErrorHelper
extends java.lang.Object
implements org.jdesktop.swingx.error.ErrorReporter
Helper to display errors.
- Since:
- 2.8
- Author:
- Tony Chemit - chemit@codelutin.com
-
Field Summary
Fields Modifier and Type Field Description protected ApplicationUIContextcontext -
Constructor Summary
Constructors Constructor Description ApplicationErrorHelper(ApplicationUIContext context) -
Method Summary
Modifier and Type Method Description protected java.awt.ComponentcreateHTML(java.lang.String html)Create JPane with scroll to prevent windows bigger than screen resolutionvoidreportError(org.jdesktop.swingx.error.ErrorInfo errorInfo)voidshowErrorDialog(java.lang.String message)Display a user friendly error frame.voidshowErrorDialog(java.lang.String message, java.lang.Throwable cause)Display a user friendly error frame.voidshowWarningDialog(java.lang.String message)Display a user friendly warning frame.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
context
-
-
Constructor Details
-
ApplicationErrorHelper
-
-
Method Details
-
createHTML
protected java.awt.Component createHTML(java.lang.String html)Create JPane with scroll to prevent windows bigger than screen resolution- Parameters:
html-- Returns:
-
showErrorDialog
public void showErrorDialog(java.lang.String message, java.lang.Throwable cause)Display a user friendly error frame.- Parameters:
message- message for usercause- exception cause
-
showErrorDialog
public void showErrorDialog(java.lang.String message)Display a user friendly error frame.- Parameters:
message- message for user
-
reportError
public void reportError(org.jdesktop.swingx.error.ErrorInfo errorInfo) throws java.lang.NullPointerException- Specified by:
reportErrorin interfaceorg.jdesktop.swingx.error.ErrorReporter- Throws:
java.lang.NullPointerException
-
showWarningDialog
public void showWarningDialog(java.lang.String message)Display a user friendly warning frame.- Parameters:
message- message for user
-