Class MarginsCollapseHandler
java.lang.Object
com.itextpdf.layout.margincollapse.MarginsCollapseHandler
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 Summary
ConstructorsConstructorDescriptionMarginsCollapseHandler(IRenderer renderer, MarginsCollapseInfo marginsCollapseInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyClearance(float clearHeightCorrection) voidendChildMarginsHandling(Rectangle layoutBox) This method shall be called after child occupied area is included into parent occupied area.voidendMarginsCollapse(Rectangle layoutBox) voidprocessFixedHeightAdjustment(float heightDelta) startChildMarginsHandling(IRenderer child, Rectangle layoutBox) voidstartMarginsCollapse(Rectangle parentBBox)
-
Constructor Details
-
MarginsCollapseHandler
-
-
Method Details
-
processFixedHeightAdjustment
public void processFixedHeightAdjustment(float heightDelta) -
startChildMarginsHandling
-
applyClearance
public void applyClearance(float clearHeightCorrection) -
endChildMarginsHandling
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
-
endMarginsCollapse
-