Class SimpleIndenter

java.lang.Object
com.googlecode.jatl.SimpleIndenter
All Implemented Interfaces:
Indenter

public class SimpleIndenter extends Object implements Indenter
A simple indenter that takes a String for before and after on the opening and closing tag.

EXPERIMENTAL MAY CHANGE

  • Field Details

    • startTagNewLine

      private String startTagNewLine
    • startTagIndent

      private String startTagIndent
    • endTagNewLine

      private String endTagNewLine
    • endTagIndent

      private String 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:
      indentTag in interface Indenter
      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, not null.
      p - closing policy for the tag to be indented.
      empty - if the tag is empty.
      Throws:
      IOException
      See Also: