Package com.itextpdf.tool.xml.html.table
Class TableBorderEvent
- java.lang.Object
-
- com.itextpdf.tool.xml.html.table.TableBorderEvent
-
- All Implemented Interfaces:
PdfPTableEvent
public class TableBorderEvent extends java.lang.Object implements PdfPTableEvent
-
-
Field Summary
Fields Modifier and Type Field Description private TableStyleValuesstyleValues
-
Constructor Summary
Constructors Constructor Description TableBorderEvent(TableStyleValues styleValues)Construct a new TableBorderEvent with the given TableStyleValues.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableStyleValuesgetTableStyleValues()Returns the used TableStyleValuesvoidtableLayout(PdfPTable table, float[][] width, float[] height, int headerRows, int rowStart, PdfContentByte[] canvas)This method is called at the end of the table rendering.
-
-
-
Field Detail
-
styleValues
private final TableStyleValues styleValues
-
-
Constructor Detail
-
TableBorderEvent
public TableBorderEvent(TableStyleValues styleValues)
Construct a new TableBorderEvent with the given TableStyleValues.- Parameters:
styleValues- the TableStyleValues- See Also:
PdfPTableEvent.tableLayout(com.itextpdf.text.pdf.PdfPTable, float[][], float[], int, int, com.itextpdf.text.pdf.PdfContentByte[])
-
-
Method Detail
-
tableLayout
public void tableLayout(PdfPTable table, float[][] width, float[] height, int headerRows, int rowStart, PdfContentByte[] canvas)
Description copied from interface:PdfPTableEventThis method is called at the end of the table rendering. The text or graphics are added to one of the 4PdfContentBytecontained incanvases.
The indexes tocanvasesare:PdfPTable.BASECANVAS- the originalPdfContentByte. 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
widthsandheightshave the coordinates of the cells.
The size of thewidthsarray is the number of rows. Each sub-array inwidthscorresponds 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 inwidthsare the same.
For theheightsthe first element is the y coordinate of the top table border and the last element is the y coordinate of the bottom table border.- Specified by:
tableLayoutin interfacePdfPTableEvent- Parameters:
table- thePdfPTablein usewidth- an array of arrays with the cells' x positions. It has the length of the number of rowsheight- 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 headercanvas- an array ofPdfContentByte
-
getTableStyleValues
public TableStyleValues getTableStyleValues()
Returns the used TableStyleValues- Returns:
- TableStyleValues
-
-