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, 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 |
|---|---|
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. |
<T1> T1 |
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, setWidthaddStyle, createRendererSubTree, getChildren, getProperty, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumberdeleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, 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, setWordSpacingclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateRendererSubTree, setNextRendererdeleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setPropertyprotected 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 IElementgetRenderer 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 BlockElementpublic Cell add(Image element)
element - an Imagepublic 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 AccessibilityProperties getAccessibilityProperties()
IAccessibleElementaccessibility 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.