fr.ifremer.coser.ui.util
Class ErrorHelper

java.lang.Object
  extended by fr.ifremer.coser.ui.util.ErrorHelper
All Implemented Interfaces:
org.jdesktop.swingx.error.ErrorReporter

public class ErrorHelper
extends Object
implements org.jdesktop.swingx.error.ErrorReporter

Error helper. Used to easily switch real exception interface. Currently used : swingx.

Version:
$Revision: 829 $ Last update : $Date: 2011-05-26 16:22:04 +0200 (jeu., 26 mai 2011) $ By : $Author: chatellier $
Author:
chatellier

Field Summary
protected  CoserConfig coserConfig
           
 
Constructor Summary
ErrorHelper(CoserConfig coserConfig)
           
 
Method Summary
protected  String formatMessage(String category, String content)
           
 void reportError(org.jdesktop.swingx.error.ErrorInfo errorInfo)
           
 void showErrorDialog(Component parent, String message, Throwable cause)
          Display a user friendly error frame.
 void showErrorDialog(String message)
          Display a user friendly error frame.
 void showErrorDialog(String message, Throwable cause)
          Display a user friendly error frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coserConfig

protected CoserConfig coserConfig
Constructor Detail

ErrorHelper

public ErrorHelper(CoserConfig coserConfig)
Method Detail

showErrorDialog

public void showErrorDialog(Component parent,
                            String message,
                            Throwable cause)
Display a user friendly error frame.

Parameters:
parent - parent component
message - message for user
cause - exception cause

showErrorDialog

public void showErrorDialog(String message)
Display a user friendly error frame.

Parameters:
message - message for user

showErrorDialog

public void showErrorDialog(String message,
                            Throwable cause)
Display a user friendly error frame.

Parameters:
message - message for user
cause - exception cause

reportError

public void reportError(org.jdesktop.swingx.error.ErrorInfo errorInfo)
Specified by:
reportError in interface org.jdesktop.swingx.error.ErrorReporter

formatMessage

protected String formatMessage(String category,
                               String content)


Copyright © 2010-2011 Ifremer. All Rights Reserved.