Class MarginsCollapseHandler

java.lang.Object
com.itextpdf.layout.margincollapse.MarginsCollapseHandler

public class MarginsCollapseHandler extends Object
Rules of the margins collapsing are taken from Mozilla Developer Network: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing See also: https://www.w3.org/TR/CSS2/box.html#collapsing-margins
  • Constructor Details

  • Method Details

    • processFixedHeightAdjustment

      public void processFixedHeightAdjustment (float heightDelta)
    • startChildMarginsHandling

      public MarginsCollapseInfo startChildMarginsHandling (IRenderer child, Rectangle layoutBox)
    • applyClearance

      public void applyClearance (float clearHeightCorrection)
    • endChildMarginsHandling

      public void endChildMarginsHandling (Rectangle layoutBox)
      This method shall be called after child occupied area is included into parent occupied area.
      Parameters:
      layoutBox - available area for child and its siblings layout. It might be adjusted inside the method
    • startMarginsCollapse

      public void startMarginsCollapse (Rectangle parentBBox)
    • endMarginsCollapse

      public void endMarginsCollapse (Rectangle layoutBox)