fdda.plugins
Class DefaultErrorHandler

java.lang.Object
  |
  +--fdda.plugins.DefaultErrorHandler
All Implemented Interfaces:
ErrorHandler

public class DefaultErrorHandler
extends Object
implements ErrorHandler

Default implementation of ErrorHandler for convenience. Collects all errors and warnings in two lists and shows them on explicit request

Author:
Jörg Rüdenauer

Constructor Summary
DefaultErrorHandler(String action)
          Constructor
 
Method Summary
 boolean hadError()
          Returns whether an error occured.
 void handleError(int type, String title, String message)
          Handles an error.
 void printErrors()
          Shows the errors to the user in a dialog.
 void printWarnings()
          Shows the warnings to the user in a dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultErrorHandler

public DefaultErrorHandler(String action)
Constructor

Parameters:
action - a description of the action where errors occured. Should be localized.
Method Detail

handleError

public void handleError(int type,
                        String title,
                        String message)
Description copied from interface: ErrorHandler
Handles an error. The type is one of the constants of Notification

Specified by:
handleError in interface ErrorHandler
Parameters:
type - the type of the error
title - a title for the message (needs not be used by the handler)
message - the error message
See Also:
Notification

printWarnings

public void printWarnings()
Shows the warnings to the user in a dialog.


printErrors

public void printErrors()
Shows the errors to the user in a dialog.


hadError

public boolean hadError()
Returns whether an error occured.

Returns:
true, iff at least one error occured.


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.