Table

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph

public final class Table extends BaseParagraph

Represents a table that can be added to the page.

Constructors

ConstructorDescription
Table()Default ctor

Methods

MethodDescription
getBackgroundColor()Gets table background color
setBackgroundColor(Color value)Sets table background color
getBreakText()Gets break text for table
setBreakText(TextFragment value)Sets break text for table
getCornerStyle()Gets the styles of the border corners
setCornerStyle(int value)Gets or sets the styles of the border corners
getRepeatingRowsStyle()Gets the style for repeating rows
setRepeatingRowsStyle(TextState value)Gets the style for repeating rows
getRepeatingColumnsCount()Gets or sets the maximum columns count for table
setRepeatingColumnsCount(int value)Gets or sets the maximum columns count for table
getRepeatingRowsCount()Gets the first rows count repeated for several pages
setRepeatingRowsCount(int value)Gets the first rows count repeated for several pages
getColumnWidths()Gets the column widths of the table.
setColumnWidths(String value)Gets the column widths of the table.
getBroken()Gets or sets table vertial broken;
setBroken(int value)Gets or sets table vertial broken;
getDefaultCellBorder()Gets default cell border;
setDefaultCellBorder(BorderInfo value)Gets default cell border;
getDefaultColumnWidth()Gets default cell border;
setDefaultColumnWidth(String value)Gets default cell border;
getRows()Gets the rows of the table.
getBorder()Gets the border.
setBorder(BorderInfo value)Sets the border.
getDefaultCellPadding()Gets the default cell padding.
setDefaultCellPadding(MarginInfo value)Sets the default cell padding.
getDefaultCellTextState()Gets the default cell text state.
setDefaultCellTextState(TextState value)Sets the default cell text state.
getAlignment()Gets the table alignment.
setAlignment(HorizontalAlignment value)Sets the table alignment.
getLeft()Gets the table left coordinate.
setLeft(float value)Sets the table left coordinate.
getTop()Gets the table top coordinate.
setTop(float value)Sets the table top coordinate.
isBroken()Gets the table is broken - will be truncated for next page.
setBroken(boolean value)Sets the table is broken - will be truncated for next page.
isBordersIncluded()Gets border included in column widths.
setBordersIncluded(boolean value)Sets border included in column widths.
getColumnAdjustment()Gets the table column adjustment.
setColumnAdjustment(int value)Sets the table column adjustment.
drawRoundedRectangle(GraphInfo info, Point topLeft, Point rightBottom, List operators, double radius)Add operators for rectangle.
getColumnWidth(String stringColumnWidth)Get column width
getWidth()Get width.
getHeight()Get height.
getHeight(Page parentPage)Get height.
setColumnTextState(int colNumber, TextState textState)Set height.
deepClone()Clone the table.

Table()

public Table()

Default ctor

getBackgroundColor()

public final Color getBackgroundColor()

Gets table background color

Returns: Color - Color object

setBackgroundColor(Color value)

public final void setBackgroundColor(Color value)

Sets table background color

Parameters:

ParameterTypeDescription
valueColorColor object

getBreakText()

public final TextFragment getBreakText()

Gets break text for table

Returns: TextFragment - TextFragment object

setBreakText(TextFragment value)

public final void setBreakText(TextFragment value)

Sets break text for table

Parameters:

ParameterTypeDescription
valueTextFragmentTextFragment object

getCornerStyle()

public final int getCornerStyle()

Gets the styles of the border corners

Returns: int - BorderCornerStyle value

setCornerStyle(int value)

public final void setCornerStyle(int value)

Gets or sets the styles of the border corners

Parameters:

ParameterTypeDescription
valueintBorderCornerStyle value

getRepeatingRowsStyle()

public final TextState getRepeatingRowsStyle()

Gets the style for repeating rows

Returns: TextState - TextState object

setRepeatingRowsStyle(TextState value)

public final void setRepeatingRowsStyle(TextState value)

Gets the style for repeating rows

Parameters:

ParameterTypeDescription
valueTextStateTextState object

getRepeatingColumnsCount()

public final int getRepeatingColumnsCount()

Gets or sets the maximum columns count for table

Returns: int - int value

setRepeatingColumnsCount(int value)

public final void setRepeatingColumnsCount(int value)

Gets or sets the maximum columns count for table

Parameters:

ParameterTypeDescription
valueintint value

getRepeatingRowsCount()

public final int getRepeatingRowsCount()

Gets the first rows count repeated for several pages

Returns: int - int value

setRepeatingRowsCount(int value)

public final void setRepeatingRowsCount(int value)

Gets the first rows count repeated for several pages

Parameters:

ParameterTypeDescription
valueintint value

getColumnWidths()

public final String getColumnWidths()

Gets the column widths of the table.

Returns: java.lang.String - String value

setColumnWidths(String value)

public final void setColumnWidths(String value)

Gets the column widths of the table.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value

getBroken()

public final int getBroken()

Gets or sets table vertial broken;

Returns: int - TableBroken value

setBroken(int value)

public final void setBroken(int value)

Gets or sets table vertial broken;

Parameters:

ParameterTypeDescription
valueintTableBroken value

getDefaultCellBorder()

public final BorderInfo getDefaultCellBorder()

Gets default cell border;

Returns: BorderInfo - BorderInfo object

setDefaultCellBorder(BorderInfo value)

public final void setDefaultCellBorder(BorderInfo value)

Gets default cell border;

Parameters:

ParameterTypeDescription
valueBorderInfoBorderInfo object

getDefaultColumnWidth()

public final String getDefaultColumnWidth()

Gets default cell border;

Returns: java.lang.String - String object

setDefaultColumnWidth(String value)

public final void setDefaultColumnWidth(String value)

Gets default cell border;

Parameters:

ParameterTypeDescription
valuejava.lang.StringString object

getRows()

public final Rows getRows()

Gets the rows of the table.

Returns: Rows - Rows object

getBorder()

public final BorderInfo getBorder()

Gets the border.

Returns: BorderInfo - BorderInfo object

setBorder(BorderInfo value)

public final void setBorder(BorderInfo value)

Sets the border.

Parameters:

ParameterTypeDescription
valueBorderInfoBorderInfo object

getDefaultCellPadding()

public final MarginInfo getDefaultCellPadding()

Gets the default cell padding.

Returns: MarginInfo - MarginInfo object

setDefaultCellPadding(MarginInfo value)

public final void setDefaultCellPadding(MarginInfo value)

Sets the default cell padding.

Parameters:

ParameterTypeDescription
valueMarginInfoMarginInfo object

getDefaultCellTextState()

public final TextState getDefaultCellTextState()

Gets the default cell text state.

Returns: TextState - TextState value

setDefaultCellTextState(TextState value)

public final void setDefaultCellTextState(TextState value)

Sets the default cell text state.

Parameters:

ParameterTypeDescription
valueTextStateTextState value

getAlignment()

public final HorizontalAlignment getAlignment()

Gets the table alignment.

Returns: HorizontalAlignment - HorizontalAlignment value

setAlignment(HorizontalAlignment value)

public final void setAlignment(HorizontalAlignment value)

Sets the table alignment.

Parameters:

ParameterTypeDescription
valueHorizontalAlignmentHorizontalAlignment value

getLeft()

public final float getLeft()

Gets the table left coordinate.

Returns: float - float value

setLeft(float value)

public final void setLeft(float value)

Sets the table left coordinate.

Parameters:

ParameterTypeDescription
valuefloatfloat value

getTop()

public final float getTop()

Gets the table top coordinate.

Returns: float - float value

setTop(float value)

public final void setTop(float value)

Sets the table top coordinate.

Parameters:

ParameterTypeDescription
valuefloatfloat value

isBroken()

public final boolean isBroken()

Gets the table is broken - will be truncated for next page.

Returns: boolean - boolean value

setBroken(boolean value)

public final void setBroken(boolean value)

Sets the table is broken - will be truncated for next page.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

isBordersIncluded()

public final boolean isBordersIncluded()

Gets border included in column widths.

Returns: boolean - boolean value

setBordersIncluded(boolean value)

public final void setBordersIncluded(boolean value)

Sets border included in column widths.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getColumnAdjustment()

public final int getColumnAdjustment()

Gets the table column adjustment.

Returns: int - ColumnAdjustment value

setColumnAdjustment(int value)

public final void setColumnAdjustment(int value)

Sets the table column adjustment.

Parameters:

ParameterTypeDescription
valueintColumnAdjustment value

drawRoundedRectangle(GraphInfo info, Point topLeft, Point rightBottom, List operators, double radius)

public static void drawRoundedRectangle(GraphInfo info, Point topLeft, Point rightBottom, List<Operator> operators, double radius)

Add operators for rectangle.

For internal usage only.

Parameters:

ParameterTypeDescription
infoGraphInfoThe border style.
topLeftPointThe left top point.
rightBottomPointThe right bottom point.
operatorsjava.util.List<com.aspose.pdf.Operator>The operators list to be added into the page’s content.
radiusdoubleThe border radius.

getColumnWidth(String stringColumnWidth)

public static double getColumnWidth(String stringColumnWidth)

Get column width

Parameters:

ParameterTypeDescription
stringColumnWidthjava.lang.StringThe string representation.

Returns: double - double value

getWidth()

public double getWidth()

Get width.

Returns: double - The table width

getHeight()

public double getHeight()

Get height.

Returns: double - The table height

getHeight(Page parentPage)

public double getHeight(Page parentPage)

Get height.

Parameters:

ParameterTypeDescription
parentPagePageThe table’s parent page

Returns: double - The table height

setColumnTextState(int colNumber, TextState textState)

public void setColumnTextState(int colNumber, TextState textState)

Set height.

Parameters:

ParameterTypeDescription
colNumberintThe column number.
textStateTextStateThe text state for column.

deepClone()

public Object deepClone()

Clone the table.

Returns: java.lang.Object - The cloned object