javawrapper.ErrorGUI Class Reference

This class handles all error message writing. More...

List of all members.

Public Member Functions

 ErrorGUI (JFrame oParent)
 Constructor.
 ErrorGUI (javax.swing.JInternalFrame oParent)
 Constructor.
 ErrorGUI (JDialog oParent)
 Constructor.
void WriteErrorMessage (ModelException oErr)
 This function is the one-stop shop for writing error messages to screen.

Static Public Attributes

static final int UNKNOWN = 0
 Message of unknown type.
static final int NO_MESSAGE = 1
 You can pass no message.
static final int PAUSE_RUN = 2
 Request to pause run.
static final int RUN = 3
 Request to run model.
static final int INPUT_FILE = 4
 Request to input file.
static final int QUIT = 5
 Request to quit model.
static final int MODEL_READY = 6
 Model is in ready state.
static final int MODEL_NOT_READY = 7
 Model is not in ready state.
static final int MODEL_PAUSED = 8
 Model is paused.
static final int RUN_COMPLETE = 9
 Requested run is complete.
static final int COMMAND_DONE = 10
 Model is finished executing command.
static final int INFO = 11
 Message in the strMoreInfo string will be passed to the user.
static final int BAD_ARGUMENT = 12
 A bad or missing argument has been passed from the interface for a command.
static final int BAD_COMMAND = 13
 A bad command has been passed from the interface.
static final int CANT_FIND_OBJECT = 14
 An object could not be found.
static final int TREE_WRONG_TYPE = 15
 A tree was not of an expected type.
static final int ACCESS_VIOLATION = 16
 An access violation occurred.
static final int BAD_FILE = 17
 Bad file name or path - couldn't open the file.
static final int BAD_FILE_TYPE = 18
 A file was not an expected type.
static final int BAD_XML_FILE = 19
 XML file is malformed or invalid.
static final int NEED_FILE = 20
 Expected file name and didn't get one.
static final int FILE_TOO_OLD = 26
 File is too old to use.
static final int DATA_MISSING = 21
 Couldn't find needed data in file.
static final int BAD_DATA = 22
 Data was scrambled, of incorrect type, or otherwise invalid.
static final int DATA_READ_ONLY = 23
 Data isn't accessible for writing.
static final int ILLEGAL_OP = 24
 Illegal operation.
static final int TAB_FILE_PREMATURE_END = 25
 Unexpected end to tab-format file.

Private Member Functions

void ShowError (String sMsg)
 Displays a message to the screen.
void WriteBadFile (ModelException oErr)
 This type of error is called when a file cannot be opened or read.
void WriteBadXMLFile (ModelException oErr)
 This is called when an XML file (probably parameter file) is not well-formed or it's invalid - in other words, the parser chokes on it.
void WriteDataMissingFromFile (ModelException oErr)
 This is called when a behavior can't find data it needs.
void WriteBadFileType (ModelException oErr)
 This is called when a file type that the model wasn't expecting is passed.
void WriteBadData (ModelException oErr)
 This is a panic error when a function in the model gets bad data - nothing the user can do about this one.
void WriteIllegalOp (ModelException oErr)
 An illegal operation was attempted in the code - nothing the user can do about this one.
void WriteDataReadOnly (ModelException oErr)
 Some model object tried to poach somebody else's data, or something - anyway, it's yet another internal thing the user can't do anything about.
void WriteCantFindObject (ModelException oErr)
 Something can't be found.
void WriteTreeWrongType (ModelException oErr)
 An internal error - some behavior got a tree type they didn't expect.
void WriteAccessViolation (ModelException oErr)
 Access violation error - right now nobody calls this.
void WriteUnknownError (ModelException oErr)
 Unknown error type.
void WriteBadTabFile (ModelException oErr)
 Write error about a problem with a tab-delimited input file.
void WriteJavaError (ModelException oErr)
 Write an error that was thrown in the Java code, with a user message which needs no additional help or formatting.
void WriteFileTooOld (ModelException oErr)
 Write that a file was too old to use.

Private Attributes

java.awt.Component m_oParent
 Parent container to display error messages in.


Detailed Description

This class handles all error message writing.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0
Todo:
Put in error writing functions for Java errors
Todo:
Put in documentation If you wish to simply display an error message, set the calling function to "JAVA". Otherwise you will get a default error message according to the error code.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
July 19, 2004: Expanded the number of containers this class can work with (LEM)

Constructor & Destructor Documentation

javawrapper.ErrorGUI.ErrorGUI ( JFrame  oParent  ) 

Constructor.

Parameters:
oParent A window over which to display messages

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

javawrapper.ErrorGUI.ErrorGUI ( javax.swing.JInternalFrame  oParent  ) 

Constructor.

Parameters:
oParent A window over which to display messages

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

javawrapper.ErrorGUI.ErrorGUI ( JDialog  oParent  ) 

Constructor.

Parameters:
oParent A window over which to display messages

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Member Function Documentation

void javawrapper.ErrorGUI.ShowError ( String  sMsg  )  [private]

Displays a message to the screen.

Parameters:
sMsg Message to display.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
October 21, 2005: Broke up the strings to look good on smaller displays (LEM)

void javawrapper.ErrorGUI.WriteErrorMessage ( ModelException  oErr  ) 

This function is the one-stop shop for writing error messages to screen.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteBadFile ( ModelException  oErr  )  [private]

This type of error is called when a file cannot be opened or read.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteBadXMLFile ( ModelException  oErr  )  [private]

This is called when an XML file (probably parameter file) is not well-formed or it's invalid - in other words, the parser chokes on it.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteDataMissingFromFile ( ModelException  oErr  )  [private]

This is called when a behavior can't find data it needs.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteBadFileType ( ModelException  oErr  )  [private]

This is called when a file type that the model wasn't expecting is passed.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteBadData ( ModelException  oErr  )  [private]

This is a panic error when a function in the model gets bad data - nothing the user can do about this one.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteIllegalOp ( ModelException  oErr  )  [private]

An illegal operation was attempted in the code - nothing the user can do about this one.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteDataReadOnly ( ModelException  oErr  )  [private]

Some model object tried to poach somebody else's data, or something - anyway, it's yet another internal thing the user can't do anything about.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteCantFindObject ( ModelException  oErr  )  [private]

Something can't be found.

Could be an internal error, or could refer to library setup.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteTreeWrongType ( ModelException  oErr  )  [private]

An internal error - some behavior got a tree type they didn't expect.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteAccessViolation ( ModelException  oErr  )  [private]

Access violation error - right now nobody calls this.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteUnknownError ( ModelException  oErr  )  [private]

Unknown error type.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteBadTabFile ( ModelException  oErr  )  [private]

Write error about a problem with a tab-delimited input file.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteJavaError ( ModelException  oErr  )  [private]

Write an error that was thrown in the Java code, with a user message which needs no additional help or formatting.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper.ErrorGUI.WriteFileTooOld ( ModelException  oErr  )  [private]

Write that a file was too old to use.

Parameters:
oErr Error to display

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Member Data Documentation

java.awt.Component javawrapper.ErrorGUI.m_oParent [private]

Parent container to display error messages in.

final int javawrapper.ErrorGUI.UNKNOWN = 0 [static]

Message of unknown type.

final int javawrapper.ErrorGUI.NO_MESSAGE = 1 [static]

You can pass no message.

final int javawrapper.ErrorGUI.PAUSE_RUN = 2 [static]

Request to pause run.

final int javawrapper.ErrorGUI.RUN = 3 [static]

Request to run model.

final int javawrapper.ErrorGUI.INPUT_FILE = 4 [static]

Request to input file.

final int javawrapper.ErrorGUI.QUIT = 5 [static]

Request to quit model.

final int javawrapper.ErrorGUI.MODEL_READY = 6 [static]

Model is in ready state.

final int javawrapper.ErrorGUI.MODEL_NOT_READY = 7 [static]

Model is not in ready state.

final int javawrapper.ErrorGUI.MODEL_PAUSED = 8 [static]

Model is paused.

final int javawrapper.ErrorGUI.RUN_COMPLETE = 9 [static]

Requested run is complete.

final int javawrapper.ErrorGUI.COMMAND_DONE = 10 [static]

Model is finished executing command.

final int javawrapper.ErrorGUI.INFO = 11 [static]

Message in the strMoreInfo string will be passed to the user.

final int javawrapper.ErrorGUI.BAD_ARGUMENT = 12 [static]

A bad or missing argument has been passed from the interface for a command.

final int javawrapper.ErrorGUI.BAD_COMMAND = 13 [static]

A bad command has been passed from the interface.

final int javawrapper.ErrorGUI.CANT_FIND_OBJECT = 14 [static]

An object could not be found.

final int javawrapper.ErrorGUI.TREE_WRONG_TYPE = 15 [static]

A tree was not of an expected type.

final int javawrapper.ErrorGUI.ACCESS_VIOLATION = 16 [static]

An access violation occurred.

final int javawrapper.ErrorGUI.BAD_FILE = 17 [static]

Bad file name or path - couldn't open the file.

final int javawrapper.ErrorGUI.BAD_FILE_TYPE = 18 [static]

A file was not an expected type.

final int javawrapper.ErrorGUI.BAD_XML_FILE = 19 [static]

XML file is malformed or invalid.

final int javawrapper.ErrorGUI.NEED_FILE = 20 [static]

Expected file name and didn't get one.

final int javawrapper.ErrorGUI.FILE_TOO_OLD = 26 [static]

File is too old to use.

final int javawrapper.ErrorGUI.DATA_MISSING = 21 [static]

Couldn't find needed data in file.

final int javawrapper.ErrorGUI.BAD_DATA = 22 [static]

Data was scrambled, of incorrect type, or otherwise invalid.

final int javawrapper.ErrorGUI.DATA_READ_ONLY = 23 [static]

Data isn't accessible for writing.

final int javawrapper.ErrorGUI.ILLEGAL_OP = 24 [static]

Illegal operation.

Unexpected end to tab-format file.


The documentation for this class was generated from the following file:

Generated on Tue Apr 19 13:59:39 2011 for SORTIE Java Interface by  doxygen 1.5.6