|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.webcompmath.awt.MessagePopup
public class MessagePopup
The class MessagePopup represents a Window that pops up to display an error message. A MessagePopup object is created by a "source" component. If that component is contained in a Frame, then the popup will be a modal dialog box with that Parent. If the component is not in a Frame (or is null), then an independent Frame is used. The message box is popped up when reportError() is called. It is closed either when the user clicks the OK button, or if clearErrorMessage() is called.
Constructor Summary | |
---|---|
MessagePopup(java.awt.Component source)
Create a MessagePopup with the give source component. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Respond when user clicks OK. |
void |
clearErrorMessage()
Clear the error message and close the window. |
java.lang.String |
getErrorMessage()
Get the currently displayed error message. |
void |
setErrorMessage(Controller c,
java.lang.String message)
Show the given message in a dialog box or independent window, depending on whether the source component is contained in a Frame or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessagePopup(java.awt.Component source)
source
- the source componentMethod Detail |
---|
public void setErrorMessage(Controller c, java.lang.String message)
setErrorMessage
in interface ErrorReporter
c
- The Controller that calls this method, or null if it is not
called by a Controller. (The Controller, if any, will be
notified when the error message is cleared.)message
- The message to display.public java.lang.String getErrorMessage()
getErrorMessage
in interface ErrorReporter
public void clearErrorMessage()
clearErrorMessage
in interface ErrorReporter
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
evt
- the event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |