Package org.apache.fop.fo.flow.table
Class CollapsingBorderResolver.Resolver
- java.lang.Object
-
- org.apache.fop.fo.flow.table.CollapsingBorderResolver.Resolver
-
- Direct Known Subclasses:
CollapsingBorderResolver.ResolverInBody
,CollapsingBorderResolver.ResolverInFooter
,CollapsingBorderResolver.ResolverInHeader
- Enclosing class:
- CollapsingBorderResolver
private abstract class CollapsingBorderResolver.Resolver extends java.lang.Object
Base class for delegate resolvers. Implementation of the State design pattern: the treatment differs slightly whether we are in the table's header, footer or body. To avoid complicated if statements, specialised delegate resolvers will be used instead.
-
-
Field Summary
Fields Modifier and Type Field Description private BorderSpecification
borderEndTableAndBody
private BorderSpecification
borderStartTableAndBody
protected boolean
firstInPart
protected TablePart
tablePart
-
Constructor Summary
Constructors Modifier Constructor Description private
Resolver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) void
endPart()
(package private) void
endRow(java.util.List<GridUnit> row, TableCellContainer container)
Resolves the applicable borders for the given row.(package private) abstract void
endTable()
(package private) void
integrateLeadingBorders(java.util.List<GridUnit> row)
Integrates either border-before specified on the table and its columns if the table has no header, or border-after specified on the cells of the header's last row.(package private) void
integrateTrailingBorders(java.util.List<GridUnit> row)
Integrates either border-after specified on the table and its columns if the table has no footer, or border-before specified on the cells of the footer's first row.(package private) void
resolveBordersBetweenRows(java.util.List<GridUnit> rowBefore, java.util.List<GridUnit> rowAfter)
Resolves border-after for the first row, border-before for the second one.(package private) void
resolveBordersFirstRowInTable(java.util.List<GridUnit> row, boolean withNormal, boolean withLeadingTrailing, boolean withRest)
Integrates border-before specified on the table and its column.(package private) void
resolveBordersLastRowInPart(java.util.List<GridUnit> row, boolean withNormal, boolean withLeadingTrailing, boolean withRest)
Integrates the border-after of the part.(package private) void
resolveBordersLastRowInTable(java.util.List<GridUnit> row, boolean withNormal, boolean withLeadingTrailing, boolean withRest)
Integrates border-after specified on the table and its columns.(package private) void
startPart(TablePart part)
-
-
-
Field Detail
-
tablePart
protected TablePart tablePart
-
firstInPart
protected boolean firstInPart
-
borderStartTableAndBody
private BorderSpecification borderStartTableAndBody
-
borderEndTableAndBody
private BorderSpecification borderEndTableAndBody
-
-
Method Detail
-
resolveBordersFirstRowInTable
void resolveBordersFirstRowInTable(java.util.List<GridUnit> row, boolean withNormal, boolean withLeadingTrailing, boolean withRest)
Integrates border-before specified on the table and its column.- Parameters:
row
- the first row of the table (in the header, or in the body if the table has no header)withNormal
-withLeadingTrailing
-withRest
-
-
resolveBordersBetweenRows
void resolveBordersBetweenRows(java.util.List<GridUnit> rowBefore, java.util.List<GridUnit> rowAfter)
Resolves border-after for the first row, border-before for the second one.- Parameters:
rowBefore
-rowAfter
-
-
resolveBordersLastRowInPart
void resolveBordersLastRowInPart(java.util.List<GridUnit> row, boolean withNormal, boolean withLeadingTrailing, boolean withRest)
Integrates the border-after of the part.
-
resolveBordersLastRowInTable
void resolveBordersLastRowInTable(java.util.List<GridUnit> row, boolean withNormal, boolean withLeadingTrailing, boolean withRest)
Integrates border-after specified on the table and its columns.- Parameters:
row
- the last row of the footer, or of the last body if the table has no footerwithNormal
-withLeadingTrailing
-withRest
-
-
integrateLeadingBorders
void integrateLeadingBorders(java.util.List<GridUnit> row)
Integrates either border-before specified on the table and its columns if the table has no header, or border-after specified on the cells of the header's last row. For the case the grid unit are at the top of a page.- Parameters:
row
-
-
integrateTrailingBorders
void integrateTrailingBorders(java.util.List<GridUnit> row)
Integrates either border-after specified on the table and its columns if the table has no footer, or border-before specified on the cells of the footer's first row. For the case the grid unit are at the bottom of a page.- Parameters:
row
-
-
startPart
void startPart(TablePart part)
-
endRow
void endRow(java.util.List<GridUnit> row, TableCellContainer container)
Resolves the applicable borders for the given row.- Integrates the border-before/after of the containing table-row if any;
- Integrates the border-before of the containing part, if first row;
- Resolves border-start/end between grid units.
- Parameters:
row
- the row being finishedcontainer
- the containing element
-
endPart
void endPart()
-
endTable
abstract void endTable()
-
-