public class HTMLTableChartFormatter extends AbstractTableFormatter
Constructor and Description |
---|
HTMLTableChartFormatter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Inserts a reference to the top page and close the HTML file by writing the footing tags, flushing the buffer and
closing the file.
|
void |
closeRow()
Writes the tag to close a row in a table to the file.
|
void |
closeTable()
Inserts the tags needed to close a HTML 3.2 table into the file.
|
void |
closeTableNoTopTag()
Inserts the tags needed to close a HTML 3.2 table into the file.
|
void |
drawChart(Canvas canvas)
Creates a canvas area and draws a chart in this area.
|
java.lang.String |
getFileFormat() |
long |
getFreeCanvasIDNum()
Returns an ID number for a canvas-element
and increases the free ID number.
|
void |
open(java.lang.String name)
Opens a new file with the given fileName for writing a HTML table to.
|
void |
openRow()
Writes the HTML 3.2 tags to open a new row in a table to the file.
|
void |
openTable(java.lang.String s)
Inserts the tags needed to build a HTML 3.2 table heading into the file.
|
boolean |
rowIsOpen()
Returns the status of the current table row that is written to.
|
void |
setOutput(FileOutput out)
Sets an output file to write the table to
|
boolean |
tableIsOpen()
Returns the status of the current table that is written to.
|
void |
writeCell(java.lang.String s,
int spanning)
Creates a new table cell and writes the given String into that cell.
|
void |
writeColoredCell(java.awt.Color cellColor)
Creates a new table cell with the specified color.
|
void |
writeHeading(int style,
java.lang.String s)
Creates a newcentered heading row to print a title in.
|
void |
writeHeadingCell(java.lang.String s)
Creates a new table cell and writes the given String into that cell as
heading cells in bold letters and with centered text.
|
void |
writeHorizontalRuler()
Inserts a reference to the top page and writes the HTML tag for inserting a horizontal ruler into the file.
|
openRow, setTimePrecision, timePrecision, writeTime
public void close()
public void closeRow()
public void closeTable()
public void closeTableNoTopTag()
closeTable()
. This is needed if
one reportable is generating a report that consists of more than one
table (see StockReporter
or HistogramReporter
)public void open(java.lang.String name)
name
- java.lang.String : The name of the file to be createdpublic void openRow()
public void openTable(java.lang.String s)
s
- String : The heading for the tablepublic boolean rowIsOpen()
rowIsOpen
in interface TableFormatter
rowIsOpen
in class AbstractTableFormatter
true
if the method
openRow()
has been called last, false
if the method closeRow()
has been called lastTableFormatter.rowIsOpen()
public void setOutput(FileOutput out)
setOutput
in interface TableFormatter
setOutput
in class AbstractTableFormatter
out
- desmoj.report.FileOutputpublic boolean tableIsOpen()
tableIsOpen
in interface TableFormatter
tableIsOpen
in class AbstractTableFormatter
true
if the method
openTable()
has been called last,
false
if the method closeTable()
has been called lastTableFormatter.tableIsOpen()
public void writeCell(java.lang.String s, int spanning)
s
- java.lang.String : The text to be printed into a cellspanning
- number of cells to spanpublic void writeColoredCell(java.awt.Color cellColor)
cellColor
- java.awt.Color : The color of the cell, that should be created.public void writeHeading(int style, java.lang.String s)
style
- int : The heading style format number for the text to be
printed ins
- java.lang.String : The text to be printed as headingpublic void writeHeadingCell(java.lang.String s)
s
- java.lang.String : The text to be printed into a cellpublic void writeHorizontalRuler()
public void drawChart(Canvas canvas)
canvas
- The canvas containing the chart data to be drawn.public long getFreeCanvasIDNum()
public java.lang.String getFileFormat()
"html"