iText 8.0.4 API
iText.Layout.Renderer.TableRenderer Class Reference

This class represents the renderer object for a iText.Layout.Element.Table object. More...

Inheritance diagram for iText.Layout.Renderer.TableRenderer:
iText.Layout.Renderer.AbstractRenderer iText.Layout.Renderer.IRenderer iText.Layout.IPropertyContainer

Public Member Functions

  TableRenderer (Table modelElement, Table.RowRange rowRange)
  Creates a TableRenderer from a iText.Layout.Element.Table which will partially render the table. More...
 
  TableRenderer (Table modelElement)
  Creates a TableRenderer from a iText.Layout.Element.Table. More...
 
override void  AddChild (IRenderer renderer)
  Adds a child to the current renderer More...
 
override Rectangle  ApplyPaddings (Rectangle rect, bool reverse)
  Applies paddings of the renderer on the given rectangle More...
 
override LayoutResult  Layout (LayoutContext layoutContext)
  This method simulates positioning of the renderer, including all of its children, and returns the iText.Layout.Layout.LayoutResult , representing the layout result, including occupied area, status, i.e. if there was enough place to fit the renderer subtree, etc. More...
 
override void  Draw (DrawContext drawContext)
  Flushes the renderer subtree contents, i.e. draws itself on canvas, adds necessary objects to the iText.Kernel.Pdf.PdfDocument etc. More...
 
override void  DrawChildren (DrawContext drawContext)
  Performs the drawing operation for all children of this renderer. More...
 
override void  DrawBackground (DrawContext drawContext)
  Draws a background layer if it is defined by a key iText.Layout.Properties.Property.BACKGROUND in either the layout element or this IRenderer itself. More...
 
override IRenderer  GetNextRenderer ()
  Gets a new instance of this class to be used as a next renderer, after this renderer is used, if Layout(iText.Layout.Layout.LayoutContext) is called more than once. More...
 
override void  Move (float dxRight, float dyUp)
  Moves the renderer subtree by the specified offset. More...
 
override MinMaxWidth  GetMinMaxWidth ()
  Calculates min and max width values for current renderer. More...
 
override void  DrawBorder (DrawContext drawContext)
  Performs the drawing operation for the border of this renderer, if defined by any of the iText.Layout.Properties.Property.BORDER values in either the layout element or this IRenderer itself. More...
 
- Public Member Functions inherited from iText.Layout.Renderer.AbstractRenderer
virtual IPropertyContainer  GetModelElement ()
  Gets the model element associated with this renderer. More...
 
virtual IList< IRenderer GetChildRenderers ()
  Gets the child IRenderer s. More...
 
virtual bool  HasProperty (int property)
  Checks if this entity has the specified property. More...
 
virtual bool  HasOwnProperty (int property)
  Checks if this entity has the specified property, i.e. if it was set to this very element earlier More...
 
virtual bool  HasOwnOrModelProperty (int property)
  Checks if this renderer or its model element have the specified property, i.e. if it was set to this very element or its very model element earlier. More...
 
virtual void  DeleteOwnProperty (int property)
  Deletes the own property of this entity. More...
 
virtual void  DeleteProperty (int property)
  Deletes property from this very renderer, or in case the property is specified on its model element, the property of the model element is deleted More...
 
virtual T1  GetProperty< T1 > (int key)
  Gets the property from this entity. More...
 
virtual T1  GetOwnProperty< T1 > (int property)
  Gets own property from this entity. More...
 
virtual T1  GetProperty< T1 > (int property, T1 defaultValue)
  Gets a property from this entity or one of its hierarchical parents. More...
 
virtual void  SetProperty (int property, Object value)
  Sets a property for this entity. More...
 
virtual T1  GetDefaultProperty< T1 > (int property)
  Gets the default property from this entity. More...
 
virtual PdfFont  GetPropertyAsFont (int property)
  Returns a property with a certain key, as a font object. More...
 
virtual Color  GetPropertyAsColor (int property)
  Returns a property with a certain key, as a color. More...
 
virtual TransparentColor  GetPropertyAsTransparentColor (int property)
  Returns a property with a certain key, as a iText.Layout.Properties.TransparentColor. More...
 
virtual ? float  GetPropertyAsFloat (int property)
  Returns a property with a certain key, as a floating point value. More...
 
virtual ? float  GetPropertyAsFloat (int property, float? defaultValue)
  Returns a property with a certain key, as a floating point value. More...
 
virtual ? bool  GetPropertyAsBoolean (int property)
  Returns a property with a certain key, as a boolean value. More...
 
virtual UnitValue  GetPropertyAsUnitValue (int property)
  Returns a property with a certain key, as a unit value. More...
 
virtual ? int  GetPropertyAsInteger (int property)
  Returns a property with a certain key, as an integer value. More...
 
override String  ToString ()
  Returns a string representation of the renderer. More...
 
virtual LayoutArea  GetOccupiedArea ()
  Gets the resultant occupied area after the last call to the Layout(iText.Layout.Layout.LayoutContext) method. More...
 
virtual bool  IsFlushed ()
  Indicates whether this renderer is flushed or not, i.e. if Draw(DrawContext) has already been called. More...
 
virtual IRenderer  SetParent (IRenderer parent)
  Explicitly sets this object as the child of another IRenderer in the renderer hierarchy. More...
 
virtual IRenderer  GetParent ()
  Gets the parent IRenderer. More...
 
virtual IList< Rectangle InitElementAreas (LayoutArea area)
  Gets all rectangles that this IRenderer can draw upon in the given area. More...
 
virtual Rectangle  GetOccupiedAreaBBox ()
  Gets the bounding box that contains all content written to the DrawContext by this IRenderer. More...
 
virtual Rectangle  GetBorderAreaBBox ()
  Gets the border box of a renderer. More...
 
virtual Rectangle  GetInnerAreaBBox ()
 
virtual Rectangle  ApplyMargins (Rectangle rect, bool reverse)
  Applies margins of the renderer on the given rectangle More...
 
virtual Rectangle  ApplyBorderBox (Rectangle rect, bool reverse)
  Applies the border box of the renderer on the given rectangle If the border of a certain side is null, the side will remain as it was. More...
 
virtual bool  IsFirstOnRootArea ()
 

Additional Inherited Members

- Static Public Member Functions inherited from iText.Layout.Renderer.AbstractRenderer
static PdfFormXObject  CreateXObject (AbstractLinearGradientBuilder linearGradientBuilder, Rectangle xObjectArea, PdfDocument document)
  Create a iText.Kernel.Pdf.Xobject.PdfFormXObject with the given area and containing a linear gradient inside. More...
 
- Static Public Attributes inherited from iText.Layout.Renderer.AbstractRenderer
const float  OVERLAP_EPSILON = 1e-4f
 

Detailed Description

This class represents the renderer object for a iText.Layout.Element.Table object.

This class represents the renderer object for a iText.Layout.Element.Table object. It will delegate its drawing operations on to the CellRenderer instances associated with the table cells.

Constructor & Destructor Documentation

◆ TableRenderer() [1/2]

iText.Layout.Renderer.TableRenderer.TableRenderer ( Table  modelElement,
Table.RowRange  rowRange 
)
inline

Creates a TableRenderer from a iText.Layout.Element.Table which will partially render the table.

Parameters
modelElement the table to be rendered by this renderer
rowRange the table rows to be rendered

◆ TableRenderer() [2/2]

iText.Layout.Renderer.TableRenderer.TableRenderer ( Table  modelElement )
inline

Creates a TableRenderer from a iText.Layout.Element.Table.

Parameters
modelElement the table to be rendered by this renderer

Member Function Documentation

◆ AddChild()

override void iText.Layout.Renderer.TableRenderer.AddChild ( IRenderer  renderer )
inlinevirtual

Adds a child to the current renderer

Reimplemented from iText.Layout.Renderer.AbstractRenderer.

◆ ApplyPaddings()

override Rectangle iText.Layout.Renderer.TableRenderer.ApplyPaddings ( Rectangle  rect,
bool  reverse 
)
inlinevirtual

Applies paddings of the renderer on the given rectangle

Parameters
rect a rectangle paddings will be applied on.
reverse indicates whether paddings will be applied inside (in case of false) or outside (in case of true) the rectangle.
Returns
a border box of the renderer
See also
GetPaddings()

Reimplemented from iText.Layout.Renderer.AbstractRenderer.

◆ Draw()

override void iText.Layout.Renderer.TableRenderer.Draw ( DrawContext  drawContext )
inlinevirtual

Flushes the renderer subtree contents, i.e. draws itself on canvas, adds necessary objects to the iText.Kernel.Pdf.PdfDocument etc.

Reimplemented from iText.Layout.Renderer.AbstractRenderer.

◆ DrawBackground()

override void iText.Layout.Renderer.TableRenderer.DrawBackground ( DrawContext  drawContext )
inlinevirtual

Draws a background layer if it is defined by a key iText.Layout.Properties.Property.BACKGROUND in either the layout element or this IRenderer itself.

Parameters
drawContext the context (canvas, document, etc) of this drawing operation.

Reimplemented from iText.Layout.Renderer.AbstractRenderer.

◆ DrawBorder()

override void iText.Layout.Renderer.TableRenderer.DrawBorder ( DrawContext  drawContext )
inlinevirtual

Performs the drawing operation for the border of this renderer, if defined by any of the iText.Layout.Properties.Property.BORDER values in either the layout element or this IRenderer itself.

Parameters
drawContext the context (canvas, document, etc) of this drawing operation.

Reimplemented from iText.Layout.Renderer.AbstractRenderer.

◆ DrawChildren()

override void iText.Layout.Renderer.TableRenderer.DrawChildren ( DrawContext  drawContext )
inlinevirtual

Performs the drawing operation for all children of this renderer.

Reimplemented from iText.Layout.Renderer.AbstractRenderer.

◆ GetMinMaxWidth()

override MinMaxWidth iText.Layout.Renderer.TableRenderer.GetMinMaxWidth ( )
inlinevirtual

Calculates min and max width values for current renderer.

Returns
instance of iText.Layout.Minmaxwidth.MinMaxWidth

Reimplemented from iText.Layout.Renderer.AbstractRenderer.

◆ GetNextRenderer()

override IRenderer iText.Layout.Renderer.TableRenderer.GetNextRenderer ( )
inlinevirtual

Gets a new instance of this class to be used as a next renderer, after this renderer is used, if Layout(iText.Layout.Layout.LayoutContext) is called more than once.

Gets a new instance of this class to be used as a next renderer, after this renderer is used, if Layout(iText.Layout.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.

Returns
new renderer instance

Implements iText.Layout.Renderer.AbstractRenderer.

◆ Layout()

override LayoutResult iText.Layout.Renderer.TableRenderer.Layout ( LayoutContext  layoutContext )
inlinevirtual

This method simulates positioning of the renderer, including all of its children, and returns the iText.Layout.Layout.LayoutResult , representing the layout result, including occupied area, status, i.e. if there was enough place to fit the renderer subtree, etc.

Implements iText.Layout.Renderer.AbstractRenderer.

◆ Move()

override void iText.Layout.Renderer.TableRenderer.Move ( float  dxRight,
float  dyUp 
)
inlinevirtual

Moves the renderer subtree by the specified offset.

Reimplemented from iText.Layout.Renderer.AbstractRenderer.