Class com.tdac.tools.DevTools
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.tdac.tools.DevTools

java.lang.Object
   |
   +----com.tdac.tools.DevTools

public class DevTools
extends Object
This class provides a debug output window with varying levels of output control. The caller can decide what level of output should be displayed. This allows debug code to remain in the application and it can be turned on or off at will. All methods are static, so there is just one DevTools window per applet/application.
Version:
1.0, 11/11/96
Author:
Timothy D. A. Cox

Variable Index

 o LOG_DEBUG
allow debug level messages to be displayed
 o LOG_OFF
turn messages off
 o LOG_ON
turn messages on

Constructor Index

 o DevTools()

Method Index

 o debug()
turn logging to debug level
 o debug(String)
add a line to the output if logging is turned to debug
 o log(String)
add a line to the output if logging is turned on
 o log_level(int)
set the log level
 o move(int, int)
move the output window to a specific location
 o off()
turn logging off
 o on()
turn logging on
 o show(boolean)
show or hide the output window
 o show(boolean, int, int)
show or hide the output window with a specific size

Variables

 o LOG_OFF
  public final static int LOG_OFF
turn messages off
 o LOG_ON
  public final static int LOG_ON
turn messages on
 o LOG_DEBUG
  public final static int LOG_DEBUG
allow debug level messages to be displayed

Constructors

 o DevTools
  public DevTools()

Methods

 o log_level
  public static void log_level(int lvl)
set the log level
Parameters:
lvl - the logging level to use
 o on
  public static void on()
turn logging on
 o off
  public static void off()
turn logging off
 o debug
  public static void debug()
turn logging to debug level
 o show
  public static void show(boolean flag)
show or hide the output window
Parameters:
flag - true to show, false to hide the output window
 o show
  public static void show(boolean flag,
                          int w,
                          int h)
show or hide the output window with a specific size
Parameters:
flag - true to show, false to hide the output window
w - width of output window
h - height of output window
 o move
  public static void move(int x,
                          int y)
move the output window to a specific location
Parameters:
x - horizontal position of output window
y - vertical position of output window
 o log
  public static void log(String s)
add a line to the output if logging is turned on
Parameters:
s - string to be logged
 o debug
  public static void debug(String s)
add a line to the output if logging is turned to debug
Parameters:
s - string to be logged

All Packages  Class Hierarchy  This Package  Previous  Next  Index