|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wimpi.telnetd.io.terminal.Colorizer
public final class Colorizer
Singleton utility class for translating internal color/style markup into ANSI defined escape sequences. It uses a very simple but effective lookup table, and does the job without sophisticated parsing routines. It should therefore perform quite fast.
| Method Summary | |
|---|---|
java.lang.String |
colorize(java.lang.String str,
boolean support)
Translates all internal markups within the String into ANSI Escape sequences. The method is hooked into BasicTerminalIO.write(String str), so it is not necessary to call it directly. |
java.lang.String |
colorize(java.lang.String str,
boolean support,
boolean forcebold)
Translates all internal markups within the String into ANSI Escape sequences. The method is hooked into BasicTerminalIO.write(String str), so it is not necessary to call it directly. |
static Colorizer |
getReference()
Returns the reference of the Singleton instance. |
static void |
main(java.lang.String[] args)
Invokes the build in test harness, and will produce styled and colored output directly on the terminal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String colorize(java.lang.String str,
boolean support)
str - String with internal color/style markups.support - boolean that represents Terminals ability to support GR sequences.
if false, the internal markups are ripped out of the string.
public java.lang.String colorize(java.lang.String str,
boolean support,
boolean forcebold)
str - String with internal color/style markups.support - boolean that represents Terminals ability to support GR sequences.
if false, the internal markups are ripped out of the string.forcebold - boolean that forces the output to be bold at any time.
public static Colorizer getReference()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||