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 ApplicationUIContext context  
  • Constructor Summary

    Constructors
    Constructor Description
    ApplicationErrorHelper​(ApplicationUIContext context)  
  • Method Summary

    Modifier and Type Method Description
    protected java.awt.Component createHTML​(java.lang.String html)
    Create JPane with scroll to prevent windows bigger than screen resolution
    void reportError​(org.jdesktop.swingx.error.ErrorInfo errorInfo)  
    void showErrorDialog​(java.lang.String message)
    Display a user friendly error frame.
    void showErrorDialog​(java.lang.String message, java.lang.Throwable cause)
    Display a user friendly error frame.
    void showWarningDialog​(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

  • Constructor Details

  • 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 user
      cause - 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:
      reportError in interface org.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