Class TableWrapper
java.lang.Object
com.itextpdf.html2pdf.attach.wrapelement.TableWrapper
- All Implemented Interfaces:
-
IWrapElement
Wrapper for the
table
element.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate newTableWrapper
instance.TableWrapper
(boolean isRtl) Create newTableWrapper
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCell
(com.itextpdf.layout.element.Cell cell) Adds a new cell to the body rows.void
addFooterCell
(com.itextpdf.layout.element.Cell cell) Adds a new cell to the footer rows.void
addHeaderCell
(com.itextpdf.layout.element.Cell cell) Adds a new cell to the header rows.int
Gets the number of rows.void
Adds a new footer row.void
Adds a new header row.void
newRow()
Adds a new body row.void
setCaption
(com.itextpdf.layout.element.Div caption) Sets the table's caption.void
setFooterLang
(String footerLang) Set footer language attribute of the table.void
setHeaderLang
(String headerLang) Set header language attribute of the table.void
Set language attribute of the table.com.itextpdf.layout.element.Table
toTable
(WaitingColgroupsHelper colgroupsHelper) Renders all the rows to aTable
object.
-
Constructor Details
-
TableWrapper
public TableWrapper()Create newTableWrapper
instance. -
TableWrapper
public TableWrapper(boolean isRtl) Create newTableWrapper
instance.- 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 aTable
object.- Parameters:
-
colgroupsHelper
- the colgroups helper class - Returns:
- the table
-