Package ca.spatial.table
Class PivotTablePrinter
java.lang.Object
ca.spatial.table.PivotTablePrinter
This class provides methods to render a pivot table in to
HTML or PDF format.
The easiest way to use this class is to call the static methods
printHtml(com.jidesoft.pivot.PivotTablePane, java.io.PrintStream)
and printPdf(com.jidesoft.pivot.PivotTablePane, java.io.OutputStream)
.
To extend to other formats add a class that implements the
PivotTablePrinter.PivotPrinter
interface.
Note that access to the underlying PivotTablePane must be done on the Swng EDT thread. For correct operation all methods in this class must be called on the EDT.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An implementation of the PivotPrinter interface for HTML formatstatic class
An implementation of the PivotPrinter interface for PDF filesstatic interface
An interface to render Pivot Table data -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Format the pivot table in to HTML and save in a file.static void
printHtml(com.jidesoft.pivot.PivotTablePane pivotTablePane, PrintStream out)
Format the pivot table in to HTML.static void
Format the pivot table in to PDF format.static void
printPdf(com.jidesoft.pivot.PivotTablePane pivotTablePane, OutputStream out)
Format the pivot table in to PDF format.
-
Method Details
-
printHtml
Format the pivot table in to HTML. This method will only return the table element. The enclosing html page and body must be provided by the caller.- Parameters:
pivotTablePane
- the pivot table pane to formatout
- the stream on which the print the table element
-
printHtml
Format the pivot table in to HTML and save in a file. This method will provide a complete html page suitable for viewing in a browser.This method must be called on the Swing EDT.
- Parameters:
pivotTablePane
- the pivot table pane to formatoutput
- the File reference for the saved output
-
printPdf
Format the pivot table in to PDF format.This method must be called on the Swing EDT.
- Parameters:
pivotTablePane
- the pivot table pane to formatout
- the stream on which the print the table
-
printPdf
Format the pivot table in to PDF format.This method must be called on the Swing EDT.
- Parameters:
pivotTablePane
- the pivot table pane to formatoutput
- the File reference for the saved output
-