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
ConstructorDescriptionMarginsCollapseHandler
(IRenderer renderer, MarginsCollapseInfo marginsCollapseInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyClearance
(float clearHeightCorrection) void
endChildMarginsHandling
(Rectangle layoutBox) This method shall be called after child occupied area is included into parent occupied area.void
endMarginsCollapse
(Rectangle layoutBox) void
processFixedHeightAdjustment
(float heightDelta) startChildMarginsHandling
(IRenderer child, Rectangle layoutBox) void
startMarginsCollapse
(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
-