|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.betabeans.scroogexhtml.converter.Formatter
public final class Formatter
A class which controls line breaks and indentation for the generated output document. This class uses by default a CR LF sequence for a new line, and two spaces for indentation.
Field Summary | |
---|---|
static int |
LEVEL0
No indentation. |
static int |
LEVEL1
First indentation level. |
static int |
LEVEL2
Second indentation level. |
static int |
LEVEL3
Third indentation level. |
static int |
LEVEL4
Fourth indentation level. |
Constructor Summary | |
---|---|
Formatter()
|
Method Summary | |
---|---|
java.lang.String |
add(java.lang.String newLine)
Return the indented string, followed by the line separator. |
java.lang.String |
getIndent(int level)
Get an indent string for the given level. |
int |
getIndentLevel()
Get the current indentation level. |
java.lang.String |
getNewLine()
Get the line separator. |
java.lang.String |
indent(java.lang.String newLine)
Increment the indentation level and return the indented string, followed by the line separator. |
void |
setIndentLevel(int newValue)
Set the indentation level.. |
void |
setNewLine(java.lang.String newValue)
set the line separator. |
void |
setSpaces(java.lang.String newValue)
Specifies the spaces value. |
java.lang.String |
unIndent(java.lang.String newLine)
Decrement the indentation level and return the indented string, followed by the line separator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LEVEL0
public static final int LEVEL1
public static final int LEVEL2
public static final int LEVEL3
public static final int LEVEL4
Constructor Detail |
---|
public Formatter()
Method Detail |
---|
public void setSpaces(java.lang.String newValue)
newValue
- String the new spaces value.public java.lang.String getNewLine()
setNewLine(java.lang.String)
public void setNewLine(java.lang.String newValue)
newValue
- StringgetNewLine()
public int getIndentLevel()
setIndentLevel(int)
public void setIndentLevel(int newValue)
newValue
- intgetIndentLevel()
public java.lang.String getIndent(int level)
level
- int
public java.lang.String indent(java.lang.String newLine)
newLine
- String
public java.lang.String unIndent(java.lang.String newLine)
newLine
- String
public java.lang.String add(java.lang.String newLine)
newLine
- String
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |