edu.iastate.utils
Class Debug

java.lang.Object
  extended byedu.iastate.utils.Debug

public class Debug
extends java.lang.Object


Field Summary
(package private) static boolean debugMode
           
 
Constructor Summary
Debug()
           
Debug(boolean mode)
           
 
Method Summary
static void exitError(java.awt.Window frame, java.lang.String errormsg, int errorcode)
          Called when application is crashing . the function prints an error message and exits with the error code specifed.
 boolean getDebugMode()
          If in debug mode
static void pause()
          Stop for user until any key is hitted.
 void setDebugMode(boolean mode)
          Set debug mode
static void showControl(java.awt.Component control)
          to Test a Component
static void systrace(java.lang.Object obj, java.lang.String str)
          Print debug information to system.out
static void trace(boolean i)
           
static void trace(float i)
           
static void trace(int i)
           
static void trace(java.lang.Object str)
          Simpified trace
static void trace(java.lang.Object obj, java.lang.Object str)
          Show a string in a message box example Debug.trace(this,"Info")
static void traceWin(java.lang.Object obj, java.lang.String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugMode

static boolean debugMode
Constructor Detail

Debug

public Debug(boolean mode)

Debug

public Debug()
Method Detail

setDebugMode

public void setDebugMode(boolean mode)
Set debug mode

Parameters:
mode -

getDebugMode

public boolean getDebugMode()
If in debug mode

Returns:
the debug status

trace

public static void trace(java.lang.Object obj,
                         java.lang.Object str)
Show a string in a message box example Debug.trace(this,"Info")

Parameters:
str - : the string to show

trace

public static void trace(java.lang.Object str)
Simpified trace

Parameters:
str - Object
Since:
2004-10-16

trace

public static void trace(int i)

trace

public static void trace(boolean i)

trace

public static void trace(float i)

traceWin

public static void traceWin(java.lang.Object obj,
                            java.lang.String str)
Parameters:
obj - Object
str - String

systrace

public static void systrace(java.lang.Object obj,
                            java.lang.String str)
Print debug information to system.out

Parameters:
obj - Object
str - String

exitError

public static void exitError(java.awt.Window frame,
                             java.lang.String errormsg,
                             int errorcode)
Called when application is crashing . the function prints an error message and exits with the error code specifed.

Parameters:
errormsg - The error message to display.
errorcode - The errorcode to exit with.

showControl

public static void showControl(java.awt.Component control)
to Test a Component

Parameters:
control -

pause

public static void pause()
Stop for user until any key is hitted.