Class TableWrapper
java.lang.Object
com.itextpdf.html2pdf.attach.wrapelement.TableWrapper
- All Implemented Interfaces:
-
IWrapElement
Wrapper for the
table element.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate newTableWrapperinstance.TableWrapper(boolean isRtl) Create newTableWrapperinstance. -
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) Set footer language attribute of the table.voidsetHeaderLang(String headerLang) Set header language attribute of the table.voidSet language attribute of the table.com.itextpdf.layout.element.TabletoTable(WaitingColgroupsHelper colgroupsHelper) Renders all the rows to aTableobject.
-
Constructor Details
-
TableWrapper
public TableWrapper()Create newTableWrapperinstance. -
TableWrapper
public TableWrapper(boolean isRtl) Create newTableWrapperinstance.- Parameters:
-
isRtl- table direction value, true for right to left direction, false for left to right
-
-
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
Set language attribute of the table.- Parameters:
-
lang- language code string value (e.g en-us)
-
setHeaderLang
Set header language attribute of the table.- Parameters:
-
headerLang- language code string value (e.g en-us)
-
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
-