harmonic.mz.manager
Class MessageManager

java.lang.Object
  |
  +--harmonic.mz.manager.MessageManager

public class MessageManager
extends java.lang.Object

The class for sending messages to user.


Method Summary
 boolean canPostError()
           
 void clearErrorSuppress()
          This system tries to ensure the error box doesn't come up again and again for some big problem, before the user has a chance to cancel.
 boolean confirm(java.lang.String s)
          Posts a modal confirm box.
 boolean confirmFileFix(ModelNode node, java.lang.String s)
          Posts a modal confirm box to ask the user about a proposed fix to a model file that is old.
 boolean confirmMemoryPurge()
          Call this if something runs out of memory.
 void echoInput(java.lang.String s)
          Fakes an input string to type python box.
 void explain(java.lang.String s)
          Lets the user know how to use something, by sending text to the status bar.
 void ierror(java.lang.String s)
          Lets the user know an internal error has happened.
 boolean modalMessagePosted()
           
 void msg(java.lang.String s)
          Lets the user know a message that's not very important.
 void setSupressErrors(boolean b)
           
 void uerror(java.lang.String s)
          Lets the user know they have done something wrong.
 void uerrorKey(java.lang.String s)
           
 void uerrorKey(java.lang.String s, java.lang.String v)
           
 void warn(java.lang.String _s)
          Lets the user know any kind or warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clearErrorSuppress

public void clearErrorSuppress()
This system tries to ensure the error box doesn't come up again and again for some big problem, before the user has a chance to cancel. User needs to hit "Suppress" clearErrorSuppress() is called by repaint()...


canPostError

public boolean canPostError()

modalMessagePosted

public boolean modalMessagePosted()

ierror

public void ierror(java.lang.String s)
Lets the user know an internal error has happened. The message is carried out by printing to the UNIX command line, or writing to log file, according settings. The string "INTERNAL ERROR: " is prepended to the given error string, so don't include this type of thing. Note this will not post a modal error box, since this has proved a problem.


msg

public void msg(java.lang.String s)
Lets the user know a message that's not very important. The message is carried out by printing to the UNIX command line, posting a message box, putting in status bar, or writing to log file, according to the settings.


explain

public void explain(java.lang.String s)
Lets the user know how to use something, by sending text to the status bar.


uerror

public void uerror(java.lang.String s)
Lets the user know they have done something wrong. The message is carried out by printing to the UNIX command line, posting a message box, putting in status bar, or writing to log file, according to the settings. The string "ERROR: " is prepended to the given error string, so don't include this type of thing.


uerrorKey

public void uerrorKey(java.lang.String s)

uerrorKey

public void uerrorKey(java.lang.String s,
                      java.lang.String v)

warn

public void warn(java.lang.String _s)
Lets the user know any kind or warning. The message is carried out by printing to the UNIX command line, posting a message box, putting in status bar, or writing to log file, according to the settings. The string "WARNING: " is prepended to the given error string, so don't include this type of thing.


echoInput

public void echoInput(java.lang.String s)
Fakes an input string to type python box. The given string is put in the input box as if the user typed it. This way things effected by a graphical user interface can be recorded in the input box. Current version does nothing.


confirm

public boolean confirm(java.lang.String s)
Posts a modal confirm box. Use this to ask the user a question before proceeding. Function will not return until user has chosen yes or no


confirmFileFix

public boolean confirmFileFix(ModelNode node,
                              java.lang.String s)
Posts a modal confirm box to ask the user about a proposed fix to a model file that is old. Function will not return until user has chosen yes or no. This function has some special behavior, namely it might return right away if the user has selected "Yes to All", so this should be used instead of confirm for this type of question.


confirmMemoryPurge

public boolean confirmMemoryPurge()
Call this if something runs out of memory.

Returns:
Returns true if memory has been freed and operation may be tried again.

setSupressErrors

public void setSupressErrors(boolean b)