public interface PDFTableWriter
| Modifier and Type | Interface and Description |
|---|---|
static interface |
PDFTableWriter.PDFColumnSpec |
static interface |
PDFTableWriter.PDFFontSpec |
static interface |
PDFTableWriter.PDFHeaderFooter |
static interface |
PDFTableWriter.PDFText
Represents text within a PDF document.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGN_BOTTOM |
static int |
ALIGN_CENTER |
static int |
ALIGN_LEFT |
static int |
ALIGN_MIDDLE |
static int |
ALIGN_RIGHT |
static int |
ALIGN_TOP |
| Modifier and Type | Method and Description |
|---|---|
void |
addCell(PDFTableWriter.PDFText text) |
void |
addCell(PDFTableWriter.PDFText text,
int alignment,
boolean nowrap,
java.awt.Color backgroundColor)
Add a cell to the table.
|
void |
addCell(PDFTableWriter.PDFText text,
int alignment,
boolean nowrap,
java.awt.Color backgroundColor,
int colspan)
Add a cell to the table.
|
void |
addCell(java.lang.String content)
Adds a plain text to the cell.
|
void |
addCell(java.lang.String[] content)
Adds multiple text content to the cell.
|
void |
addCell(java.lang.String[] content,
int alignment,
boolean nowrap,
PDFTableWriter.PDFFontSpec[] cellFont) |
void |
addCell(java.lang.String[] content,
int alignment,
boolean nowrap,
PDFTableWriter.PDFFontSpec[] cellFont,
java.awt.Color backgroundColor)
Add a cell to the table.
|
void |
addCell(java.lang.String[] content,
int alignment,
boolean nowrap,
PDFTableWriter.PDFFontSpec[] cellFont,
java.awt.Color backgroundColor,
int colspan)
Add a cell to the table.
|
void |
addCell(java.lang.String content,
java.awt.Color backgroundColor)
Adds text with the specified background color
|
PDFTableWriter.PDFColumnSpec |
addColumn(java.lang.String columnLabel)
Adds a simple column label with the default font, background color,
alignment and wrapping.
|
PDFTableWriter.PDFColumnSpec |
addColumn(java.lang.String columnLabel,
PDFTableWriter.PDFFontSpec font,
java.awt.Color backgroundColor,
int alignment,
boolean noWrap)
Adds a label with the specified font, background color, alignment and
wrapping.
|
PDFTableWriter.PDFColumnSpec |
addColumn(java.lang.String columnLabel,
PDFTableWriter.PDFFontSpec font,
java.awt.Color backgroundColor,
int alignment,
boolean noWrap,
java.lang.String groupHeader,
java.awt.Color groupHeaderBackgroundColor,
PDFTableWriter.PDFFontSpec groupHeaderFont)
Adds a label with the specified font, background color, alignment and
wrapping.
|
PDFTableWriter.PDFColumnSpec |
addColumn(java.lang.String columnLabel,
java.lang.String groupHeader)
Adds a simple column with a label and an optional group header.
|
void |
close()
Closes this writer.
|
PDFTableWriter.PDFFontSpec |
createFontSpec()
Creates a font specification, which can be used to define font behavior
when adding content to the table.
|
PDFTableWriter.PDFHeaderFooter |
createHeaderFooter() |
PDFTableWriter.PDFText |
createText() |
void |
endRow()
Indicates the end of a currently processed row.
|
void |
endTable()
Ends the table.
|
int |
getColumnCount()
Returns the number of columns that have been added.
|
java.awt.Color |
getCurrentRowBackgroundColor()
Returns the background color of the current row.
|
java.awt.Color |
getDefaultHeaderBackgroundColor()
Returns the default header background color.
|
java.awt.Color[] |
getRowBackgroundColors()
Returns the alternating background colors of the rows.
|
void |
newRow()
Indicates start of a new row.
|
void |
newRow(TableData tableData)
Indicates start of a new row.
|
void |
setAuthor(java.lang.String author) |
void |
setFooter(PDFTableWriter.PDFHeaderFooter footer) |
void |
setFooter(PDFTableWriter.PDFHeaderFooter[] footer) |
void |
setFooter(java.lang.String footer,
boolean numbered,
int alignment) |
void |
setHeader(PDFTableWriter.PDFHeaderFooter header) |
void |
setHeader(PDFTableWriter.PDFHeaderFooter[] header) |
void |
setHeader(java.lang.String header) |
void |
setRowBackgroundColors(java.awt.Color[] colors)
Sets the alternating background colors of rows.
|
void |
setShowRowCounter(boolean show) |
void |
setTitle(java.lang.String title) |
static final int ALIGN_LEFT
static final int ALIGN_RIGHT
static final int ALIGN_CENTER
static final int ALIGN_TOP
static final int ALIGN_MIDDLE
static final int ALIGN_BOTTOM
void addCell(PDFTableWriter.PDFText text)
text - The cell content.void addCell(PDFTableWriter.PDFText text, int alignment, boolean nowrap, java.awt.Color backgroundColor)
text - The cell content.alignment - The alignment of the cell content.nowrap - Whether to not wrap the text.backgroundColor - The background color.void addCell(PDFTableWriter.PDFText text, int alignment, boolean nowrap, java.awt.Color backgroundColor, int colspan)
text - The cell content.alignment - The alignment of the cell content.nowrap - Whether to not wrap the text.backgroundColor - The background color.colspan - The number of columns to span.java.lang.IllegalArgumentException - If colspan is less than 1.void addCell(java.lang.String content)
content - The cell content.void addCell(java.lang.String content,
java.awt.Color backgroundColor)
content - The cell content.backgroundColor - The background color.void addCell(java.lang.String[] content)
content - The text content.void addCell(java.lang.String[] content,
int alignment,
boolean nowrap,
PDFTableWriter.PDFFontSpec[] cellFont,
java.awt.Color backgroundColor,
int colspan)
content - The cell content.alignment - The alignment of the cell content.nowrap - Whether to not wrap the text.cellFont - The font.backgroundColor - The background color.colspan - The number of columns to span.java.lang.IllegalArgumentException - If colspan is less than 1.void addCell(java.lang.String[] content,
int alignment,
boolean nowrap,
PDFTableWriter.PDFFontSpec[] cellFont)
content - alignment - nowrap - cellFont - void addCell(java.lang.String[] content,
int alignment,
boolean nowrap,
PDFTableWriter.PDFFontSpec[] cellFont,
java.awt.Color backgroundColor)
content - The cell content.alignment - The alignment of the cell content.nowrap - Whether to not wrap the text.cellFont - The font.backgroundColor - The background color.PDFTableWriter.PDFColumnSpec addColumn(java.lang.String columnLabel)
columnLabel - The column label.PDFTableWriter.PDFColumnSpecPDFTableWriter.PDFColumnSpec addColumn(java.lang.String columnLabel, PDFTableWriter.PDFFontSpec font, java.awt.Color backgroundColor, int alignment, boolean noWrap)
columnLabel - The column label.font - The font specificationbackgroundColor - The background color to applyalignment - The alignment of the textnoWrap - True if to avoid header wrapping.PDFTableWriter.PDFColumnSpecPDFTableWriter.PDFColumnSpec addColumn(java.lang.String columnLabel, java.lang.String groupHeader)
columnLabel - The column labelgroupHeader - The group header (or null if none is used).PDFTableWriter.PDFColumnSpecPDFTableWriter.PDFColumnSpec addColumn(java.lang.String columnLabel, PDFTableWriter.PDFFontSpec font, java.awt.Color backgroundColor, int alignment, boolean noWrap, java.lang.String groupHeader, java.awt.Color groupHeaderBackgroundColor, PDFTableWriter.PDFFontSpec groupHeaderFont)
columnLabel - The column label.font - The font specification.backgroundColor - The background color to apply.alignment - The alignment of the text.noWrap - True if to avoid header wrapping.groupHeader - The group header.groupHeaderBackgroundColor - The background color for the group
header.groupHeaderFont - the font to be used for the group header.PDFTableWriter.PDFColumnSpecvoid close()
PDFTableWriter.PDFFontSpec createFontSpec()
font specificationPDFTableWriter.PDFHeaderFooter createHeaderFooter()
PDFTableWriter.PDFHeaderFooter object.PDFTableWriter.PDFText createText()
PDFTableWriter.PDFText instance.void endRow()
void endTable()
int getColumnCount()
java.awt.Color getCurrentRowBackgroundColor()
java.awt.Color getDefaultHeaderBackgroundColor()
java.awt.Color[] getRowBackgroundColors()
void newRow()
void newRow(TableData tableData)
tableData - The table data instance.void setAuthor(java.lang.String author)
void setFooter(PDFTableWriter.PDFHeaderFooter footer)
footer - The page footer element.void setFooter(PDFTableWriter.PDFHeaderFooter[] footer)
footer - The page footer elements (right to left).void setFooter(java.lang.String footer,
boolean numbered,
int alignment)
void setHeader(PDFTableWriter.PDFHeaderFooter header)
header - The page header element.void setHeader(PDFTableWriter.PDFHeaderFooter[] header)
header - The page header elements (right to left).void setHeader(java.lang.String header)
void setRowBackgroundColors(java.awt.Color[] colors)
colors - The background colors.void setShowRowCounter(boolean show)
show - True if to display the row counter.void setTitle(java.lang.String title)
Copyright ? Technia AB. All Rights Reserved.