Class Div

All Implemented Interfaces:
IAbstractElement, IBlockElement, IElement, IPropertyContainer, IAccessibleElement
Direct Known Subclasses:
ListItem

public class Div extends BlockElement<Div>
A Div is a container object that defines a section in a document, which will have some shared layout properties. Like all BlockElement types, it will try to take up as much horizontal space as possible.

The concept is very similar to that of the div tag in HTML.

  • Field Details

  • Constructor Details

    • Div

      public Div()
  • Method Details

    • add

      public Div add (IBlockElement element)
      Adds any block element to the div's contents.
      Parameters:
      element - a BlockElement
      Returns:
      this Element
    • add

      public Div add (Image element)
      Adds an image to the div's contents.
      Parameters:
      element - an Image
      Returns:
      this Element
    • add

      public Div add (AreaBreak areaBreak)
      Adds an area break to the div's contents.
      Parameters:
      areaBreak - an AreaBreak
      Returns:
      this Element
    • getAccessibilityProperties

      public AccessibilityProperties getAccessibilityProperties()
      Description copied from interface: IAccessibleElement
      Returns:
      an interface that allows to specify properties of a tagged element in Tagged PDF.
    • setFillAvailableArea

      public Div setFillAvailableArea (boolean fillArea)
      Defines whether the Div should occupy all the space left in the available area in case it is the last element in this area.
      Parameters:
      fillArea - defines whether the available area should be filled
      Returns:
      this Div
    • setFillAvailableAreaOnSplit

      public Div setFillAvailableAreaOnSplit (boolean fillAreaOnSplit)
      Defines whether the Div should occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area.
      Parameters:
      fillAreaOnSplit - defines whether the available area should be filled
      Returns:
      this Div
    • makeNewRenderer

      protected IRenderer makeNewRenderer()
      Description copied from class: AbstractElement
      Creates new renderer instance.
      Specified by:
      makeNewRenderer in class AbstractElement<Div>
      Returns:
      new IRenderer