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 DefaultAccessibilityProperties |
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 |
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.
|
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() |
String |
toString() |
protected Cell |
updateCellIndexes(int row, int col, int numberOfColumns) |
getHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getWidth, isKeepTogether, isKeepWithNext, setHeight, setHeight, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment, setWidth, setWidth
addStyle, createRendererSubTree, getChildren, getProperty, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, 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, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createRendererSubTree, setNextRenderer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
protected DefaultAccessibilityProperties 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 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 AccessibilityProperties getAccessibilityProperties()
IAccessibleElement
accessibility properties
. See also IAccessibleElement
.
protected IRenderer makeNewRenderer()
makeNewRenderer
in class AbstractElement<Cell>
protected Cell updateCellIndexes(int row, int col, int numberOfColumns)
Copyright © 1998–2020 iText Group NV. All rights reserved.