Class TableWrapper
java.lang.Object
com.itextpdf.html2pdf.attach.wrapelement.TableWrapper
- All Implemented Interfaces:
-
IWrapElement
Wrapper for the
table element.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCell(com.itextpdf.layout.element.Cell cell) Adds a new cell to the body rows.voidaddFooterCell(com.itextpdf.layout.element.Cell cell) Adds a new cell to the footer rows.voidaddHeaderCell(com.itextpdf.layout.element.Cell cell) Adds a new cell to the header rows.intGets the number of rows.voidAdds a new footer row.voidAdds a new header row.voidnewRow()Adds a new body row.voidsetCaption(com.itextpdf.layout.element.Div caption) Sets the table's caption.voidsetFooterLang(String footerLang) voidsetHeaderLang(String headerLang) voidcom.itextpdf.layout.element.TabletoTable(WaitingColgroupsHelper colgroupsHelper) Renders all the rows to aTableobject.
-
Constructor Details
-
TableWrapper
public TableWrapper() -
TableWrapper
public TableWrapper(boolean isRtl)
-
-
Method Details
-
getRowsSize
public int getRowsSize()Gets the number of rows.- Returns:
- the number of rows
-
newRow
public void newRow()Adds a new body row. -
newHeaderRow
public void newHeaderRow()Adds a new header row. -
addHeaderCell
public void addHeaderCell(com.itextpdf.layout.element.Cell cell) Adds a new cell to the header rows.- Parameters:
-
cell- the cell
-
addCell
public void addCell(com.itextpdf.layout.element.Cell cell) Adds a new cell to the body rows.- Parameters:
-
cell- the cell
-
setLang
-
setHeaderLang
-
setCaption
public void setCaption(com.itextpdf.layout.element.Div caption) Sets the table's caption.- Parameters:
-
caption- the caption to be set
-
toTable
Renders all the rows to aTableobject.- Parameters:
-
colgroupsHelper- the colgroups helper class - Returns:
- the table
-