|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.pdf.table.PdfTable
public class PdfTable
Class that generates PDF documents with a Table structure as the contents of the document.
Constructor Summary | |
---|---|
PdfTable(java.lang.String name,
java.lang.String type,
java.lang.String width,
java.lang.String align)
Construct a new PdfTable. |
Method Summary | |
---|---|
void |
addColumn(java.lang.String lang,
java.lang.String srcAttr,
java.lang.String format,
boolean rollup,
java.lang.String heading,
java.lang.String width)
Add a column descriptor to this table |
void |
addTitle(java.lang.String lang,
java.lang.String content)
Add a title to this table. |
void |
generatePDF(java.lang.String lang,
java.lang.String type,
java.util.List data,
java.util.List totalData,
java.io.OutputStream os)
Generate a PDF document based on this PdfTable and direct the output to the given OutputStream |
java.lang.String |
getAlignment()
Returns the default alignment of this table. |
java.util.LinkedHashMap |
getColumnCollection(java.lang.String lang)
Returns the column collection for the given language as map. |
java.util.ArrayList |
getHeadings(java.lang.String lang)
Returns the column headings for the specified language as an ArrayList. |
java.lang.String |
getTitle(java.lang.String lang)
Returns the title for the given language. |
java.lang.String |
getWidth()
Returns the default width of this table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PdfTable(java.lang.String name, java.lang.String type, java.lang.String width, java.lang.String align)
name
- Name of the document.type
- Default type of table - portrait or landscapewidth
- Default width.align
- Default alignment.Method Detail |
---|
public void addTitle(java.lang.String lang, java.lang.String content)
lang
- Two letter language code.content
- Contents of the title.public void addColumn(java.lang.String lang, java.lang.String srcAttr, java.lang.String format, boolean rollup, java.lang.String heading, java.lang.String width)
lang
- Two letter language code.srcAttr
- Name of the attribute that will be contained in the
content source for this document.format
- The format for the specified column.rollup
- This column must be totaled up.heading
- The heading for this column to be used in the table headerwidth
- Column width in percentage.public java.lang.String getWidth()
public java.lang.String getAlignment()
public java.util.LinkedHashMap getColumnCollection(java.lang.String lang)
lang
- The language.
public java.util.ArrayList getHeadings(java.lang.String lang)
lang
- Language.
public java.lang.String getTitle(java.lang.String lang)
lang
- Language.
public void generatePDF(java.lang.String lang, java.lang.String type, java.util.List data, java.util.List totalData, java.io.OutputStream os) throws java.io.IOException
lang
- Two letter language code to indicate the target
language.type
- Override the default type with this type.data
- Table instance containing main table contents.totalData
- Table instance containing rollup column contents.os
- Target OutputStream.
java.io.IOException
- if the document cannot be written.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |