public class Cell extends BlockElement<Cell>
Cell is one piece of data in an enclosing grid, the Table.
This object is a BlockElement, giving it a number of visual layout
properties.
A cell can act as a container for a number of layout elements; it can only
contain other BlockElement objects or images. Other types of layout
elements must be wrapped in a BlockElement.| Modifier and Type | Field and Description |
|---|---|
protected PdfName |
role |
protected AccessibilityProperties |
tagProperties |
childElements, nextRenderer, stylesproperties| Constructor and Description |
|---|
Cell()
Creates a cell.
|
Cell(int rowspan,
int colspan)
Creates a cell which takes a custom amount of cell spaces in the table.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends IElement> |
add(BlockElement<T> element)
Adds any block element to the cell's contents.
|
Cell |
add(Image element)
Adds an image to the cell's contents.
|
Cell |
add(String content)
Directly adds a String of text to this cell.
|
Cell |
add(Table element)
Adds an embedded table to the cell's contents.
|
Cell |
clone(boolean includeContent)
Clones a cell with its position, properties, and optionally its contents.
|
AccessibilityProperties |
getAccessibilityProperties() |
int |
getCol() |
int |
getColspan() |
<T1> T1 |
getDefaultProperty(int property)
Gets the default property from this entity.
|
IRenderer |
getRenderer()
Gets a cell renderer for this element.
|
PdfName |
getRole() |
int |
getRow() |
int |
getRowspan() |
protected IRenderer |
makeNewRenderer() |
void |
setRole(PdfName role) |
String |
toString() |
protected Cell |
updateCellIndexes(int row,
int col,
int numberOfColumns) |
getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, isKeepTogether, setKeepTogether, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignmentaddStyle, createRendererSubTree, getProperty, hasProperty, isEmpty, propagateArtifactRoleToChildElements, setAction, setNextRenderer, setPageNumberdeleteOwnProperty, getHeight, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontKerning, setFontScript, setFontSize, setHeight, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacingclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdeleteOwnProperty, getOwnProperty, hasOwnProperty, setPropertyprotected PdfName role
protected AccessibilityProperties tagProperties
public Cell(int rowspan,
int colspan)
rowspan - the number of rows this cell must occupy. Negative numbers will make the argument default to 1.colspan - the number of columns this cell must occupy. Negative numbers will make the argument default to 1.public Cell()
public IRenderer getRenderer()
AbstractElement.setNextRenderer(IRenderer) method call.getRenderer in interface IElementgetRenderer in class AbstractElement<Cell>public int getRow()
public int getCol()
public int getRowspan()
public int getColspan()
public <T extends IElement> Cell add(BlockElement<T> element)
element - a BlockElementpublic Cell add(Image element)
element - an Imagepublic Cell add(Table element)
element - a nested Tablepublic Cell add(String content)
content - a Stringpublic Cell clone(boolean includeContent)
includeContent - whether or not to also include the contents of the cell.public <T1> T1 getDefaultProperty(int property)
IPropertyContainergetDefaultProperty in interface IPropertyContainergetDefaultProperty in class BlockElement<Cell>T1 - the return type associated with the propertyproperty - the property to be retrievednull will be returnedpublic PdfName getRole()
public void setRole(PdfName role)
public AccessibilityProperties getAccessibilityProperties()
protected IRenderer makeNewRenderer()
makeNewRenderer in class AbstractElement<Cell>protected Cell updateCellIndexes(int row, int col, int numberOfColumns)
Copyright © 1998–2016 iText Group NV. All rights reserved.