Class PivotTablePrinter

java.lang.Object
ca.spatial.table.PivotTablePrinter

public class PivotTablePrinter extends Object
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 Classes
    Modifier and Type
    Class
    Description
    static class 
    An implementation of the PivotPrinter interface for HTML format
    static class 
    An implementation of the PivotPrinter interface for PDF files
    static interface 
    An interface to render Pivot Table data
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    printHtml​(com.jidesoft.pivot.PivotTablePane pivotTablePane, File output)
    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
    printPdf​(com.jidesoft.pivot.PivotTablePane pivotTablePane, File output)
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • printHtml

      public static void printHtml(com.jidesoft.pivot.PivotTablePane pivotTablePane, PrintStream out)
      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 format
      out - the stream on which the print the table element
    • printHtml

      public static void printHtml(com.jidesoft.pivot.PivotTablePane pivotTablePane, File output)
      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 format
      output - the File reference for the saved output
    • printPdf

      public static void printPdf(com.jidesoft.pivot.PivotTablePane pivotTablePane, OutputStream out)
      Format the pivot table in to PDF format.

      This method must be called on the Swing EDT.

      Parameters:
      pivotTablePane - the pivot table pane to format
      out - the stream on which the print the table
    • printPdf

      public static void printPdf(com.jidesoft.pivot.PivotTablePane pivotTablePane, File output)
      Format the pivot table in to PDF format.

      This method must be called on the Swing EDT.

      Parameters:
      pivotTablePane - the pivot table pane to format
      output - the File reference for the saved output