|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer java.io.PrintWriter org.freehep.util.io.IndentPrintWriter
public class IndentPrintWriter
A PrintWriter that keeps track of an indentation level and indents the output appropriately.
Field Summary |
---|
Fields inherited from class java.io.PrintWriter |
---|
out |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
IndentPrintWriter(Writer w)
Creates an Indent PrintWriter with indentation level 0. |
|
IndentPrintWriter(Writer w,
int level)
Creates an Indent PrintWriter. |
Method Summary | |
---|---|
int |
getIndent()
Return the current indent count |
String |
getIndentString()
Return the current indentString |
void |
indent()
Increase the indentation |
void |
outdent()
Decrease the indentation |
void |
print(boolean s)
|
void |
print(char s)
|
void |
print(char[] s)
|
void |
print(double s)
|
void |
print(float s)
|
void |
print(int s)
|
void |
print(long s)
|
void |
print(Object s)
|
void |
print(String s)
|
void |
println()
|
void |
setIndent(int level)
Set the current indent count |
void |
setIndentString(String indentString)
Set the current indentString. |
Methods inherited from class java.io.PrintWriter |
---|
append, append, append, append, append, append, append, append, append, checkError, close, flush, format, format, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndentPrintWriter(Writer w, int level)
w
- writer to write tolevel
- starting indentation levelpublic IndentPrintWriter(Writer w)
w
- writer to write toMethod Detail |
---|
public void print(boolean s)
print
in class PrintWriter
public void print(char s)
print
in class PrintWriter
public void print(char[] s)
print
in class PrintWriter
public void print(double s)
print
in class PrintWriter
public void print(float s)
print
in class PrintWriter
public void print(int s)
print
in class PrintWriter
public void print(long s)
print
in class PrintWriter
public void print(Object s)
print
in class PrintWriter
public void print(String s)
print
in class PrintWriter
public void println()
println
in class PrintWriter
public void indent()
public void outdent()
public int getIndent()
public void setIndent(int level)
level
- new levelpublic String getIndentString()
setIndentString(String)
public void setIndentString(String indentString)
indentString
- The characters to prefix each line with (repeated for
each indent level)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |