nl.lxtreme.ols.util.export
Class HtmlExporterImpl

java.lang.Object
  extended by nl.lxtreme.ols.util.export.HtmlExporterImpl
All Implemented Interfaces:
ExportUtils.HtmlExporter
Direct Known Subclasses:
HtmlFileExporterImpl

public class HtmlExporterImpl
extends Object
implements ExportUtils.HtmlExporter

Provides a very basic HTML exporter.


Nested Class Summary
 
Nested classes/interfaces inherited from interface nl.lxtreme.ols.util.ExportUtils.HtmlExporter
ExportUtils.HtmlExporter.Attribute, ExportUtils.HtmlExporter.Element, ExportUtils.HtmlExporter.MacroResolver
 
Field Summary
 
Fields inherited from interface nl.lxtreme.ols.util.ExportUtils.HtmlExporter
BR, DIV, H1, H2, H3, HR, META, P, SPAN, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR
 
Constructor Summary
HtmlExporterImpl(boolean aIncludeDTD)
          Creates a new HtmlExporter instance.
 
Method Summary
 void addCssStyle(String aStyleClause)
          Adds a CSS-style clause to the "general" style clause in the HTML head container.
 ExportUtils.HtmlExporter.Element getBody()
          Returns the body container of the HTML document.
 ExportUtils.HtmlExporter.Element getHead()
          Returns the head container of the HTML document.
 void setTitle(String aTitle)
          Sets the title of the exported HTML document.
 String toString()
           
 String toString(ExportUtils.HtmlExporter.MacroResolver aResolver)
          Returns the string representation of the HTML-structure, with all macro's resolved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HtmlExporterImpl

public HtmlExporterImpl(boolean aIncludeDTD)
Creates a new HtmlExporter instance.

Parameters:
aIncludeDTD - whether or not a HTML DTD clause should be prepended to the output.
Method Detail

addCssStyle

public void addCssStyle(String aStyleClause)
Adds a CSS-style clause to the "general" style clause in the HTML head container.

Specified by:
addCssStyle in interface ExportUtils.HtmlExporter
Parameters:
aStyleClause - the CSS style clause to add, cannot be null.

getBody

public ExportUtils.HtmlExporter.Element getBody()
Returns the body container of the HTML document.

Specified by:
getBody in interface ExportUtils.HtmlExporter
Returns:
the body container, never null.

getHead

public ExportUtils.HtmlExporter.Element getHead()
Returns the head container of the HTML document.

Specified by:
getHead in interface ExportUtils.HtmlExporter
Returns:
the head container, never null.

setTitle

public void setTitle(String aTitle)
Sets the title of the exported HTML document.

Specified by:
setTitle in interface ExportUtils.HtmlExporter
Parameters:
aTitle - a title, cannot be null.

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

toString

public String toString(ExportUtils.HtmlExporter.MacroResolver aResolver)
Description copied from interface: ExportUtils.HtmlExporter
Returns the string representation of the HTML-structure, with all macro's resolved.

Specified by:
toString in interface ExportUtils.HtmlExporter
Parameters:
aResolver - the macro resolver to use, cannot be null.
Returns:
the string representation of the HTML structure.
See Also:
ExportUtils.HtmlExporter.toString(nl.lxtreme.ols.util.ExportUtils.HtmlExporter.MacroResolver)


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.