Class Cell
public class Cell : BlockElement<Cell>, IAccessibleElement, IBlockElement, IAbstractElement, IElement, IPropertyContainer
- Inheritance
-
Cell
- Implements
- Inherited Members
Remarks
A Cell is one piece of data in an enclosing grid, the Table. This object is a BlockElement<T> , 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<T> objects or images. Other types of layout elements must be wrapped in a BlockElement<T>.
Constructors
Cell()
Creates a cell.
public Cell()
Cell(int, int)
Creates a cell which takes a custom amount of cell spaces in the table.
public Cell(int rowspan, int colspan)
Parameters
rowspan
intthe number of rows this cell must occupy. Negative numbers will make the argument default to 1.
colspan
intthe number of columns this cell must occupy. Negative numbers will make the argument default to 1.
Fields
tagProperties
protected DefaultAccessibilityProperties tagProperties
Field Value
Methods
Add(IBlockElement)
Adds any block element to the cell's contents.
public virtual Cell Add(IBlockElement element)
Parameters
element
IBlockElement
Returns
- Cell
this Element
Add(Image)
Adds an image to the cell's contents.
public virtual Cell Add(Image element)
Parameters
Returns
- Cell
this Element
Clone(bool)
Clones a cell with its position, properties, and optionally its contents.
public virtual Cell Clone(bool includeContent)
Parameters
includeContent
boolwhether or not to also include the contents of the cell.
Returns
- Cell
a clone of this Element
GetAccessibilityProperties()
public override AccessibilityProperties GetAccessibilityProperties()
Returns
GetCol()
Gets the number of the column in which the cell is located.
public virtual int GetCol()
Returns
- int
the column number
GetColspan()
Gets the colspan of the cell.
public virtual int GetColspan()
Returns
- int
the colspan
GetDefaultProperty<T1>(int)
public override T1 GetDefaultProperty<T1>(int property)
Parameters
property
int
Returns
- T1
Type Parameters
T1
GetRenderer()
Gets a cell renderer for this element.
public override IRenderer GetRenderer()
Returns
- IRenderer
a cell renderer for this element
Remarks
Gets a cell renderer for this element. Note that this method can be called more than once. By default each element should define its own renderer, but the renderer can be overridden by SetNextRenderer(IRenderer) method call.
GetRow()
Gets the number of the row in which the cell is located.
public virtual int GetRow()
Returns
- int
the row number
GetRowspan()
Gets the rowspan of the cell.
public virtual int GetRowspan()
Returns
- int
the rowspan
MakeNewRenderer()
protected override IRenderer MakeNewRenderer()
Returns
ToString()
public override string ToString()
Returns
UpdateCellIndexes(int, int, int)
Updates cell indexes.
protected virtual Cell UpdateCellIndexes(int row, int col, int numberOfColumns)
Parameters
row
intthe number of the row to update
col
intthe number of the col to update
numberOfColumns
intto evaluate new colspan