|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--s2iError
A class for reporting SpiTran messages using any combination of a modal dialog, a log file, and stdout printing.
s2iDBOpenListener
Field Summary | |
private static boolean |
DBG_MSG
Show DEBUG messages? |
static int |
DEBUG
This is a debug message, only shown in debug mode. |
static int |
DISPLAY
Show the message in stdout. |
private static java.lang.String |
DLG_TITLE
Title for popup dialog windows. |
static int |
ERR
This is an error message. |
static int |
FATAL
This is a fatal error message. |
static int |
INFO
This is an information message. |
static int |
LOG
Show the message the SpiTran.log file. |
private static java.io.PrintWriter |
logFile
The log file. |
static java.lang.String |
LogFileName
Name of the log file. |
private static boolean |
logOpen
Is the log file open? |
private static int |
MAXLOGS
Number of log file versions to archive. |
static int |
N_SEVERITIES
The highest severity code allowed. |
static int |
POPUP
Show the message in a popup modal dialog. |
static int |
QUEST
This is a question message, requiring a response. |
private static java.lang.String[] |
SEV_STR
Vector of message prefix strings for each severity level. |
static int |
WARN
This is a warning message. |
Constructor Summary | |
s2iError()
|
Method Summary | |
(package private) static void |
|
(package private) static void |
|
static void |
closeLog()
Close the log file. |
static void |
Debug(java.lang.String msg)
Show a debug message. |
static boolean |
IsLogOpen()
Determine if the log file is open. |
static void |
main(java.lang.String[] args)
Test the s2iError class. |
private static void |
mvLogs()
Archive previous log files by renaming them with number suffixes. |
private static java.lang.String |
nxtLogName(java.lang.String Name)
Does the following conversion: SpiTran.log --> SpiTran.log,1 --> SpiTran.log,2 --> SpiTran.log,3 |
private static boolean |
openLog()
Open an existing Log File and appends to it. |
static boolean |
openNewLog()
Open the log file. |
private static void |
PrintDlgMsg(java.lang.String Msg,
int severity,
java.awt.Component parent)
Show a message in a dialog box. |
private static void |
PrintLogMsg(java.lang.String Msg,
int severity)
Show a message by printing to stdout. |
static void |
PrintMsg(java.lang.String Msg,
int severity,
int Options,
java.awt.Component parent)
Show a message using all specified means. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
Field Detail |
public static final int POPUP
public static final int LOG
public static final int DISPLAY
public static final int DEBUG
public static final int QUEST
public static final int INFO
public static final int WARN
public static final int ERR
public static final int FATAL
public static final int N_SEVERITIES
private static final java.lang.String[] SEV_STR
public static final java.lang.String LogFileName
private static java.io.PrintWriter logFile
private static final java.lang.String DLG_TITLE
private static final int MAXLOGS
private static boolean logOpen
private static final boolean DBG_MSG
Constructor Detail |
public s2iError()
Method Detail |
static void()
static void()
public static final void Debug(java.lang.String msg)
Msg
- The debug message Stringpublic static final void PrintMsg(java.lang.String Msg, int severity, int Options, java.awt.Component parent)
Msg
- The message StringThe
- severity level, one of: DEBUG QUEST INFO WARN ERR FATALOptions
- Any combination of: POPUP LOG DISPLAYparent
- Determines the Frame in which the dialog is displayed.
If null, or if the parent Component has no Frame, a
default Frame is used.private static final void PrintDlgMsg(java.lang.String Msg, int severity, java.awt.Component parent)
Msg
- The message StringThe
- severity level, one of: DEBUG QUEST INFO WARN ERR FATALparent
- Determines the Frame in which the dialog is displayed.
If null, or if the parent Component has no Frame, a
default Frame is used.private static final void PrintLogMsg(java.lang.String Msg, int severity)
Msg
- The message StringThe
- severity level, one of: DEBUG QUEST INFO WARN ERR FATALprivate static java.lang.String nxtLogName(java.lang.String Name)
Name
- Name String of the current log file.private static final void mvLogs()
private static final boolean openLog()
public static final boolean openNewLog() throws java.io.IOException
public static final void closeLog()
public static final boolean IsLogOpen()
public static void main(java.lang.String[] args)
args
- unused
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |