public class PdfPTableEventForwarder extends Object implements PdfPTableEvent
Modifier and Type | Field and Description |
---|---|
protected ArrayList |
events
ArrayList containing all the PageEvents that have to be executed.
|
Constructor and Description |
---|
PdfPTableEventForwarder() |
Modifier and Type | Method and Description |
---|---|
void |
addTableEvent(PdfPTableEvent event)
Add a page event to the forwarder.
|
void |
tableLayout(PdfPTable table,
float[][] widths,
float[] heights,
int headerRows,
int rowStart,
PdfContentByte[] canvases)
This method is called at the end of the table rendering.
|
protected ArrayList events
public void addTableEvent(PdfPTableEvent event)
event
- an event that has to be added to the forwarder.public void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases)
PdfPTableEvent
PdfContentByte
contained in
canvases
.canvases
are:
PdfPTable.BASECANVAS
- the original PdfContentByte
. Anything placed here
will be under the table.
PdfPTable.BACKGROUNDCANVAS
- the layer where the background goes to.
PdfPTable.LINECANVAS
- the layer where the lines go to.
PdfPTable.TEXTCANVAS
- the layer where the text go to. Anything placed here
will be over the table.
The widths
and heights
have the coordinates of the cells.
The size of the widths
array is the number of rows.
Each sub-array in widths
corresponds to the x column border positions where
the first element is the x coordinate of the left table border and the last
element is the x coordinate of the right table border.
If colspan is not used all the sub-arrays in widths
are the same.
For the heights
the first element is the y coordinate of the top table border and the last
element is the y coordinate of the bottom table border.
tableLayout
in interface PdfPTableEvent
table
- the PdfPTable
in usewidths
- an array of arrays with the cells' x positions. It has the length of the number
of rowsheights
- an array with the cells' y positions. It has a length of the number
of rows + 1headerRows
- the number of rows defined for the header.rowStart
- the first row number after the headercanvases
- an array of PdfContentByte
PdfPTableEvent.tableLayout(com.lowagie.text.pdf.PdfPTable, float[][], float[], int, int, com.lowagie.text.pdf.PdfContentByte[])
Copyright © 2018. All rights reserved.