Package com.itextpdf.layout.renderer
Class Grid.Builder
java.lang.Object
com.itextpdf.layout.renderer.Grid.Builder
- Enclosing class:
Grid
This class is used to properly initialize starting values for grid.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a grid with provided properties.private static int
private static int
columns
(int explicitColumnCount) Set number of columns for a grid, the result will be either a provided one or if some elements have a property defining more columns on a grid than provided value it will be set instead.Set iteration flow for a grid.(package private) static Grid.Builder
Get grid builder for list of values.(package private) static Comparator
<GridCell> rows
(int explicitRowCount) Set number of rows for a grid, the result will be either a provided one or if some elements have a property defining more rows on a grid than provided value it will be set instead.
-
Field Details
-
explicitColumnCount
private int explicitColumnCount -
explicitRowCount
private int explicitRowCount -
flow
-
values
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
forItems
Get grid builder for list of values.- Parameters:
values
- values to layout on grid- Returns:
- new grid builder instance
-
columns
Set number of columns for a grid, the result will be either a provided one or if some elements have a property defining more columns on a grid than provided value it will be set instead.- Parameters:
explicitColumnCount
- explicit column count of a grid- Returns:
- current builder instance
-
rows
Set number of rows for a grid, the result will be either a provided one or if some elements have a property defining more rows on a grid than provided value it will be set instead.- Parameters:
explicitRowCount
- explicit height of a grid- Returns:
- current builder instance
-
flow
Set iteration flow for a grid.- Parameters:
flow
- iteration flow- Returns:
- current builder instance
-
build
Build a grid with provided properties.- Returns:
- new
Grid
instance.
-
calculateInitialColumnsCount
-
calculateInitialRowsCount
-
getOrderingFunctionForFlow
-