SORTIE Java Interface  1
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
sortie.gui.ErrorGUI Class Reference

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

Public Member Functions

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

Static Public Attributes

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

Private Member Functions

void showError (String sMsg)
 Displays a message to the screen. More...
 
void writeBadFile (ModelException oErr)
 This type of error is called when a file cannot be opened or read. More...
 
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. More...
 
void writeDataMissingFromFile (ModelException oErr)
 This is called when a behavior can't find data it needs. More...
 
void writeBadFileType (ModelException oErr)
 This is called when a file type that the model wasn't expecting is passed. More...
 
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. More...
 
void writeIllegalOp (ModelException oErr)
 An illegal operation was attempted in the code - nothing the user can do about this one. More...
 
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. More...
 
void writeCantFindObject (ModelException oErr)
 Something can't be found. More...
 
void writeTreeWrongType (ModelException oErr)
 An internal error - some behavior got a tree type they didn't expect. More...
 
void writeAccessViolation (ModelException oErr)
 Access violation error - right now nobody calls this. More...
 
void writeUnknownError (ModelException oErr)
 Unknown error type. More...
 
void writeBadTabFile (ModelException oErr)
 Write error about a problem with a tab-delimited input file. More...
 
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. More...
 
void WriteFileTooOld (ModelException oErr)
 Write that a file was too old to use. More...
 

Private Attributes

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

Detailed Description

This class handles all error message writing.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0
Todo:

Put in error writing functions for Java errors

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

◆ ErrorGUI() [1/3]

sortie.gui.ErrorGUI.ErrorGUI ( JFrame  oParent)

Constructor.

Parameters
oParentA window over which to display messages


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

◆ ErrorGUI() [2/3]

sortie.gui.ErrorGUI.ErrorGUI ( javax.swing.JInternalFrame  oParent)

Constructor.

Parameters
oParentA window over which to display messages

◆ ErrorGUI() [3/3]

sortie.gui.ErrorGUI.ErrorGUI ( JDialog  oParent)

Constructor.

Parameters
oParentA window over which to display messages

Member Function Documentation

◆ showError()

void sortie.gui.ErrorGUI.showError ( String  sMsg)
private

Displays a message to the screen.

Parameters
sMsgMessage to display.

◆ writeAccessViolation()

void sortie.gui.ErrorGUI.writeAccessViolation ( ModelException  oErr)
private

Access violation error - right now nobody calls this.

Parameters
oErrError to display

◆ writeBadData()

void sortie.gui.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
oErrError to display

◆ writeBadFile()

void sortie.gui.ErrorGUI.writeBadFile ( ModelException  oErr)
private

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

Parameters
oErrError to display

◆ writeBadFileType()

void sortie.gui.ErrorGUI.writeBadFileType ( ModelException  oErr)
private

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

Parameters
oErrError to display

◆ writeBadTabFile()

void sortie.gui.ErrorGUI.writeBadTabFile ( ModelException  oErr)
private

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

Parameters
oErrError to display

◆ writeBadXMLFile()

void sortie.gui.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
oErrError to display

◆ writeCantFindObject()

void sortie.gui.ErrorGUI.writeCantFindObject ( ModelException  oErr)
private

Something can't be found.

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

Parameters
oErrError to display

◆ writeDataMissingFromFile()

void sortie.gui.ErrorGUI.writeDataMissingFromFile ( ModelException  oErr)
private

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

Parameters
oErrError to display

◆ writeDataReadOnly()

void sortie.gui.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
oErrError to display

◆ writeErrorMessage()

void sortie.gui.ErrorGUI.writeErrorMessage ( ModelException  oErr)

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

Parameters
oErrError to display

◆ WriteFileTooOld()

void sortie.gui.ErrorGUI.WriteFileTooOld ( ModelException  oErr)
private

Write that a file was too old to use.

Parameters
oErrError to display

◆ writeIllegalOp()

void sortie.gui.ErrorGUI.writeIllegalOp ( ModelException  oErr)
private

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

Parameters
oErrError to display

◆ writeJavaError()

void sortie.gui.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
oErrError to display

◆ writeTreeWrongType()

void sortie.gui.ErrorGUI.writeTreeWrongType ( ModelException  oErr)
private

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

Parameters
oErrError to display

◆ writeUnknownError()

void sortie.gui.ErrorGUI.writeUnknownError ( ModelException  oErr)
private

Unknown error type.

Parameters
oErrError to display

Member Data Documentation

◆ ACCESS_VIOLATION

final int sortie.gui.ErrorGUI.ACCESS_VIOLATION = 16
static

An access violation occurred.

◆ BAD_ARGUMENT

final int sortie.gui.ErrorGUI.BAD_ARGUMENT = 12
static

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

◆ BAD_COMMAND

final int sortie.gui.ErrorGUI.BAD_COMMAND = 13
static

A bad command has been passed from the interface.

◆ BAD_DATA

final int sortie.gui.ErrorGUI.BAD_DATA = 22
static

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

◆ BAD_FILE

final int sortie.gui.ErrorGUI.BAD_FILE = 17
static

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

◆ BAD_FILE_TYPE

final int sortie.gui.ErrorGUI.BAD_FILE_TYPE = 18
static

A file was not an expected type.

◆ BAD_XML_FILE

final int sortie.gui.ErrorGUI.BAD_XML_FILE = 19
static

XML file is malformed or invalid.

◆ CANT_FIND_OBJECT

final int sortie.gui.ErrorGUI.CANT_FIND_OBJECT = 14
static

An object could not be found.

◆ COMMAND_DONE

final int sortie.gui.ErrorGUI.COMMAND_DONE = 10
static

Model is finished executing command.

◆ DATA_MISSING

final int sortie.gui.ErrorGUI.DATA_MISSING = 21
static

Couldn't find needed data in file.

◆ DATA_READ_ONLY

final int sortie.gui.ErrorGUI.DATA_READ_ONLY = 23
static

Data isn't accessible for writing.

◆ FILE_TOO_OLD

final int sortie.gui.ErrorGUI.FILE_TOO_OLD = 26
static

File is too old to use.

◆ ILLEGAL_OP

final int sortie.gui.ErrorGUI.ILLEGAL_OP = 24
static

Illegal operation.

◆ INFO

final int sortie.gui.ErrorGUI.INFO = 11
static

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

◆ INPUT_FILE

final int sortie.gui.ErrorGUI.INPUT_FILE = 4
static

Request to input file.

◆ m_oParent

java.awt.Component sortie.gui.ErrorGUI.m_oParent
private

Parent container to display error messages in.

◆ MODEL_NOT_READY

final int sortie.gui.ErrorGUI.MODEL_NOT_READY = 7
static

Model is not in ready state.

◆ MODEL_PAUSED

final int sortie.gui.ErrorGUI.MODEL_PAUSED = 8
static

Model is paused.

◆ MODEL_READY

final int sortie.gui.ErrorGUI.MODEL_READY = 6
static

Model is in ready state.

◆ NEED_FILE

final int sortie.gui.ErrorGUI.NEED_FILE = 20
static

Expected file name and didn't get one.

◆ NO_MESSAGE

final int sortie.gui.ErrorGUI.NO_MESSAGE = 1
static

You can pass no message.

◆ PAUSE_RUN

final int sortie.gui.ErrorGUI.PAUSE_RUN = 2
static

Request to pause run.

◆ QUIT

final int sortie.gui.ErrorGUI.QUIT = 5
static

Request to quit model.

◆ RUN

final int sortie.gui.ErrorGUI.RUN = 3
static

Request to run model.

◆ RUN_COMPLETE

final int sortie.gui.ErrorGUI.RUN_COMPLETE = 9
static

Requested run is complete.

◆ TAB_FILE_PREMATURE_END

final int sortie.gui.ErrorGUI.TAB_FILE_PREMATURE_END = 25
static

Unexpected end to tab-format file.

◆ TREE_WRONG_TYPE

final int sortie.gui.ErrorGUI.TREE_WRONG_TYPE = 15
static

A tree was not of an expected type.

◆ UNKNOWN

final int sortie.gui.ErrorGUI.UNKNOWN = 0
static

Message of unknown type.


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