Class TableBorders
java.lang.Object
com.itextpdf.layout.renderer.TableBorders
- Direct Known Subclasses:
CollapsedTableBorders, SeparatedTableBorders
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe last row, which should be processed on this area.Horizontal borders of the table.protected intThe number of rows flushed to the table.protected floatThe width of the widest left border.protected final intThe number of the table's columns.protected floatThe width of the widest right border.protected List<CellRenderer[]> All the cells of the table.protected intThe first row, which should be processed on this area.protected Border[]The outer borders of the table (as body).Vertical borders of the table. -
Constructor Summary
ConstructorsConstructorDescriptionTableBorders(List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders) TableBorders(List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders, int largeTableIndexOffset) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TableBordersapplyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse) protected abstract TableBordersapplyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse) protected abstract TableBordersapplyCellIndents(Rectangle box, float topIndent, float rightIndent, float bottomIndent, float leftIndent, boolean reverse) protected abstract TableBordersapplyLeftAndRightTableBorder(Rectangle layoutBox, boolean reverse) protected abstract TableBordersapplyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse) protected abstract TableBordersapplyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse) protected abstract voidbuildBordersArrays(CellRenderer cell, int row, int col) protected abstract TableBorderscollapseTableWithFooter(TableBorders footerBordersHandler, boolean hasContent) protected abstract TableBorderscollapseTableWithHeader(TableBorders headerBordersHandler, boolean updateBordersHandler) protected abstract TableBordersdrawHorizontalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor) protected abstract TableBordersdrawVerticalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor) protected abstract TableBordersfixHeaderOccupiedArea(Rectangle occupiedBox, Rectangle layoutBox) float[]getCellBorderIndents(int row, int col, int rowspan, int colspan) protected abstract floatgetCellVerticalAddition(float[] indents) intgetHorizontalBorder(int index) floatfloatfloatfloatfloatintfloatintBorder[]getVerticalBorder(int index) getWidestHorizontalBorder(int row) getWidestHorizontalBorder(int row, int start, int end) getWidestVerticalBorder(int col) getWidestVerticalBorder(int col, int start, int end) protected TableBordersprotected TableBordersprivate voidremoveRows(int startRow, int numOfRows) protected TableBorderssetFinishRow(int row) protected TableBorderssetRowRange(int startRow, int finishRow) protected TableBorderssetStartRow(int row) protected TableBorderssetTableBoundingBorders(Border[] borders) protected abstract TableBordersskipFooter(Border[] borders) protected abstract TableBordersskipHeader(Border[] borders) protected abstract TableBordersupdateBordersOnNewPage(boolean isOriginalNonSplitRenderer, boolean isFooterOrHeader, TableRenderer currentRenderer, TableRenderer headerRenderer, TableRenderer footerRenderer) private voidupdateRowspanForNextNonEmptyCellInEachColumn(int numOfRowsToRemove, int row)
-
Field Details
-
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
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 numberOfColumnsThe number of the table's columns. -
tableBoundingBorders
The outer borders of the table (as body). -
rows
All the cells of the table. Each item of the list represents a row and consists of its cells. -
startRow
protected int startRowThe 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 finishRowThe 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 leftBorderMaxWidthThe width of the widest left border. -
rightBorderMaxWidth
protected float rightBorderMaxWidthThe width of the widest right border. -
largeTableIndexOffset
protected int largeTableIndexOffsetThe number of rows flushed to the table. Its value is zero for regular tables. The field makes sense only for large tables.
-
-
Constructor Details
-
TableBorders
-
TableBorders
public TableBorders(List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders, int largeTableIndexOffset)
-
-
Method Details
-
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
-
skipHeader
-
collapseTableWithHeader
protected abstract TableBorders collapseTableWithHeader(TableBorders headerBordersHandler, boolean updateBordersHandler) -
fixHeaderOccupiedArea
-
applyCellIndents
protected abstract TableBorders applyCellIndents(Rectangle box, float topIndent, float rightIndent, float bottomIndent, float leftIndent, boolean reverse) -
getVerticalBorder
-
getHorizontalBorder
-
getCellVerticalAddition
protected abstract float getCellVerticalAddition(float[] indents) -
buildBordersArrays
-
updateBordersOnNewPage
protected abstract TableBorders updateBordersOnNewPage(boolean isOriginalNonSplitRenderer, boolean isFooterOrHeader, TableRenderer currentRenderer, TableRenderer headerRenderer, TableRenderer footerRenderer) -
processAllBordersAndEmptyRows
-
initializeBorders
-
setTableBoundingBorders
-
setRowRange
-
setStartRow
-
setFinishRow
-
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
-
getWidestVerticalBorder
-
getWidestHorizontalBorder
-
getWidestHorizontalBorder
-
getFirstHorizontalBorder
-
getLastHorizontalBorder
-
getFirstVerticalBorder
-
getLastVerticalBorder
-
getNumberOfColumns
public int getNumberOfColumns() -
getStartRow
public int getStartRow() -
getFinishRow
public int getFinishRow() -
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)
-