public class HtmlWriter extends Object
It allows the constructions of tables and other reporting structures
| Modifier and Type | Class and Description |
|---|---|
static class |
HtmlWriter.HtmlValue
Class utilized to hold a value with a CSS class
|
| Constructor and Description |
|---|
HtmlWriter(FormattingPrintStream out,
Environment environment)
Construct a writer to output to the out stream
|
| Modifier and Type | Method and Description |
|---|---|
void |
epilogue()
Write the report header
|
void |
heading(String text)
Add a heading block
|
void |
item(String text)
Add an entry of text.
|
void |
item(String text,
String subtext)
Add an entry with a small subtitle to the report
|
static HtmlWriter.HtmlValue |
left(Object o)
Create an element aligned left, for output in a table
|
void |
preface()
Write the report header
|
static HtmlWriter.HtmlValue |
right(Object o)
Create an element aligned right, for output in a table
|
void |
subHeading(String text)
Add a subheading block
|
void |
subTitle(String text)
Add a subtitle block
|
void |
tableEnd()
Terminate one table
|
void |
tableHead(String type,
HtmlWriter.HtmlValue... columnHeadersAndClasses)
Write the heading of a column to HTML
|
void |
tableOneCellRow(String value,
String className)
Produce a row in a table with one cell
|
void |
tableRow(HtmlWriter.HtmlValue... valuesAndClasses)
Write the contents of one row of data as per the values
|
void |
title(String text)
Add a title block
|
public HtmlWriter(FormattingPrintStream out, Environment environment)
out - is the stream to write toenvironment - is the environment, used for the report templatepublic void preface()
public void epilogue()
public void tableHead(String type, HtmlWriter.HtmlValue... columnHeadersAndClasses)
type - is the CSS classname of the tablecolumnHeadersAndClasses - is the column descriptorspublic void tableRow(HtmlWriter.HtmlValue... valuesAndClasses)
valuesAndClasses - is the array of values with their CSS classespublic void tableOneCellRow(String value, String className)
value - the text of the cellclassName - the CSS class name of the cellpublic void tableEnd()
public void heading(String text)
text - is the text in the blockpublic void subHeading(String text)
text - is the text in the blockpublic void title(String text)
text - is the text in the blockpublic void subTitle(String text)
text - is the text in the blockpublic void item(String text)
text - is the text in the blockpublic void item(String text, String subtext)
text - the text of the itemsubtext - the little subtitlepublic static HtmlWriter.HtmlValue left(Object o)
o - is the object to emitpublic static HtmlWriter.HtmlValue right(Object o)
o - is the object to emitCopyright © 2017. All rights reserved.