Class ApplicationErrorHelper
- java.lang.Object
-
- org.nuiton.jaxx.application.swing.util.ApplicationErrorHelper
-
- All Implemented Interfaces:
org.jdesktop.swingx.error.ErrorReporter
public class ApplicationErrorHelper extends 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ComponentcreateHTML(String html)Create JPane with scroll to prevent windows bigger than screen resolutionvoidreportError(org.jdesktop.swingx.error.ErrorInfo errorInfo)voidshowErrorDialog(String message)Display a user friendly error frame.voidshowErrorDialog(String message, Throwable cause)Display a user friendly error frame.voidshowWarningDialog(String message)Display a user friendly warning frame.
-
-
-
Field Detail
-
context
protected ApplicationUIContext context
-
-
Constructor Detail
-
ApplicationErrorHelper
public ApplicationErrorHelper(ApplicationUIContext context)
-
-
Method Detail
-
createHTML
protected Component createHTML(String html)
Create JPane with scroll to prevent windows bigger than screen resolution- Parameters:
html-- Returns:
-
showErrorDialog
public void showErrorDialog(String message, Throwable cause)
Display a user friendly error frame.- Parameters:
message- message for usercause- exception cause
-
showErrorDialog
public void showErrorDialog(String message)
Display a user friendly error frame.- Parameters:
message- message for user
-
reportError
public void reportError(org.jdesktop.swingx.error.ErrorInfo errorInfo) throws NullPointerException- Specified by:
reportErrorin interfaceorg.jdesktop.swingx.error.ErrorReporter- Throws:
NullPointerException
-
showWarningDialog
public void showWarningDialog(String message)
Display a user friendly warning frame.- Parameters:
message- message for user
-
-