Class AbstractHtmlFormatter<StyleObject>

java.lang.Object
com.pnfsoftware.jeb.core.output.AbstractHtmlFormatter<StyleObject>
Type Parameters:
StyleObject - style object type
Direct Known Subclasses:
HtmlTextDocumentFormatter

public abstract class AbstractHtmlFormatter<StyleObject> extends Object
Abstract Class that helps building HTML outputs.
  • Constructor Details

    • AbstractHtmlFormatter

      public AbstractHtmlFormatter(String title, StringBuilder cssdata, boolean insertCopyright)
  • Method Details

    • generate

      protected String generate(CharSequence body)
      Generate the full HTML Document. Should be called by implementor.
      Parameters:
      body - HTML body
      Returns:
      Well formed HTML document
    • generateCssDivStyle

      protected String generateCssDivStyle(StyleObject id)
      Generate the CSS part of a StyleObject. Manages duplicates styles.
      Parameters:
      id - style identifier
      Returns:
      the CSS class name associated with the style, or null if no CSS block was generated
    • generateCssBlock

      protected abstract CharSequence generateCssBlock(StyleObject id, String classname)
    • getClassname

      protected String getClassname(StyleObject id)