Class AbstractBreakRenderer

java.lang.Object
com.itextpdf.layout.renderer.AbstractBreakRenderer
All Implemented Interfaces:
IPropertyContainer, IRenderer
Direct Known Subclasses:
AreaBreakRenderer, SectionBreakRenderer

public abstract class AbstractBreakRenderer extends Object implements IRenderer
Class for storing logic shared by break renderers.
  • Field Details

  • Constructor Details

  • Method Details

    • hasProperty

      public boolean hasProperty (int property)
      Checks if this entity has the specified property. Compared to IPropertyContainer.hasOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance
      Specified by:
      hasProperty in interface IPropertyContainer
      Parameters:
      property - the property to be checked
      Returns:
      true if this instance has given property, false otherwise
    • hasOwnProperty

      public boolean hasOwnProperty (int property)
      Checks if this entity has the specified property, i.e. if it was set to this very element earlier
      Specified by:
      hasOwnProperty in interface IPropertyContainer
      Parameters:
      property - the property to be checked
      Returns:
      true if this instance has given own property, false otherwise
    • getProperty

      public  T1 getProperty (int key)
      Gets the property from this entity. Compared to IPropertyContainer.getOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance
      Specified by:
      getProperty in interface IPropertyContainer
      Type Parameters:
      T1 - the return type associated with the property
      Parameters:
      key - the property to be retrieved
      Returns:
      the value of the given property. null will be returned if the property value was not found
    • getProperty

      public  T1 getProperty (int property, T1 defaultValue)
      Gets a property from this entity or one of its hierarchical parents. If the property is not found, defaultValue will be returned.
      Specified by:
      getProperty in interface IRenderer
      Type Parameters:
      T1 - the return type associated with the property
      Parameters:
      property - the property to be retrieved
      defaultValue - a fallback value
      Returns:
      the value of the given property
    • getOwnProperty

      public  T1 getOwnProperty (int property)
      Gets own property from this entity. The property must have been set earlier to this entity. If the property is not found, null will be returned.
      Specified by:
      getOwnProperty in interface IPropertyContainer
      Type Parameters:
      T1 - the return type associated with the property
      Parameters:
      property - the property to be retrieved
      Returns:
      the value of the given own property. null will be returned if the property value was not found
    • getDefaultProperty

      public  T1 getDefaultProperty (int property)
      Gets the default property from this entity.
      Specified by:
      getDefaultProperty in interface IPropertyContainer
      Type Parameters:
      T1 - the return type associated with the property
      Parameters:
      property - the property to be retrieved
      Returns:
      the default property value. If the default property is not defined, null will be returned
    • setProperty

      public void setProperty (int property, Object value)
      Sets a property for this entity.
      Specified by:
      setProperty in interface IPropertyContainer
      Parameters:
      property - the property to be set
      value - the value of the property
    • deleteOwnProperty

      public void deleteOwnProperty (int property)
      Deletes the own property of this entity.
      Specified by:
      deleteOwnProperty in interface IPropertyContainer
      Parameters:
      property - the property to be deleted
    • setParent

      public IRenderer setParent (IRenderer parent)
      Description copied from interface: IRenderer
      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.
      Specified by:
      setParent in interface IRenderer
      Parameters:
      parent - the object to place higher in the renderer hierarchy
      Returns:
      by default, this object
    • getParent

      public IRenderer getParent()
      Description copied from interface: IRenderer
      Gets the parent IRenderer.
      Specified by:
      getParent in interface IRenderer
      Returns:
      direct parent renderer of this instance
    • getChildRenderers

      public List<IRenderer> getChildRenderers()
      Description copied from interface: IRenderer
      Gets the child IRenderers.
      Specified by:
      getChildRenderers in interface IRenderer
      Returns:
      a list of direct child renderers of this instance
    • isFlushed

      public boolean isFlushed()
      Description copied from interface: IRenderer
      Indicates whether this renderer is flushed or not, i.e. if IRenderer.draw(DrawContext) has already been called.
      Specified by:
      isFlushed in interface IRenderer
      Returns:
      whether the renderer has been flushed