com.lowagie.text.pdf
Interface PdfPTableEvent


public interface PdfPTableEvent

An interface that can be used to retrieve the position of cells in PdfPTable.

Author:
Paulo Soares (psoares@consiste.pt)

Method Summary
 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.
 

Method Detail

tableLayout

public 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. The text or graphics are added to one of the 4 PdfContentByte contained in canvases.
The indexes to canvases are:

The layers are placed in sequence on top of each other.

The widths and heights have the coordinates of the cells.
In each array in widths 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. The size of the widths array correspond to each row. If colspan was not used all the elements 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.

Parameters:
table - the PdfPTable in use
widths - an array of arrays with the cells' x positions. It has the length of the number of rows
heights - an array with the cells' y positions. It has a length of number of rows + 1
headerRows - the number of rows defined for the header. It is always 0 if the table is not rendered with Document.add()
rowStart - the first row number after the header
canvases - an array of PdfContentByte