Class TableRenderer
public class TableRenderer : AbstractRenderer, IRenderer, IPropertyContainer
- Inheritance
-
TableRenderer
- Implements
- Inherited Members
Remarks
This class represents the renderer object for a Table object. It will delegate its drawing operations on to the CellRenderer instances associated with the table cells.
Constructors
TableRenderer(Table)
Creates a TableRenderer from a Table.
public TableRenderer(Table modelElement)
Parameters
modelElement
Tablethe table to be rendered by this renderer
TableRenderer(Table, RowRange)
Creates a TableRenderer from a Table which will partially render the table.
public TableRenderer(Table modelElement, Table.RowRange rowRange)
Parameters
modelElement
Tablethe table to be rendered by this renderer
rowRange
Table.RowRangethe table rows to be rendered
Fields
captionRenderer
protected DivRenderer captionRenderer
Field Value
footerRenderer
protected TableRenderer footerRenderer
Field Value
headerRenderer
protected TableRenderer headerRenderer
Field Value
isOriginalNonSplitRenderer
True for newly created renderer.
protected bool isOriginalNonSplitRenderer
Field Value
Remarks
True for newly created renderer. For split renderers this is set to false. Used for tricky layout.
rowRange
protected Table.RowRange rowRange
Field Value
rows
protected IList<CellRenderer[]> rows
Field Value
Methods
AddChild(IRenderer)
public override void AddChild(IRenderer renderer)
Parameters
renderer
IRenderer
AllowLastYLineRecursiveExtraction()
protected override bool AllowLastYLineRecursiveExtraction()
Returns
ApplyBorderBox(Rectangle, Border[], bool)
protected override Rectangle ApplyBorderBox(Rectangle rect, Border[] borders, bool reverse)
Parameters
Returns
ApplyPaddings(Rectangle, bool)
public override Rectangle ApplyPaddings(Rectangle rect, bool reverse)
Parameters
Returns
ApplyPaddings(Rectangle, UnitValue[], bool)
protected override Rectangle ApplyPaddings(Rectangle rect, UnitValue[] paddings, bool reverse)
Parameters
Returns
CreateOverflowRenderer(RowRange)
protected virtual TableRenderer CreateOverflowRenderer(Table.RowRange rowRange)
Parameters
Returns
CreateSplitRenderer(RowRange)
protected virtual TableRenderer CreateSplitRenderer(Table.RowRange rowRange)
Parameters
Returns
Draw(DrawContext)
public override void Draw(DrawContext drawContext)
Parameters
drawContext
DrawContext
DrawBackground(DrawContext)
public override void DrawBackground(DrawContext drawContext)
Parameters
drawContext
DrawContext
DrawBackgrounds(DrawContext)
protected virtual void DrawBackgrounds(DrawContext drawContext)
Parameters
drawContext
DrawContext
DrawBorder(DrawContext)
public override void DrawBorder(DrawContext drawContext)
Parameters
drawContext
DrawContext
DrawBorders(DrawContext)
protected virtual void DrawBorders(DrawContext drawContext)
Parameters
drawContext
DrawContext
DrawCaption(DrawContext)
protected virtual void DrawCaption(DrawContext drawContext)
Parameters
drawContext
DrawContext
DrawChildren(DrawContext)
public override void DrawChildren(DrawContext drawContext)
Parameters
drawContext
DrawContext
ExtendLastRow(CellRenderer[], Rectangle)
protected virtual void ExtendLastRow(CellRenderer[] lastRow, Rectangle freeBox)
Parameters
lastRow
CellRenderer[]freeBox
Rectangle
GetMinMaxWidth()
public override MinMaxWidth GetMinMaxWidth()
Returns
GetNextRenderer()
Gets a new instance of this class to be used as a next renderer, after this renderer is used, if Layout(LayoutContext) is called more than once.
public override IRenderer GetNextRenderer()
Returns
- IRenderer
new renderer instance
Remarks
Gets a new instance of this class to be used as a next renderer, after this renderer is used, if Layout(LayoutContext) is called more than once.
If a renderer overflows to the next area, iText uses this method to create a renderer for the overflow part. So if one wants to extend TableRenderer , one should override this method: otherwise the default method will be used and thus the default rather than the custom renderer will be created.Layout(LayoutContext)
public override LayoutResult Layout(LayoutContext layoutContext)
Parameters
layoutContext
LayoutContext
Returns
Move(float, float)
public override void Move(float dxRight, float dyUp)
Parameters
RetrieveWidth(float)
protected override float? RetrieveWidth(float parentBoxWidth)
Parameters
parentBoxWidth
float
Returns
Split(int)
protected virtual TableRenderer[] Split(int row)
Parameters
row
int
Returns
Split(int, bool)
protected virtual TableRenderer[] Split(int row, bool hasContent)
Parameters
Returns
Split(int, bool, bool)
protected virtual TableRenderer[] Split(int row, bool hasContent, bool cellWithBigRowspanAdded)