toolbox.pdf.table
Class PdfMultiTable

Package class diagram package PdfMultiTable
java.lang.Object
  extended by toolbox.pdf.table.PdfMultiTable

public class PdfMultiTable
extends java.lang.Object

Class that generates PDF documents with multiple table structures as the content of the document.


Constructor Summary
PdfMultiTable(java.lang.String name, java.lang.String type)
          Construct a new multi table.
 
Method Summary
 void addTable(java.lang.String name, PdfTable table)
          Add a table description to this multi table.
 void addTitle(java.lang.String lang, java.lang.String content)
          Add a title to this multi table.
 void generatePDF(java.lang.String lang, java.lang.String type, java.util.Map map, java.io.OutputStream os)
          Generate a PDF document based on this PdfMultiTable and direct the output to the given OutputStream
 java.lang.String getTitle(java.lang.String lang)
          Returns the title for the given language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfMultiTable

public PdfMultiTable(java.lang.String name,
                     java.lang.String type)
Construct a new multi table.

Parameters:
name - Name of the document as configured.
type - Document orientation: portrait or landscape.
Method Detail

addTitle

public void addTitle(java.lang.String lang,
                     java.lang.String content)
Add a title to this multi table.

Parameters:
lang - Two letter language code.
content - Contents of the title.

getTitle

public java.lang.String getTitle(java.lang.String lang)
Returns the title for the given language.

Parameters:
lang - Language.
Returns:
String containing title.

addTable

public void addTable(java.lang.String name,
                     PdfTable table)
Add a table description to this multi table.

Parameters:
name - Name of the table.
table - PdfTable instance.

generatePDF

public void generatePDF(java.lang.String lang,
                        java.lang.String type,
                        java.util.Map map,
                        java.io.OutputStream os)
                 throws java.io.IOException
Generate a PDF document based on this PdfMultiTable and direct the output to the given OutputStream

Parameters:
lang - Two letter language code.
type - Override the default page orientation.
map - Map contiaining table instances of data that must be used to populate this table.
Throws:
java.io.IOException - if the document cannot be written.