edu.hws.jcm.awt
Interface ErrorReporter
- All Known Implementing Classes:
- MessagePopup, DisplayCanvas
- 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.
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. |
setErrorMessage
public 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
public void clearErrorMessage()
- Clear the error reprort, if there is one.
getErrorMessage
public java.lang.String getErrorMessage()
- Get the error message that is currently being displayed, or
return null if there is no error message.