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, styles
properties
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 |
---|---|
Cell |
add(IBlockElement 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 |
clone(boolean includeContent)
Clones a cell with its position, properties, and optionally its contents.
|
AccessibilityProperties |
getAccessibilityProperties()
Gets the accessibility properties .
|
int |
getCol()
Gets the number of the column in which the cell is located.
|
int |
getColspan()
Gets the colspan of the cell.
|
|
getDefaultProperty(int property)
Gets the default property from this entity.
|
IRenderer |
getRenderer()
Gets a cell renderer for this element.
|
PdfName |
getRole()
Gets the element's role.
|
int |
getRow()
Gets the number of the row in which the cell is located.
|
int |
getRowspan()
Gets the rowspan of the cell.
|
protected IRenderer |
makeNewRenderer() |
void |
setRole(PdfName role)
Sets the element's role.
|
String |
toString() |
protected Cell |
updateCellIndexes(int row, int col, int numberOfColumns) |
getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, isKeepTogether, isKeepWithNext, setHeight, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment
addStyle, createRendererSubTree, getChildren, getProperty, hasProperty, isEmpty, propagateArtifactRoleToChildElements, setAction, setNextRenderer, setPageNumber
deleteOwnProperty, getHeight, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFont, setFontColor, setFontColor, setFontKerning, setFontScript, setFontSize, setHeight, setHeightPercent, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createRendererSubTree, setNextRenderer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
protected 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 IElement
getRenderer
in class AbstractElement<Cell>
public int getRow()
the number of the row
in which the cell is located.
public int getCol()
the number of the column
in which the cell is located.
public int getRowspan()
rowspan
of the cell.
public int getColspan()
colspan
of the cell.
public Cell add(IBlockElement element)
element
- a BlockElement
public Cell add(Image element)
element
- an Image
public Cell add(String content)
content
- a String
public Cell clone(boolean includeContent)
includeContent
- whether or not to also include the contents of the cell.
publicT1 getDefaultProperty(int property)
IPropertyContainer
getDefaultProperty
in interface IPropertyContainer
getDefaultProperty
in class BlockElement<Cell>
T1
- the return type associated with the property
property
- the property to be retrieved
null
will be returned
public PdfName getRole()
IAccessibleElement
PdfName
containing the name of the role
public void setRole(PdfName role)
IAccessibleElement
role
- the new role which the IAccessibleElement
should take
public AccessibilityProperties getAccessibilityProperties()
IAccessibleElement
accessibility properties
.
protected IRenderer makeNewRenderer()
makeNewRenderer
in class AbstractElement<Cell>
protected Cell updateCellIndexes(int row, int col, int numberOfColumns)
Copyright © 1998–2018 iText Group NV. All rights reserved.