|
UTF-X, Unit Testing Framework - Xslt | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object utfx.printers.AnsiString
public class AnsiString
This class represents an ANSI colour escaped string. An ANSI string will produce colour output on terminals that support ANSI colour escaping. Linux console and xterm are examples of such terminals.
Copyright © 2004 - University of Southern Queensland.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
$Source: /cvs/utf-x/framework/src/java/utfx/printers/AnsiString.java,v $
Nested Class Summary | |
---|---|
static class |
AnsiString.Colour
|
Field Summary | |
---|---|
private static boolean |
ansiColour
if this is true then the toString() method will return ANSI escaped string. |
private static java.lang.String |
BLUE_ESC
escape sequence for blue |
private AnsiString.Colour |
colour
this strings colour |
private static java.lang.String |
CYAN_ESC
escape sequence for cyan |
private static java.lang.String |
GREEN_ESC
escape sequence for green |
private static java.lang.String |
PURPLE_ESC
escape sequence for purple |
private java.lang.String |
rawContent
content of this ANSI string WITHOUT colour escape sequences |
private static java.lang.String |
RED_ESC
escape sequence for red |
private static java.lang.String |
RESET_ESC
escape sequence to reset back to the default colour |
private static long |
serialVersionUID
Comment for serialVersionUID |
private static java.lang.String |
YELLOW_ESC
escape sequence for yellow |
Constructor Summary | |
---|---|
AnsiString(java.lang.String rawContent,
AnsiString.Colour colour)
Construct a new colour ANSI String. |
|
AnsiString(java.lang.StringBuffer stringBuffer,
AnsiString.Colour colour)
Construct a new colour ANSI String. |
Method Summary | |
---|---|
static void |
disableAnsiColour()
method to turn off ANSI escaping. |
static void |
enableAnsiColour()
method to turn on ANSI escaping. |
private java.lang.String |
getAnsiString()
|
static void |
main(java.lang.String[] s)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
serialVersionUID
private static final java.lang.String RED_ESC
private static final java.lang.String GREEN_ESC
private static final java.lang.String BLUE_ESC
private static final java.lang.String PURPLE_ESC
private static final java.lang.String CYAN_ESC
private static final java.lang.String YELLOW_ESC
private static final java.lang.String RESET_ESC
private java.lang.String rawContent
private AnsiString.Colour colour
private static boolean ansiColour
Constructor Detail |
---|
public AnsiString(java.lang.String rawContent, AnsiString.Colour colour)
rawContent
- string to wrap in ANSI colourcolour
- colour ANSI escape sequence to wrap around the stringpublic AnsiString(java.lang.StringBuffer stringBuffer, AnsiString.Colour colour)
stringBuffer
- string to wrap in ANSI colourcolour
- colour ANSI escape sequence to wrap around the stringMethod Detail |
---|
public static void disableAnsiColour()
public static void enableAnsiColour()
private java.lang.String getAnsiString()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] s)
|
UTF-X, Unit Testing Framework - Xslt | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |