iText 8.0.5 API
iText.Layout.Element.Cell Class Reference

A Cell is one piece of data in an enclosing grid, the Table. More...

Inheritance diagram for iText.Layout.Element.Cell:
iText.Layout.Element.BlockElement< iText.Layout.Element.Cell >

Public Member Functions

  Cell (int rowspan, int colspan)
  Creates a cell which takes a custom amount of cell spaces in the table. More...
 
  Cell ()
  Creates a cell. More...
 
override IRenderer  GetRenderer ()
  Gets a cell renderer for this element. More...
 
virtual int  GetRow ()
  Gets the number of the row in which the cell is located. More...
 
virtual int  GetCol ()
  Gets the number of the column in which the cell is located. More...
 
virtual int  GetRowspan ()
  Gets the rowspan of the cell. More...
 
virtual int  GetColspan ()
  Gets the colspan of the cell. More...
 
virtual iText.Layout.Element.Cell  Add (IBlockElement element)
  Adds any block element to the cell's contents. More...
 
virtual iText.Layout.Element.Cell  Add (Image element)
  Adds an image to the cell's contents. More...
 
virtual iText.Layout.Element.Cell  Clone (bool includeContent)
  Clones a cell with its position, properties, and optionally its contents. More...
 
override T1  GetDefaultProperty< T1 > (int property)
 
override String  ToString ()
 
override AccessibilityProperties  GetAccessibilityProperties ()
  Gets the accessibility properties. More...
 
- Public Member Functions inherited from iText.Layout.Element.BlockElement< iText.Layout.Element.Cell >
override T1  GetDefaultProperty< T1 > (int property)
  Gets the default property from this entity. More...
 
virtual UnitValue  GetMarginLeft ()
  Gets the current left margin width of the element. More...
 
virtual T  SetMarginLeft (float value)
  Sets the left margin width of the element. More...
 
virtual UnitValue  GetMarginRight ()
  Gets the current right margin width of the element. More...
 
virtual T  SetMarginRight (float value)
  Sets the right margin width of the element. More...
 
virtual UnitValue  GetMarginTop ()
  Gets the current top margin width of the element. More...
 
virtual T  SetMarginTop (float value)
  Sets the top margin width of the element. More...
 
virtual UnitValue  GetMarginBottom ()
  Gets the current bottom margin width of the element. More...
 
virtual T  SetMarginBottom (float value)
  Sets the bottom margin width of the element. More...
 
virtual T  SetMargin (float commonMargin)
  Sets all margins around the element to the same width. More...
 
virtual T  SetMargins (float marginTop, float marginRight, float marginBottom, float marginLeft)
  Sets the margins around the element to a series of new widths. More...
 
virtual UnitValue  GetPaddingLeft ()
  Gets the current left padding width of the element. More...
 
virtual T  SetPaddingLeft (float value)
  Sets the left padding width of the element. More...
 
virtual UnitValue  GetPaddingRight ()
  Gets the current right padding width of the element. More...
 
virtual T  SetPaddingRight (float value)
  Sets the right padding width of the element. More...
 
virtual UnitValue  GetPaddingTop ()
  Gets the current top padding width of the element. More...
 
virtual T  SetPaddingTop (float value)
  Sets the top padding width of the element. More...
 
virtual UnitValue  GetPaddingBottom ()
  Gets the current bottom padding width of the element. More...
 
virtual T  SetPaddingBottom (float value)
  Sets the bottom padding width of the element. More...
 
virtual T  SetPadding (float commonPadding)
  Sets all paddings around the element to the same width. More...
 
virtual T  SetPaddings (float paddingTop, float paddingRight, float paddingBottom, float paddingLeft)
  Sets the paddings around the element to a series of new widths. More...
 
virtual T  SetVerticalAlignment (VerticalAlignment? verticalAlignment)
  Sets the vertical alignment of the element. More...
 
virtual T  SetSpacingRatio (float ratio)
  Sets a ratio which determines in which proportion will word spacing and character spacing be applied when horizontal alignment is justified. More...
 
virtual ? bool  IsKeepTogether ()
  Returns whether the BlockElement should be kept together as much as possible. More...
 
virtual T  SetKeepTogether (bool keepTogether)
  Sets whether the BlockElement should be kept together as much as possible. More...
 
virtual ? bool  IsKeepWithNext ()
  Returns whether the end of this BlockElement and the start of the next sibling of this element should be placed in the same area. More...
 
virtual T  SetKeepWithNext (bool keepWithNext)
  Sets whether the end of this BlockElement and the start of the next sibling of this element should be placed in the same area. More...
 
virtual T  SetRotationAngle (float angleInRadians)
  Sets the rotation radAngle. More...
 
virtual T  SetRotationAngle (double angleInRadians)
  Sets the rotation angle. More...
 
virtual T  SetWidth (float width)
  Sets the width property of a block element, measured in points. More...
 
virtual T  SetWidth (UnitValue width)
  Sets the width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual UnitValue  GetWidth ()
  Gets the width property of a block element. More...
 
virtual T  SetHeight (UnitValue height)
  Sets the height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetHeight (float height)
  Sets the height property a block element as a point-value. More...
 
virtual UnitValue  GetHeight ()
  Gets the height property of a block element. More...
 
virtual T  SetMaxHeight (float maxHeight)
  Sets the max-height of a block element as point-unit value. More...
 
virtual T  SetMaxHeight (UnitValue maxHeight)
  Sets the max-height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinHeight (UnitValue minHeight)
  Sets the min-height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinHeight (float minHeight)
  Sets the min-height of a block element as point-unit value. More...
 
virtual T  SetMaxWidth (UnitValue maxWidth)
  Sets the max-width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMaxWidth (float maxWidth)
  Sets the max-width of a block element as point-unit value. More...
 
virtual T  SetMinWidth (UnitValue minWidth)
  Sets the min-width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinWidth (float minWidth)
  Sets the min-width of a block element as point-unit value. More...
 
virtual T  SetNeutralRole ()
  Give this element a neutral role. More...
 

Package Functions

override IRenderer  MakeNewRenderer ()
 
virtual iText.Layout.Element.Cell  UpdateCellIndexes (int row, int col, int numberOfColumns)
  Updates cell indexes. More...
 
- Package Functions inherited from iText.Layout.Element.BlockElement< iText.Layout.Element.Cell >
  BlockElement ()
  Creates a BlockElement. More...
 

Package Attributes

DefaultAccessibilityProperties  tagProperties
 

Detailed Description

A Cell is one piece of data in an enclosing grid, the Table.

A 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.

Constructor & Destructor Documentation

◆ Cell() [1/2]

iText.Layout.Element.Cell.Cell ( int  rowspan,
int  colspan 
)
inline

Creates a cell which takes a custom amount of cell spaces in the table.

Parameters
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.

◆ Cell() [2/2]

iText.Layout.Element.Cell.Cell ( )
inline

Creates a cell.

Member Function Documentation

◆ Add() [1/2]

virtual iText.Layout.Element.Cell iText.Layout.Element.Cell.Add ( IBlockElement  element )
inlinevirtual

Adds any block element to the cell's contents.

Parameters
element a BlockElement
Returns
this Element

◆ Add() [2/2]

virtual iText.Layout.Element.Cell iText.Layout.Element.Cell.Add ( Image  element )
inlinevirtual

Adds an image to the cell's contents.

Parameters
element an Image
Returns
this Element

◆ Clone()

virtual iText.Layout.Element.Cell iText.Layout.Element.Cell.Clone ( bool  includeContent )
inlinevirtual

Clones a cell with its position, properties, and optionally its contents.

Parameters
includeContent whether or not to also include the contents of the cell.
Returns
a clone of this Element

◆ GetAccessibilityProperties()

override AccessibilityProperties iText.Layout.Element.Cell.GetAccessibilityProperties ( )
inlinevirtual

Gets the accessibility properties.

Gets the accessibility properties . See also IAccessibleElement.

Returns
an interface that allows to specify properties of a tagged element in Tagged PDF.

Implements iText.Layout.Element.BlockElement< iText.Layout.Element.Cell >.

◆ GetCol()

virtual int iText.Layout.Element.Cell.GetCol ( )
inlinevirtual

Gets the number of the column in which the cell is located.

Returns
the column number

◆ GetColspan()

virtual int iText.Layout.Element.Cell.GetColspan ( )
inlinevirtual

Gets the colspan of the cell.

Returns
the colspan

◆ GetRenderer()

override IRenderer iText.Layout.Element.Cell.GetRenderer ( )
inline

Gets a cell renderer for this element.

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 AbstractElement.SetNextRenderer(iText.Layout.Renderer.IRenderer) method call.

Returns
a cell renderer for this element

◆ GetRow()

virtual int iText.Layout.Element.Cell.GetRow ( )
inlinevirtual

Gets the number of the row in which the cell is located.

Returns
the row number

◆ GetRowspan()

virtual int iText.Layout.Element.Cell.GetRowspan ( )
inlinevirtual

Gets the rowspan of the cell.

Returns
the rowspan

◆ UpdateCellIndexes()

virtual iText.Layout.Element.Cell iText.Layout.Element.Cell.UpdateCellIndexes ( int  row,
int  col,
int  numberOfColumns 
)
inlinepackagevirtual

Updates cell indexes.

Parameters
row the number of the row to update
col the number of the col to update
numberOfColumns to evaluate new colspan
Returns
this Cell with updated fields