edu.harvard.mgh.purcell.gCLINE.general
Class ErrorManager

java.lang.Object
  extended by edu.harvard.mgh.purcell.gCLINE.general.ErrorManager

public class ErrorManager
extends java.lang.Object

An error manager who creates errors and messages attaced to a given JFrame.

Author:
Kathe Todd-Brown

Nested Class Summary
private  class ErrorManager.myDialog
           
 
Field Summary
private static int max_line_length
          The maximum number of characters per line.
private  javax.swing.JFrame rootFrame
          The JFrame the messages are attaced to.
 
Constructor Summary
ErrorManager(javax.swing.JFrame givenFrame)
          The only constructor.
 
Method Summary
 void createError(java.lang.String message, java.lang.String citation)
          Create an error message with a citation.
 void createMessage(java.lang.String message, java.lang.String citation)
          Create a message with a citation.
private static java.lang.String wrap(java.lang.String text)
          Insert \n into a string to text to wrap the text at a given length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootFrame

private javax.swing.JFrame rootFrame
The JFrame the messages are attaced to.


max_line_length

private static int max_line_length
The maximum number of characters per line.

Constructor Detail

ErrorManager

public ErrorManager(javax.swing.JFrame givenFrame)
The only constructor.

Parameters:
givenFrame - a JFrame that the messages are attached to.
Method Detail

wrap

private static java.lang.String wrap(java.lang.String text)
Insert \n into a string to text to wrap the text at a given length.

Parameters:
text - A String that you want to be wrapped.
Returns:
A String that has text wrapped

createError

public void createError(java.lang.String message,
                        java.lang.String citation)
Create an error message with a citation.

Parameters:
message - A string that holds a message for the user.
citation - A string that allows the programmers to know where the message came from for debugging purposes.

createMessage

public void createMessage(java.lang.String message,
                          java.lang.String citation)
Create a message with a citation.

Parameters:
message - A string that hodls a message for the user.
citation - A string that allows the programers to know where the message came from for debugging purposes.