net.sourceforge.webcompmath.awt
Interface ErrorReporter

All Known Implementing Classes:
DisplayCanvas, MessagePopup, WCMDisplayCanvasBean

public interface ErrorReporter

To allow different styles of reporting errors, a Controller uses an ErrorReporter to report any errors that are thrown during its checkInput/compute cycle. The DisplayCanvas and MessagePopup classes implement this interface.

Author:
David Eck

Method Summary
 void clearErrorMessage()
          Clear the error reprort, if there is one.
 java.lang.String getErrorMessage()
          Get the error message that is currently being displayed, or return null if there is no error message.
 void setErrorMessage(Controller source, java.lang.String message)
          Report the specifed message as an error.
 

Method Detail

setErrorMessage

void setErrorMessage(Controller source,
                     java.lang.String message)
Report the specifed message as an error. If source is non-null, then it is the Controller that called this routine. In that case, if the error reporter is capable of clearing its own error condition, it should call source.errorCleared() when it does so.

Parameters:
source - Controller that called this method (if non-null).
message - error message to report.

clearErrorMessage

void clearErrorMessage()
Clear the error reprort, if there is one.


getErrorMessage

java.lang.String getErrorMessage()
Get the error message that is currently being displayed, or return null if there is no error message.

Returns:
the message