Class CollapsedTableBorders
java.lang.Object
com.itextpdf.layout.renderer.TableBorders
com.itextpdf.layout.renderer.CollapsedTableBorders
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classA comparison function to compare twoBorderinstances. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Comparator<Border> Horizontal borders to be collapsed with the last-on-the-area row's cell bottom borders of this TableRenderer instance.Horizontal borders to be collapsed with the first-on-the-area row's cell top borders of this TableRenderer instance.Vertical borders to be collapsed with the last-on-the-area row's cell bottom borders of this TableRenderer instance.Fields inherited from class TableBorders
finishRow, horizontalBorders, largeTableIndexOffset, leftBorderMaxWidth, numberOfColumns, rightBorderMaxWidth, rows, startRow, tableBoundingBorders, verticalBorders -
Constructor Summary
ConstructorsConstructorDescriptionCollapsedTableBorders(List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders) CollapsedTableBorders(List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders, int largeTableIndexOffset) -
Method Summary
Modifier and TypeMethodDescriptionprotected TableBordersapplyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse) protected TableBordersapplyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse) protected TableBordersapplyCellIndents(Rectangle box, float topIndent, float rightIndent, float bottomIndent, float leftIndent, boolean reverse) protected TableBordersapplyLeftAndRightTableBorder(Rectangle layoutBox, boolean reverse) protected TableBordersapplyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse) protected TableBordersapplyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse) protected voidbuildBordersArrays(CellRenderer cell, int row) protected voidbuildBordersArrays(CellRenderer cell, int row, int col) protected booleancheckAndReplaceBorderInArray(List<List<Border>> borderArray, int i, int j, Border borderToAdd, boolean hasPriority) protected TableBorderscollapseTableWithFooter(TableBorders footerBordersHandler, boolean hasContent) protected TableBorderscollapseTableWithHeader(TableBorders headerBordersHandler, boolean updateBordersHandler) protected TableBordersdrawHorizontalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor) protected TableBordersdrawVerticalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor) protected TableBordersfixHeaderOccupiedArea(Rectangle occupiedBox, Rectangle layoutBox) float[]getCellBorderIndents(int row, int col, int rowspan, int colspan) protected floatgetCellVerticalAddition(float[] indents) static BordergetCollapsedBorder(Border cellBorder, Border tableBorder) Returns the collapsed border.getCollapsedList(List<Border> innerList, List<Border> outerList) getCrossingBorders(int horizontalIndex, int verticalIndex) Returns theBorderinstances, which intersect in the specified point.getHorizontalBorder(int index) getVerticalBorder(int index) Gets vertical borders which cross the top horizontal border.private floatgetWidestBorderWidth(Border... borders) Gets the width of the widest border in the specified list.private static booleanisBorderWider(Border thisBorder, Border otherBorder) Compares borders and defines whether this border is wider than the other.private static booleanisBorderWider(Border thisBorder, Border otherBorder, boolean strict) Compares borders and defines whether this border is wider than the other.setBottomBorderCollapseWith(List<Border> bottomBorderCollapseWith, List<Border> verticalBordersCrossingBottomBorder) setTopBorderCollapseWith(List<Border> topBorderCollapseWith) protected TableBordersskipFooter(Border[] borders) protected TableBordersskipHeader(Border[] borders) protected TableBordersupdateBordersOnNewPage(boolean isOriginalNonSplitRenderer, boolean isFooterOrHeader, TableRenderer currentRenderer, TableRenderer headerRenderer, TableRenderer footerRenderer) Methods inherited from class TableBorders
getFinishRow, getFirstHorizontalBorder, getFirstVerticalBorder, getLastHorizontalBorder, getLastVerticalBorder, getLeftBorderMaxWidth, getMaxBottomWidth, getMaxLeftWidth, getMaxRightWidth, getMaxTopWidth, getNumberOfColumns, getRightBorderMaxWidth, getStartRow, getTableBoundingBorders, getWidestHorizontalBorder, getWidestHorizontalBorder, getWidestVerticalBorder, getWidestVerticalBorder, initializeBorders, processAllBordersAndEmptyRows, setFinishRow, setRowRange, setStartRow, setTableBoundingBorders
-
Field Details
-
topBorderCollapseWith
-
bottomBorderCollapseWith
-
verticalBottomBorderCollapseWith
-
borderComparator
-
verticalBorderComputationResult
-
-
Constructor Details
-
CollapsedTableBorders
public CollapsedTableBorders(List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders) -
CollapsedTableBorders
public CollapsedTableBorders(List<CellRenderer[]> rows, int numberOfColumns, Border[] tableBoundingBorders, int largeTableIndexOffset)
-
-
Method Details
-
getTopBorderCollapseWith
-
getBottomBorderCollapseWith
-
getCellBorderIndents
public float[] getCellBorderIndents(int row, int col, int rowspan, int colspan) - Overrides:
getCellBorderIndentsin classTableBorders
-
getVerticalBordersCrossingTopHorizontalBorder
-
getVerticalBorder
- Specified by:
getVerticalBorderin classTableBorders
-
getHorizontalBorder
- Specified by:
getHorizontalBorderin classTableBorders
-
setTopBorderCollapseWith
-
setBottomBorderCollapseWith
public CollapsedTableBorders setBottomBorderCollapseWith(List<Border> bottomBorderCollapseWith, List<Border> verticalBordersCrossingBottomBorder) -
buildBordersArrays
- Specified by:
buildBordersArraysin classTableBorders
-
buildBordersArrays
-
checkAndReplaceBorderInArray
-
drawHorizontalBorder
protected TableBorders drawHorizontalBorder(PdfCanvas canvas, TableBorderDescriptor borderDescriptor) - Specified by:
drawHorizontalBorderin classTableBorders
-
drawVerticalBorder
- Specified by:
drawVerticalBorderin classTableBorders
-
getCollapsedBorder
-
getCollapsedList
-
applyLeftAndRightTableBorder
- Specified by:
applyLeftAndRightTableBorderin classTableBorders
-
applyTopTableBorder
protected TableBorders applyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse) - Specified by:
applyTopTableBorderin classTableBorders
-
applyBottomTableBorder
protected TableBorders applyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean isEmpty, boolean force, boolean reverse) - Specified by:
applyBottomTableBorderin classTableBorders
-
applyTopTableBorder
protected TableBorders applyTopTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse) - Specified by:
applyTopTableBorderin classTableBorders
-
applyBottomTableBorder
protected TableBorders applyBottomTableBorder(Rectangle occupiedBox, Rectangle layoutBox, boolean reverse) - Specified by:
applyBottomTableBorderin classTableBorders
-
applyCellIndents
protected TableBorders applyCellIndents(Rectangle box, float topIndent, float rightIndent, float bottomIndent, float leftIndent, boolean reverse) - Specified by:
applyCellIndentsin classTableBorders
-
getCellVerticalAddition
protected float getCellVerticalAddition(float[] indents) - Specified by:
getCellVerticalAdditionin classTableBorders
-
updateBordersOnNewPage
protected TableBorders updateBordersOnNewPage(boolean isOriginalNonSplitRenderer, boolean isFooterOrHeader, TableRenderer currentRenderer, TableRenderer headerRenderer, TableRenderer footerRenderer) - Specified by:
updateBordersOnNewPagein classTableBorders
-
skipHeader
- Specified by:
skipHeaderin classTableBorders
-
collapseTableWithHeader
protected TableBorders collapseTableWithHeader(TableBorders headerBordersHandler, boolean updateBordersHandler) - Specified by:
collapseTableWithHeaderin classTableBorders
-
fixHeaderOccupiedArea
- Specified by:
fixHeaderOccupiedAreain classTableBorders
-
getCrossingBorders
Returns theBorderinstances, which intersect in the specified point.The order of the borders: first the left one, then the top, the right and the bottom ones.
- Parameters:
horizontalIndex- index of horizontal borderverticalIndex- index of vertical border- Returns:
- a list of
Borderinstances, which intersect in the specified point
-
getWidestBorderWidth
Gets the width of the widest border in the specified list.- Parameters:
borders- the borders which widths should be considered- Returns:
- the width of the widest border in the specified list
-
isBorderWider
Compares borders and defines whether this border is wider than the other.Note that by default the comparison will be strict, e.g. if this border is of the same width as the other border, then false will be returned.
- Parameters:
thisBorder- this borderotherBorder- the other border to be compared with- Returns:
- whether this border is wider than the other
-
isBorderWider
Compares borders and defines whether this border is wider than the other.- Parameters:
thisBorder- this borderotherBorder- the other border to be compared withstrict- if true, then in case this border is of the same width as the other border, true will be returned. If false, it will be checked whether the width of this border is strictly greater than the other border's width- Returns:
- whether this border is wider than the other
-