Package edu.hws.jcm.awt
Interface ErrorReporter
- All Known Implementing Classes:
DisplayCanvas
,MessagePopup
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
Modifier and TypeMethodDescriptionvoid
Clear the error reprort, if there is one.Get the error message that is currently being displayed, or return null if there is no error message.void
setErrorMessage
(Controller source, String message) Report the specifed message as an error.
-
Method Details
-
setErrorMessage
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
String getErrorMessage()Get the error message that is currently being displayed, or return null if there is no error message.
-