Package com.itextpdf.layout.renderer
Class TableBorders
- java.lang.Object
-
- com.itextpdf.layout.renderer.TableBorders
-
- Direct Known Subclasses:
CollapsedTableBorders
,SeparatedTableBorders
abstract class TableBorders extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
finishRow
The last row, which should be processed on this area.protected java.util.List<java.util.List<Border>>
horizontalBorders
Horizontal borders of the table.protected int
largeTableIndexOffset
The number of rows flushed to the table.protected float
leftBorderMaxWidth
The width of the widest left border.protected int
numberOfColumns
The number of the table's columns.protected float
rightBorderMaxWidth
The width of the widest right border.protected java.util.List<CellRenderer[]>
rows
All the cells of the table.protected int
startRow
The first row, which should be processed on this area.protected Border[]
tableBoundingBorders
The outer borders of the table (as body).protected java.util.List<java.util.List<Border>>
verticalBorders
Vertical borders of the table.
-
Constructor Summary
Constructors Constructor Description TableBorders(java.util.List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders)
TableBorders(java.util.List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders, int largeTableIndexOffset)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract TableBorders
applyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse)
protected abstract TableBorders
applyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse)
protected abstract TableBorders
applyCellIndents(Rectangle box, float topIndent, float rightIndent, float bottomIndent, float leftIndent, boolean reverse)
protected abstract TableBorders
applyLeftAndRightTableBorder(Rectangle layoutBox, boolean reverse)
protected abstract TableBorders
applyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse)
protected abstract TableBorders
applyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse)
protected abstract void
buildBordersArrays(CellRenderer cell, int row, int col, int[] rowspansToDeduct)
Deprecated.Remove rowspansToDeduct parameter which is not used anymore.protected abstract TableBorders
collapseTableWithFooter(TableBorders footerBordersHandler, boolean hasContent)
protected abstract TableBorders
collapseTableWithHeader(TableBorders headerBordersHandler, boolean updateBordersHandler)
protected abstract TableBorders
drawHorizontalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor)
protected abstract TableBorders
drawVerticalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor)
protected abstract TableBorders
fixHeaderOccupiedArea(Rectangle occupiedBox, Rectangle layoutBox)
float[]
getCellBorderIndents(int row, int col, int rowspan, int colspan)
protected abstract float
getCellVerticalAddition(float[] indents)
int
getFinishRow()
java.util.List<Border>
getFirstHorizontalBorder()
java.util.List<Border>
getFirstVerticalBorder()
abstract java.util.List<Border>
getHorizontalBorder(int index)
java.util.List<Border>
getLastHorizontalBorder()
java.util.List<Border>
getLastVerticalBorder()
float
getLeftBorderMaxWidth()
float
getMaxBottomWidth()
float
getMaxLeftWidth()
float
getMaxRightWidth()
float
getMaxTopWidth()
int
getNumberOfColumns()
float
getRightBorderMaxWidth()
int
getStartRow()
Border[]
getTableBoundingBorders()
abstract java.util.List<Border>
getVerticalBorder(int index)
Border
getWidestHorizontalBorder(int row)
Border
getWidestHorizontalBorder(int row, int start, int end)
Border
getWidestVerticalBorder(int col)
Border
getWidestVerticalBorder(int col, int start, int end)
protected TableBorders
initializeBorders()
protected TableBorders
processAllBordersAndEmptyRows()
private void
removeRows(int startRow, int numOfRows)
protected TableBorders
setFinishRow(int row)
protected TableBorders
setRowRange(int startRow, int finishRow)
protected TableBorders
setStartRow(int row)
protected TableBorders
setTableBoundingBorders(Border[] borders)
protected abstract TableBorders
skipFooter(Border[] borders)
protected abstract TableBorders
skipHeader(Border[] borders)
protected abstract TableBorders
updateBordersOnNewPage(boolean isOriginalNonSplitRenderer, boolean isFooterOrHeader, TableRenderer currentRenderer, TableRenderer headerRenderer, TableRenderer footerRenderer)
private void
updateRowspanForNextNonEmptyCellInEachColumn(int numOfRowsToRemove, int row)
-
-
-
Field Detail
-
horizontalBorders
protected java.util.List<java.util.List<Border>> horizontalBorders
Horizontal borders of the table. It consists of a list, each item of which represents a horizontal border of a row, each of them is a list of borders of the cells. The amount of the lists is the number of rows + 1, the size of each of these lists corresponds to the number of columns.
-
verticalBorders
protected java.util.List<java.util.List<Border>> verticalBorders
Vertical borders of the table. It consists of a list, each item of which represents a vertical border of a row, each of them is a list of borders of the cells. The amount of the lists is the number of columns + 1, the size of each of these lists corresponds to the number of rows.
-
numberOfColumns
protected final int numberOfColumns
The number of the table's columns.
-
tableBoundingBorders
protected Border[] tableBoundingBorders
The outer borders of the table (as body).
-
rows
protected java.util.List<CellRenderer[]> rows
All the cells of the table. Each item of the list represents a row and consists of its cells.
-
startRow
protected int startRow
The first row, which should be processed on this area. The value of this field varies from area to area. It's zero-based and inclusive.
-
finishRow
protected int finishRow
The last row, which should be processed on this area. The value of this field varies from area to area. It's zero-based and inclusive. The last border will have index (finishRow+1) because the number of borders is greater by one than the number of rows
-
leftBorderMaxWidth
protected float leftBorderMaxWidth
The width of the widest left border.
-
rightBorderMaxWidth
protected float rightBorderMaxWidth
The width of the widest right border.
-
largeTableIndexOffset
protected int largeTableIndexOffset
The number of rows flushed to the table. Its value is zero for regular tables. The field makes sense only for large tables.
-
-
Constructor Detail
-
TableBorders
public TableBorders(java.util.List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders)
-
TableBorders
public TableBorders(java.util.List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders, int largeTableIndexOffset)
-
-
Method Detail
-
drawHorizontalBorder
protected abstract TableBorders drawHorizontalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor)
-
drawVerticalBorder
protected abstract TableBorders drawVerticalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor)
-
applyTopTableBorder
protected abstract TableBorders applyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse)
-
applyTopTableBorder
protected abstract TableBorders applyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse)
-
applyBottomTableBorder
protected abstract TableBorders applyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse)
-
applyBottomTableBorder
protected abstract TableBorders applyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse)
-
applyLeftAndRightTableBorder
protected abstract TableBorders applyLeftAndRightTableBorder(Rectangle layoutBox, boolean reverse)
-
skipFooter
protected abstract TableBorders skipFooter(Border[] borders)
-
skipHeader
protected abstract TableBorders skipHeader(Border[] borders)
-
collapseTableWithFooter
protected abstract TableBorders collapseTableWithFooter(TableBorders footerBordersHandler, boolean hasContent)
-
collapseTableWithHeader
protected abstract TableBorders collapseTableWithHeader(TableBorders headerBordersHandler, boolean updateBordersHandler)
-
fixHeaderOccupiedArea
protected abstract TableBorders fixHeaderOccupiedArea(Rectangle occupiedBox, Rectangle layoutBox)
-
applyCellIndents
protected abstract TableBorders applyCellIndents(Rectangle box, float topIndent, float rightIndent, float bottomIndent, float leftIndent, boolean reverse)
-
getVerticalBorder
public abstract java.util.List<Border> getVerticalBorder(int index)
-
getHorizontalBorder
public abstract java.util.List<Border> getHorizontalBorder(int index)
-
getCellVerticalAddition
protected abstract float getCellVerticalAddition(float[] indents)
-
buildBordersArrays
@Deprecated protected abstract void buildBordersArrays(CellRenderer cell, int row, int col, int[] rowspansToDeduct)
Deprecated.Remove rowspansToDeduct parameter which is not used anymore.
-
updateBordersOnNewPage
protected abstract TableBorders updateBordersOnNewPage(boolean isOriginalNonSplitRenderer, boolean isFooterOrHeader, TableRenderer currentRenderer, TableRenderer headerRenderer, TableRenderer footerRenderer)
-
processAllBordersAndEmptyRows
protected TableBorders processAllBordersAndEmptyRows()
-
initializeBorders
protected TableBorders initializeBorders()
-
setTableBoundingBorders
protected TableBorders setTableBoundingBorders(Border[] borders)
-
setRowRange
protected TableBorders setRowRange(int startRow, int finishRow)
-
setStartRow
protected TableBorders setStartRow(int row)
-
setFinishRow
protected TableBorders setFinishRow(int row)
-
getLeftBorderMaxWidth
public float getLeftBorderMaxWidth()
-
getRightBorderMaxWidth
public float getRightBorderMaxWidth()
-
getMaxTopWidth
public float getMaxTopWidth()
-
getMaxBottomWidth
public float getMaxBottomWidth()
-
getMaxRightWidth
public float getMaxRightWidth()
-
getMaxLeftWidth
public float getMaxLeftWidth()
-
getWidestVerticalBorder
public Border getWidestVerticalBorder(int col)
-
getWidestVerticalBorder
public Border getWidestVerticalBorder(int col, int start, int end)
-
getWidestHorizontalBorder
public Border getWidestHorizontalBorder(int row)
-
getWidestHorizontalBorder
public Border getWidestHorizontalBorder(int row, int start, int end)
-
getFirstHorizontalBorder
public java.util.List<Border> getFirstHorizontalBorder()
-
getLastHorizontalBorder
public java.util.List<Border> getLastHorizontalBorder()
-
getFirstVerticalBorder
public java.util.List<Border> getFirstVerticalBorder()
-
getLastVerticalBorder
public java.util.List<Border> getLastVerticalBorder()
-
getNumberOfColumns
public int getNumberOfColumns()
-
getStartRow
public int getStartRow()
-
getFinishRow
public int getFinishRow()
-
getTableBoundingBorders
public Border[] getTableBoundingBorders()
-
getCellBorderIndents
public float[] getCellBorderIndents(int row, int col, int rowspan, int colspan)
-
removeRows
private void removeRows(int startRow, int numOfRows)
-
updateRowspanForNextNonEmptyCellInEachColumn
private void updateRowspanForNextNonEmptyCellInEachColumn(int numOfRowsToRemove, int row)
-
-