public class

Table

extends ContentNode
java.lang.Object
   ↳ com.pdftron.layout.ContentElement
     ↳ com.pdftron.layout.ContentNode
       ↳ com.pdftron.layout.Table

Class Overview

A Table is a content node that contains a grid of cells.

Summary

Public Methods
TableRow addTableRow()
Add a new row to the table
double getBorderThickness()
Get the border thickness of the table
double getDefaultRowHeight()
Get default row height of the table
int getNumColumns()
Get the number of columns in the table
int getNumRows()
Get the number of rows in the table
TableCell getTableCell(int column, int row)
Get a cell from the table
void setBorder(double thickness, int red, int green, int blue)
Set the cell's border thickness and color The color values must be between 0 and 255, otherwise an exception will be thrown.
void setDefaultColumnWidth(double val)
Set default column weight of the table
void setDefaultRowHeight(double val)
Set default row height of the table
[Expand]
Inherited Methods
From class com.pdftron.layout.ContentNode
From class com.pdftron.layout.ContentElement
From class java.lang.Object

Public Methods

public TableRow addTableRow ()

Add a new row to the table

Returns
  • The newly created row

public double getBorderThickness ()

Get the border thickness of the table

Returns
  • border thickness in points

public double getDefaultRowHeight ()

Get default row height of the table

Returns
  • Default row height of the table

public int getNumColumns ()

Get the number of columns in the table

Returns
  • number of columns in the table

public int getNumRows ()

Get the number of rows in the table

Returns
  • number of rows in the table

public TableCell getTableCell (int column, int row)

Get a cell from the table

Parameters
column The column index of the cell to retrieve
row The row index of the cell to retrieve
Returns
  • the TableCell at the specified column and row

public void setBorder (double thickness, int red, int green, int blue)

Set the cell's border thickness and color The color values must be between 0 and 255, otherwise an exception will be thrown.

Parameters
thickness The thickness of the border in points
red The red component of the border color
green The green component of the border color
blue The blue component of the border color
Throws
IllegalArgumentException - if red, green or blue are outside of the range 0 to 255, inclusive
PDFNetException

public void setDefaultColumnWidth (double val)

Set default column weight of the table

Parameters
val The default column weight

public void setDefaultRowHeight (double val)

Set default row height of the table

Parameters
val The default row height