public class CTable extends CBlockElement
elementPtr| Constructor and Description |
|---|
CTable(long ptr)
Create a table element with native pointer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all table content.
|
CDiv |
createCaption()
Create a caption container (typically rendered above or below the table).
|
CCell |
createCell()
Create a cell in the current row.
|
CCell |
createCell(int rowspan,
int colspan)
Create a cell in the current row.
|
CCell |
createFooterCell()
Create a footer cell in the table footer section.
|
CCell |
createFooterCell(int rowspan,
int colspan)
Create a footer cell in the table footer section.
|
CCell |
createHeaderCell()
Create a header cell in the table header section.
|
CCell |
createHeaderCell(int rowspan,
int colspan)
Create a header cell in the table header section.
|
CDiv |
getCaption()
Get the caption container.
|
CCell |
getCell(int row,
int column)
Get a cell by row and column.
|
CUnitValue |
getColumnWidth(int column)
Get the width of a column.
|
CTable |
getFooter()
Get the footer table section.
|
CTable |
getHeader()
Get the header table section.
|
int |
getNumberOfColumns()
Get number of columns.
|
int |
getNumberOfRows()
Get number of rows.
|
CElementType |
getType()
Get element type.
|
boolean |
isEmpty()
Check whether the table has no cells/content.
|
void |
setBorderCollapse(CBorderCollapseType collapse)
Set border collapse type for the table.
|
void |
setColumnWidth(int column,
CUnitValue width)
Set the width of a column.
|
void |
setHorizontalBorderSpacing(float space)
Set horizontal border spacing.
|
void |
setVerticalBorderSpacing(float space)
Set vertical border spacing.
|
int |
startNewFooterRow()
Start a new row in the table footer section.
|
int |
startNewHeaderRow()
Start a new row in the table header section.
|
int |
startNewRow()
Start a new row in the table body.
|
int |
useAllAvailableWidth()
Make the table use all available width.
|
getHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getWidth, setHeight, setHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setVerticalAlignment, setWidth, setWidthaddStyle, getChildren, getStyles, hasProperty, isAbsolutedeleteProperty, getProperties, getStrokeColor, getStrokeWidth, hasProperty, setAbsolutePosition, setAbsolutePosition, setBackgroundColor, setBackgroundImage, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setFontColor, setFontFamily, setFontSize, setFontStyle, setFontWeight, setHorizontalAlignment, setInlineVerticalAlignment, setOpacity, setStrokeColor, setStrokeWidth, setTextAlignment, setUnderline, setWordSpacingpublic CTable(long ptr)
ptr - Native table pointer/handle.public CElementType getType()
CElementType.ELEMENT_TABLE.public int useAllAvailableWidth()
public CUnitValue getColumnWidth(int column)
column - Column index.CUnitValue.public void setColumnWidth(int column,
CUnitValue width)
column - Column index.width - Column width as CUnitValue.public int getNumberOfColumns()
public int getNumberOfRows()
public CCell createHeaderCell(int rowspan, int colspan)
rowspan - Row span.colspan - Column span.CCell.public CCell createHeaderCell()
CCell.public CCell createFooterCell(int rowspan, int colspan)
rowspan - Row span.colspan - Column span.CCell.public CCell createFooterCell()
CCell.public CDiv createCaption()
CDiv element.public int startNewRow()
public int startNewHeaderRow()
public int startNewFooterRow()
public CCell createCell(int rowspan, int colspan)
rowspan - Row span.colspan - Column span.CCell.public CCell getCell(int row, int column)
row - Row index.column - Column index.CCell instance.public void setBorderCollapse(CBorderCollapseType collapse)
collapse - Border collapse type.public void setHorizontalBorderSpacing(float space)
space - Spacing value (unit is implementation-defined; commonly points).public void setVerticalBorderSpacing(float space)
space - Spacing value (unit is implementation-defined; commonly points).public boolean isEmpty()
isEmpty in class CAbstractElementpublic void clear()