Package noaa.coastwatch.util
Class HTMLReportFormatter
java.lang.Object
noaa.coastwatch.util.HTMLReportFormatter
- All Implemented Interfaces:
ReportFormatter
The
HTMLReportFormatter class formats report data to HTML 3.2.- Since:
- 3.7.1
- Author:
- Peter Hollemans
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HTMLReportFormattercreate()voidend()Ends the report.Gets the HTML content.voidFormats a single line.voidFormats a map of keys to values as a table with two columns.voidFormats a paragraph.voidFormats a section header.voidsetBorderColor(Color border) Sets the HTML table border and header colour (default black).voidsetSpacing(int spacing) Sets the number of characters of space between table columns (default 4).voidstart()Starts the report.voidFormats a table.voidFormats a table with multiple sections.voidFormats a report title.
-
Constructor Details
-
HTMLReportFormatter
protected HTMLReportFormatter()
-
-
Method Details
-
create
-
setBorderColor
Sets the HTML table border and header colour (default black).- Parameters:
border- the new border/header colour.
-
setSpacing
public void setSpacing(int spacing) Sets the number of characters of space between table columns (default 4).- Parameters:
spacing- the new table spacing in characters.
-
getContent
Gets the HTML content.- Returns:
- the HTML content text.
-
start
public void start()Description copied from interface:ReportFormatterStarts the report.- Specified by:
startin interfaceReportFormatter
-
title
Description copied from interface:ReportFormatterFormats a report title.- Specified by:
titlein interfaceReportFormatter- Parameters:
text- the title of the report.
-
section
Description copied from interface:ReportFormatterFormats a section header.- Specified by:
sectionin interfaceReportFormatter- Parameters:
title- the title of the section.
-
paragraph
Description copied from interface:ReportFormatterFormats a paragraph.- Specified by:
paragraphin interfaceReportFormatter- Parameters:
text- the text of the paragraph.
-
line
Description copied from interface:ReportFormatterFormats a single line.- Specified by:
linein interfaceReportFormatter- Parameters:
text- the text of the line.
-
table
Description copied from interface:ReportFormatterFormats a table.- Specified by:
tablein interfaceReportFormatter- Parameters:
columns- the column names.rows- the list of row data values.
-
table
Description copied from interface:ReportFormatterFormats a table with multiple sections.- Specified by:
tablein interfaceReportFormatter- Parameters:
columns- the column names.rowMap- the map of section names to row data values.
-
map
Description copied from interface:ReportFormatterFormats a map of keys to values as a table with two columns.- Specified by:
mapin interfaceReportFormatter- Parameters:
map- the map of keys to values.
-
end
public void end()Description copied from interface:ReportFormatterEnds the report.- Specified by:
endin interfaceReportFormatter
-