Class SimpleIndenter
java.lang.Object
com.googlecode.jatl.SimpleIndenter
- All Implemented Interfaces:
Indenter
-
Nested Class Summary
Nested classes/interfaces inherited from interface Indenter
Indenter.TagIndentSpot -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleIndenter(String startTagNewLine, String startTagIndent, String endTagNewLine, String endTagIndent) EXPERIMENTAL MAY CHANGE -
Method Summary
Modifier and TypeMethodDescriptionvoidindentTag(Appendable a, int innerDepth, int outerDepth, Indenter.TagIndentSpot spot, String tag, MarkupBuilder.TagClosingPolicy p, boolean empty) Called by the builder to provide whitespace decoration.
-
Field Details
-
startTagNewLine
-
startTagIndent
-
endTagNewLine
-
endTagIndent
-
-
Constructor Details
-
SimpleIndenter
public SimpleIndenter(String startTagNewLine, String startTagIndent, String endTagNewLine, String endTagIndent) EXPERIMENTAL MAY CHANGE- Parameters:
startTagNewLine- null not recommended.startTagIndent- null not recommended.endTagNewLine- null not recommended.endTagIndent- null not recommended.
-
-
Method Details
-
indentTag
public void indentTag(Appendable a, int innerDepth, int outerDepth, Indenter.TagIndentSpot spot, String tag, MarkupBuilder.TagClosingPolicy p, boolean empty) throws IOException Called by the builder to provide whitespace decoration. The arguments provides context of what tag, kind of tag and closing policy etc.EXPERIMENTAL MAY CHANGE
- Specified by:
indentTagin interfaceIndenter- Parameters:
a- writer like object where indenting decoration is to be applied.innerDepth- current indent depth inside the current builder.outerDepth- starting depth based on the outside builder if there is one. Usually this is zero.spot- current position that white space is to be applied.tag- the tag to be indented, notnull.p- closing policy for the tag to be indented.empty- if the tag is empty.- Throws:
IOException- See Also:
-