Class LayoutContext

java.lang.Object
com.itextpdf.layout.layout.LayoutContext
Direct Known Subclasses:
LineLayoutContext, PositionedLayoutContext

public class LayoutContext extends Object
Represents the context for content layouting.
  • Field Details

    • area

      protected LayoutArea area
      The LayoutArea for the content to be placed on.
    • marginsCollapseInfo

      protected MarginsCollapseInfo marginsCollapseInfo
      The info about margins collapsing.
    • floatRendererAreas

      protected List<Rectangle> floatRendererAreas
      The list of Rectangle objects.
    • clippedHeight

      protected boolean clippedHeight
      Indicates whether the height is clipped or not.
  • Constructor Details

    • LayoutContext

      public LayoutContext (LayoutArea area)
      Creates the layout context.
      Parameters:
      area - for the content to be placed on
    • LayoutContext

      public LayoutContext (LayoutArea area, MarginsCollapseInfo marginsCollapseInfo)
      Creates the layout context.
      Parameters:
      area - for the content to be placed on
      marginsCollapseInfo - the info about margins collapsing
    • LayoutContext

      public LayoutContext (LayoutArea area, MarginsCollapseInfo marginsCollapseInfo, List<Rectangle> floatedRendererAreas)
      Creates the layout context.
      Parameters:
      area - for the content to be placed on
      marginsCollapseInfo - the info about margins collapsing
      floatedRendererAreas - list of Rectangle objects
    • LayoutContext

      public LayoutContext (LayoutArea area, boolean clippedHeight)
      Creates the layout context.
      Parameters:
      area - for the content to be placed on
      clippedHeight - indicates whether the height is clipped or not
    • LayoutContext

      public LayoutContext (LayoutArea area, MarginsCollapseInfo marginsCollapseInfo, List<Rectangle> floatedRendererAreas, boolean clippedHeight)
      Creates the layout context.
      Parameters:
      area - for the content to be placed on
      marginsCollapseInfo - the info about margins collapsing
      floatedRendererAreas - list of Rectangle objects
      clippedHeight - indicates whether the height is clipped or not
  • Method Details

    • getArea

      public LayoutArea getArea()
      Gets the area the content to be placed on.
      Returns:
      the area for content layouting.
    • getMarginsCollapseInfo

      public MarginsCollapseInfo getMarginsCollapseInfo()
      Gets info about margins collapsing.
      Returns:
      the info about margins collapsing
    • getFloatRendererAreas

      public List<Rectangle> getFloatRendererAreas()
      Gets list of Rectangle objects.
      Returns:
      list of Rectangle objects
    • isClippedHeight

      public boolean isClippedHeight()
      Indicates whether the layout area's height is clipped or not.
      Returns:
      whether the layout area's height is clipped or not.
    • setClippedHeight

      public void setClippedHeight (boolean clippedHeight)
      Defines whether the layout area's height is clipped or not.
      Parameters:
      clippedHeight - indicates whether the height is clipped or not.
    • toString

      public String toString()
      Overrides:
      toString in class Object