org.mbari.siam.utils.isiam
Class TC

java.lang.Object
  extended by org.mbari.siam.utils.isiam.TC

public class TC
extends java.lang.Object

Simple utility to generate colored output with sequences understood by typical terminals. (TC stands for "terminal color.") Control sequences are actually output if the static boolean member useColor is true. This member is initialized to true only if the value of the environment variable "tcolor" is "y" or if the value of the system property "tcolor" is "y".

Note that under java1.3, System.getenv will throw java.lang.Error: "getenv no longer supported", but such a call is again valid in later java releases. In this case, the exception is simply ignored and just the system property "tcolor" is taken into account.

For color sequences, see for example here.

Author:
carueda

Field Summary
static boolean useColor
          Initialized with true only if environment variable or system property "tcolor" is defined with value "y".
 
Method Summary
static java.lang.String blue(java.lang.String s)
           
static java.lang.String green(java.lang.String s)
           
static java.lang.String red(java.lang.String s)
           
static java.lang.String yellow(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useColor

public static volatile boolean useColor
Initialized with true only if environment variable or system property "tcolor" is defined with value "y". Value can be changed at any time.

Method Detail

red

public static java.lang.String red(java.lang.String s)

green

public static java.lang.String green(java.lang.String s)

blue

public static java.lang.String blue(java.lang.String s)

yellow

public static java.lang.String yellow(java.lang.String s)


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.