org.apache.geronimo.gshell.ansi
Class Renderer

java.lang.Object
  extended by org.apache.geronimo.gshell.ansi.Renderer

public class Renderer
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:

Version:
$Rev: 574432 $ $Date: 2007-09-10 19:13:00 -0700 (Mon, 10 Sep 2007) $

Nested Class Summary
static class Renderer.RenderException
           
 
Field Summary
static String BEGIN_TOKEN
           
static String CODE_LIST_SEPARATOR
           
static String CODE_TEXT_SEPARATOR
           
static String END_TOKEN
           
 
Constructor Summary
Renderer()
           
 
Method Summary
static String encode(String text, int code)
           
 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

Renderer

public Renderer()
Method Detail

render

public String render(String input)
              throws Renderer.RenderException
Throws:
Renderer.RenderException

test

public static boolean test(String text)

encode

public static String encode(String text,
                            int code)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.