ca.sqlpower.architect.profile.output
Class ProfilePDFFormat

java.lang.Object
  extended by ca.sqlpower.architect.profile.output.ProfilePDFFormat
All Implemented Interfaces:
ProfileFormat

public class ProfilePDFFormat
extends java.lang.Object
implements ProfileFormat


Constructor Summary
ProfilePDFFormat()
           
 
Method Summary
 void format(java.io.OutputStream out, java.util.List<ProfileResult> profileResults)
          Outputs a PDF file report of the data in drs to the given output stream.
protected  ca.sqlpower.architect.profile.output.ProfilePDFFormat.ProfileTableStructure makeNextTable(TableProfileResult result, com.lowagie.text.pdf.PdfPTable table, com.lowagie.text.pdf.BaseFont bf, float fsize, float[] widths)
          Creates a PdfPTable of the data in profile from its current cursor position up to the end of the current break.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfilePDFFormat

public ProfilePDFFormat()
Method Detail

format

public void format(java.io.OutputStream out,
                   java.util.List<ProfileResult> profileResults)
            throws com.lowagie.text.DocumentException,
                   java.io.IOException,
                   java.sql.SQLException,
                   ArchitectException,
                   java.lang.InstantiationException,
                   java.lang.IllegalAccessException,
                   java.lang.ClassNotFoundException
Outputs a PDF file report of the data in drs to the given output stream.

Specified by:
format in interface ProfileFormat
Parameters:
out - The file to write to.
profileResults - The list of SQL Tables
Throws:
ArchitectException
java.lang.IllegalAccessException
java.lang.InstantiationException
com.lowagie.text.DocumentException
java.io.IOException
java.sql.SQLException
java.lang.ClassNotFoundException

makeNextTable

protected ca.sqlpower.architect.profile.output.ProfilePDFFormat.ProfileTableStructure makeNextTable(TableProfileResult result,
                                                                                                    com.lowagie.text.pdf.PdfPTable table,
                                                                                                    com.lowagie.text.pdf.BaseFont bf,
                                                                                                    float fsize,
                                                                                                    float[] widths)
                                                                                             throws com.lowagie.text.DocumentException,
                                                                                                    java.io.IOException,
                                                                                                    ArchitectException,
                                                                                                    java.sql.SQLException,
                                                                                                    java.lang.InstantiationException,
                                                                                                    java.lang.IllegalAccessException
Creates a PdfPTable of the data in profile from its current cursor position up to the end of the current break. The table includes a header, body rows, and a subtotal row.

Parameters:
tProfile - the profile result for the SQLTable in question
bf - The BaseFont (typeface) to use for all table text
fsize - The size (in points) of the table body text
widths - The maximum width of each visible column in the PDF so far, in points. THIS ARRAY WILL BE MODIFIED to reflect the new maxmimum column widths if any new cells are added that are wider than the sizes in the array. If you are making a series of tables that should all have the same column widths, re-use the same array for each call to makeNextTable, then set each table's column widths using the final resulting widths array. If you want each table to have its own optimal widths, use a new array for each invocation.
Throws:
ArchitectException
java.sql.SQLException
java.lang.IllegalAccessException
java.lang.InstantiationException
com.lowagie.text.DocumentException
java.io.IOException


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca