Class GridSizer
java.lang.Object
com.itextpdf.layout.renderer.GridSizer
Class representing grid sizing algorithm.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate floatcalculateGridOccupiedHeight(List<Float> originalSizes) Calculate grid container occupied area based on original (non-expanded percentages) track sizes.floatGets grid container height.private voidprivate voidvoidsizeGrid()Resolves grid track sizes.private float
-
Field Details
-
grid
-
templateColumns
-
templateRows
-
columnAutoWidth
-
rowAutoHeight
-
columnGap
private final float columnGap -
rowGap
private final float rowGap -
actualBBox
-
containerHeight
private float containerHeight
-
-
Constructor Details
-
GridSizer
GridSizer(Grid grid, List<GridValue> templateColumns, List<GridValue> templateRows, GridValue columnAutoWidth, GridValue rowAutoHeight, float columnGap, float rowGap, Rectangle actualBBox) Creates new grid sizer instance.- Parameters:
grid- grid to sizetemplateColumns- template values for columnstemplateRows- template values for rowscolumnAutoWidth- value which used to size columns out of template rangerowAutoHeight- value which used to size rows out of template rangecolumnGap- gap size between columnsrowGap- gap size between rowsactualBBox- actual bbox which restricts sizing algorithm
-
-
Method Details
-
sizeGrid
public void sizeGrid()Resolves grid track sizes. -
getContainerHeight
public float getContainerHeight()Gets grid container height. Use this method only after callingsizeGrid().- Returns:
- grid container height covered by row template
-
resolveGridRows
private void resolveGridRows() -
calculateGridOccupiedHeight
-
sum
-
resolveGridColumns
private void resolveGridColumns()
-