Package com.itextpdf.layout.renderer
Class TableWidths
- java.lang.Object
-
- com.itextpdf.layout.renderer.TableWidths
-
final class TableWidths extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
TableWidths.CellInfo
private static class
TableWidths.ColumnWidthData
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<TableWidths.CellInfo>
cells
private boolean
fixedTableLayout
private boolean
fixedTableWidth
private float
horizontalBorderSpacing
private float
layoutMinWidth
private float
leftBorderMaxWidth
private int
numberOfColumns
private float
rightBorderMaxWidth
private float
tableMaxWidth
private float
tableMinWidth
private TableRenderer
tableRenderer
private float
tableWidth
private TableWidths.ColumnWidthData[]
widths
private static UnitValue
ZeroWidth
-
Constructor Summary
Constructors Constructor Description TableWidths(TableRenderer tableRenderer, float availableWidth, boolean calculateTableMaxWidth, float rightBorderMaxWidth, float leftBorderMaxWidth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) float[]
autoLayout()
(package private) java.util.List<TableWidths.CellInfo>
autoLayoutCustom()
private void
calculateMinMaxWidths()
private void
calculateTableWidth(float availableWidth, boolean calculateTableMaxWidth)
private float[]
extractWidths()
private void
fillAndSortCells()
private void
fillRendererCells(TableRenderer renderer, byte region)
(package private) float[]
fixedLayout()
private float[]
getCellBorderIndents(TableWidths.CellInfo cell)
private UnitValue
getCellWidth(CellRenderer cell, boolean zeroIsValid)
Gets width of the cell, adding paddings and extra spacing if necessary.(package private) float
getMinWidth()
private Table
getTable()
(package private) boolean
hasFixedLayout()
(package private) float[]
layout()
(package private) void
processCell(TableWidths.CellInfo cell)
(package private) void
processCellsRemainWidth(TableWidths.CellInfo cell, UnitValue cellWidth)
(package private) void
processColumns()
(package private) void
recalculate(float minSum)
private UnitValue
resolveMinMaxCollision(CellRenderer cell, UnitValue widthValue)
private float
retrieveTableWidth(float width)
private java.lang.Float
retrieveTableWidth(UnitValue width, float availableWidth)
java.lang.String
toString()
private void
warn100percent()
-
-
-
Field Detail
-
tableRenderer
private final TableRenderer tableRenderer
-
numberOfColumns
private final int numberOfColumns
-
rightBorderMaxWidth
private final float rightBorderMaxWidth
-
leftBorderMaxWidth
private final float leftBorderMaxWidth
-
widths
private final TableWidths.ColumnWidthData[] widths
-
horizontalBorderSpacing
private final float horizontalBorderSpacing
-
cells
private java.util.List<TableWidths.CellInfo> cells
-
tableWidth
private float tableWidth
-
fixedTableWidth
private boolean fixedTableWidth
-
fixedTableLayout
private boolean fixedTableLayout
-
layoutMinWidth
private float layoutMinWidth
-
tableMinWidth
private float tableMinWidth
-
tableMaxWidth
private float tableMaxWidth
-
ZeroWidth
private static final UnitValue ZeroWidth
-
-
Constructor Detail
-
TableWidths
TableWidths(TableRenderer tableRenderer, float availableWidth, boolean calculateTableMaxWidth, float rightBorderMaxWidth, float leftBorderMaxWidth)
-
-
Method Detail
-
hasFixedLayout
boolean hasFixedLayout()
-
layout
float[] layout()
-
getMinWidth
float getMinWidth()
-
autoLayout
float[] autoLayout()
-
autoLayoutCustom
java.util.List<TableWidths.CellInfo> autoLayoutCustom()
-
processCell
void processCell(TableWidths.CellInfo cell)
-
processColumns
void processColumns()
-
recalculate
void recalculate(float minSum)
-
processCellsRemainWidth
void processCellsRemainWidth(TableWidths.CellInfo cell, UnitValue cellWidth)
-
fixedLayout
float[] fixedLayout()
-
calculateTableWidth
private void calculateTableWidth(float availableWidth, boolean calculateTableMaxWidth)
-
retrieveTableWidth
private java.lang.Float retrieveTableWidth(UnitValue width, float availableWidth)
-
retrieveTableWidth
private float retrieveTableWidth(float width)
-
getTable
private Table getTable()
-
calculateMinMaxWidths
private void calculateMinMaxWidths()
-
getCellBorderIndents
private float[] getCellBorderIndents(TableWidths.CellInfo cell)
-
fillAndSortCells
private void fillAndSortCells()
-
fillRendererCells
private void fillRendererCells(TableRenderer renderer, byte region)
-
warn100percent
private void warn100percent()
-
extractWidths
private float[] extractWidths()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getCellWidth
private UnitValue getCellWidth(CellRenderer cell, boolean zeroIsValid)
Gets width of the cell, adding paddings and extra spacing if necessary.- Parameters:
cell
- renderer from which width will be taken. Note that this method will not change original width of the element.zeroIsValid
- defines if 0 width is valid- Returns:
- increased width of the renderer
-
resolveMinMaxCollision
private UnitValue resolveMinMaxCollision(CellRenderer cell, UnitValue widthValue)
-
-