org.hyperic.util
Class TextIndenter
java.lang.Object
org.hyperic.util.TextIndenter
public class TextIndenter
- extends java.lang.Object
A class which functions similarly to a StringBuffer, except that
one can call pushIndent/popIndent to change the indentation level.
When the indenter encounters a newline, it automatically positions
the cursor at the next line, indented the proper amount.
Constructor Summary |
TextIndenter()
Create a new TextIndenter with the default # of indentation spaces. |
TextIndenter(int indentAmount)
Create a new TextIndenter with the specified # of indentation spaces. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_INDENT
public static final int DEFAULT_INDENT
- See Also:
- Constant Field Values
TextIndenter
public TextIndenter(int indentAmount)
- Create a new TextIndenter with the specified # of indentation spaces.
- Parameters:
indentAmount
- Number of spaces to indent
TextIndenter
public TextIndenter()
- Create a new TextIndenter with the default # of indentation spaces.
append
public void append(java.lang.String str)
pushIndent
public void pushIndent(int amount)
pushIndent
public void pushIndent()
popIndent
public void popIndent(int amount)
popIndent
public void popIndent()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
main
public static void main(java.lang.String[] args)
Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.