org.fusesource.jansi
Class AnsiRenderer

java.lang.Object
  extended by org.fusesource.jansi.AnsiRenderer

public class AnsiRenderer
extends Object

Renders ANSI color escape-codes in strings by parsing out some special syntax to pick up the correct fluff to use.

The syntax for embedded ANSI codes is:

   @|code(,code)* text|@
 
Examples:
   @|bold Hello|@
 
   @|bold,red Warning!|@
 

Since:
1.1
Author:
Jason Dillon, Hiram Chirino

Nested Class Summary
static class AnsiRenderer.Code
           
 
Field Summary
static String BEGIN_TOKEN
           
static String CODE_LIST_SEPARATOR
           
static String CODE_TEXT_SEPARATOR
           
static String END_TOKEN
           
 
Constructor Summary
AnsiRenderer()
           
 
Method Summary
static String render(String input)
           
static boolean test(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEGIN_TOKEN

public static final String BEGIN_TOKEN
See Also:
Constant Field Values

END_TOKEN

public static final String END_TOKEN
See Also:
Constant Field Values

CODE_TEXT_SEPARATOR

public static final String CODE_TEXT_SEPARATOR
See Also:
Constant Field Values

CODE_LIST_SEPARATOR

public static final String CODE_LIST_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

AnsiRenderer

public AnsiRenderer()
Method Detail

render

public static String render(String input)
                     throws IllegalArgumentException
Throws:
IllegalArgumentException

test

public static boolean test(String text)


Copyright © 2009-2010 Progress Software Inc.. All Rights Reserved.