iText 9.8.0 API
iText.Layout.Renderer.AbstractBreakRenderer Class Referenceabstract

Class for storing logic shared by break renderers. More...

Inheritance diagram for iText.Layout.Renderer.AbstractBreakRenderer:
iText.Layout.Renderer.IRenderer iText.Layout.IPropertyContainer iText.Layout.Renderer.AreaBreakRenderer iText.Layout.Renderer.SectionBreakRenderer

Public Member Functions

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 T1  GetProperty< T1 > (int key)
  Gets the 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 T1  GetOwnProperty< T1 > (int property)
  Gets own property from this entity. More...
 
virtual T1  GetDefaultProperty< T1 > (int property)
  Gets the default property from this entity. More...
 
virtual void  SetProperty (int property, Object value)
  Sets a property for this entity. More...
 
virtual void  DeleteOwnProperty (int property)
  Deletes the own property of this entity. 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< IRenderer >  GetChildRenderers ()
  Gets the child IRenderer s. More...
 
virtual bool  IsFlushed ()
  Indicates whether this renderer is flushed or not, i.e. if Draw(DrawContext) has already been called. More...
 
abstract void  AddChild (IRenderer arg1)
  Adds a child to the current renderer More...
 
abstract void  Draw (DrawContext arg1)
  Flushes the renderer subtree contents, i.e. draws itself on canvas, adds necessary objects to the iText.Kernel.Pdf.PdfDocument etc. More...
 
abstract IPropertyContainer  GetModelElement ()
  Gets the model element associated with this renderer. More...
 
abstract 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...
 
abstract LayoutArea  GetOccupiedArea ()
  Gets the resultant occupied area after the last call to the Layout(iText.Layout.Layout.LayoutContext) method. More...
 
abstract LayoutResult  Layout (LayoutContext arg1)
  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...
 
abstract void  Move (float arg1, float arg2)
  Moves the renderer subtree by the specified offset. More...
 

Package Functions

  AbstractBreakRenderer ()
  Creates new AbstractBreakRenderer instance. More...
 

Package Attributes

IRenderer  parent
 
IDictionary< int, Object >  properties = new Dictionary()
 

Detailed Description

Class for storing logic shared by break renderers.

Constructor & Destructor Documentation

◆ AbstractBreakRenderer()

iText.Layout.Renderer.AbstractBreakRenderer.AbstractBreakRenderer ( )
inlinepackage

Creates new AbstractBreakRenderer instance.

Member Function Documentation

◆ AddChild()

abstract void iText.Layout.Renderer.AbstractBreakRenderer.AddChild ( IRenderer  renderer )
pure virtual

Adds a child to the current renderer

Parameters
renderer a child to be added

Implements iText.Layout.Renderer.IRenderer.

Implemented in iText.Layout.Renderer.SectionBreakRenderer, and iText.Layout.Renderer.AreaBreakRenderer.

◆ DeleteOwnProperty()

virtual void iText.Layout.Renderer.AbstractBreakRenderer.DeleteOwnProperty ( int  property )
inlinevirtual

Deletes the own property of this entity.

Implements iText.Layout.IPropertyContainer.

◆ Draw()

abstract void iText.Layout.Renderer.AbstractBreakRenderer.Draw ( DrawContext  drawContext )
pure virtual

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

Parameters
drawContext contains the iText.Kernel.Pdf.PdfDocument to which the renderer subtree if flushed, the iText.Kernel.Pdf.Canvas.PdfCanvas on which the renderer subtree is drawn and other additional parameters needed to perform drawing

Implements iText.Layout.Renderer.IRenderer.

Implemented in iText.Layout.Renderer.SectionBreakRenderer, and iText.Layout.Renderer.AreaBreakRenderer.

◆ GetChildRenderers()

virtual IList<IRenderer> iText.Layout.Renderer.AbstractBreakRenderer.GetChildRenderers ( )
inlinevirtual

Gets the child IRenderer s.

Returns
a list of direct child renderers of this instance

Implements iText.Layout.Renderer.IRenderer.

◆ GetDefaultProperty< T1 >()

virtual T1 iText.Layout.Renderer.AbstractBreakRenderer.GetDefaultProperty< T1 > ( int  property )
inlinevirtual

Gets the default property from this entity.

Implements iText.Layout.IPropertyContainer.

◆ GetModelElement()

abstract IPropertyContainer iText.Layout.Renderer.AbstractBreakRenderer.GetModelElement ( )
pure virtual

Gets the model element associated with this renderer.

Returns
the model element, as a container of properties

Implements iText.Layout.Renderer.IRenderer.

Implemented in iText.Layout.Renderer.SectionBreakRenderer, and iText.Layout.Renderer.AreaBreakRenderer.

◆ GetNextRenderer()

abstract IRenderer iText.Layout.Renderer.AbstractBreakRenderer.GetNextRenderer ( )
pure virtual

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.

Returns
new renderer instance

Implements iText.Layout.Renderer.IRenderer.

Implemented in iText.Layout.Renderer.SectionBreakRenderer, and iText.Layout.Renderer.AreaBreakRenderer.

◆ GetOccupiedArea()

abstract LayoutArea iText.Layout.Renderer.AbstractBreakRenderer.GetOccupiedArea ( )
pure virtual

Gets the resultant occupied area after the last call to the Layout(iText.Layout.Layout.LayoutContext) method.

Returns

iText.Layout.Layout.LayoutArea instance

Implements iText.Layout.Renderer.IRenderer.

Implemented in iText.Layout.Renderer.SectionBreakRenderer, and iText.Layout.Renderer.AreaBreakRenderer.

◆ GetOwnProperty< T1 >()

virtual T1 iText.Layout.Renderer.AbstractBreakRenderer.GetOwnProperty< T1 > ( int  property )
inlinevirtual

Gets own property from this entity.

Implements iText.Layout.IPropertyContainer.

◆ GetParent()

virtual IRenderer iText.Layout.Renderer.AbstractBreakRenderer.GetParent ( )
inlinevirtual

Gets the parent IRenderer.

Returns
direct parent renderer of this instance

Implements iText.Layout.Renderer.IRenderer.

◆ GetProperty< T1 >() [1/2]

virtual T1 iText.Layout.Renderer.AbstractBreakRenderer.GetProperty< T1 > ( int  key )
inlinevirtual

Gets the property from this entity.

Implements iText.Layout.IPropertyContainer.

◆ GetProperty< T1 >() [2/2]

virtual T1 iText.Layout.Renderer.AbstractBreakRenderer.GetProperty< T1 > ( int  property,
T1  defaultValue 
)
inlinevirtual

Gets a property from this entity or one of its hierarchical parents.

Implements iText.Layout.Renderer.IRenderer.

◆ HasOwnProperty()

virtual bool iText.Layout.Renderer.AbstractBreakRenderer.HasOwnProperty ( int  property )
inlinevirtual

Checks if this entity has the specified property, i.e. if it was set to this very element earlier

Implements iText.Layout.IPropertyContainer.

◆ HasProperty()

virtual bool iText.Layout.Renderer.AbstractBreakRenderer.HasProperty ( int  property )
inlinevirtual

Checks if this entity has the specified property.

Implements iText.Layout.IPropertyContainer.

◆ IsFlushed()

virtual bool iText.Layout.Renderer.AbstractBreakRenderer.IsFlushed ( )
inlinevirtual

Indicates whether this renderer is flushed or not, i.e. if Draw(DrawContext) has already been called.

Returns
whether the renderer has been flushed

Implements iText.Layout.Renderer.IRenderer.

◆ Layout()

abstract LayoutResult iText.Layout.Renderer.AbstractBreakRenderer.Layout ( LayoutContext  layoutContext )
pure virtual

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.

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. iText.Layout.Layout.LayoutResult can be extended to return custom layout results for custom elements, e.g. TextRenderer uses iText.Layout.Layout.TextLayoutResult as its result. This method can be called standalone to learn how much area the renderer subtree needs, or can be called before Draw(DrawContext) , to prepare the renderer to be flushed to the output stream.

Parameters
layoutContext the description of layout area and any other additional information
Returns
result of the layout process

Implements iText.Layout.Renderer.IRenderer.

Implemented in iText.Layout.Renderer.SectionBreakRenderer, and iText.Layout.Renderer.AreaBreakRenderer.

◆ Move()

abstract void iText.Layout.Renderer.AbstractBreakRenderer.Move ( float  dx,
float  dy 
)
pure virtual

Moves the renderer subtree by the specified offset.

Moves the renderer subtree by the specified offset. This method affects occupied area of the renderer.

Parameters
dx the x-axis offset in points. Positive value will move the renderer subtree to the right.
dy the y-axis offset in points. Positive value will move the renderer subtree to the top.

Implements iText.Layout.Renderer.IRenderer.

Implemented in iText.Layout.Renderer.SectionBreakRenderer, and iText.Layout.Renderer.AreaBreakRenderer.

◆ SetParent()

virtual IRenderer iText.Layout.Renderer.AbstractBreakRenderer.SetParent ( IRenderer  parent )
inlinevirtual

Explicitly sets this object as the child of another IRenderer in the renderer hierarchy.

Explicitly sets this object as the child of another IRenderer in the renderer hierarchy. Some implementations also use this method internally to create a consistent hierarchy tree.

Parameters
parent the object to place higher in the renderer hierarchy
Returns
by default, this object

Implements iText.Layout.Renderer.IRenderer.

◆ SetProperty()

virtual void iText.Layout.Renderer.AbstractBreakRenderer.SetProperty ( int  property,
Object  value 
)
inlinevirtual

Sets a property for this entity.

Implements iText.Layout.IPropertyContainer.