Class FixedColRowGroupBuilder
java.lang.Object
org.apache.fop.fo.flow.table.RowGroupBuilder
org.apache.fop.fo.flow.table.FixedColRowGroupBuilder
A row group builder optimised for a fixed number of columns, known before the parsing
of cells starts (that is, if the fo:table has explicit fo:table-column children).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BorderResolverprivate int0-based, index in the row group.private TableRowprivate booleanprivate ListThe last encountered row.private intNumber of columns in the corresponding table.The rows belonging to this row group.Fields inherited from class RowGroupBuilder
table -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddTableCell(TableCell cell) Adds a table-cell to the current row-group, creatingGridUnits accordingly.(package private) voidReceives notification of the end of the current row, when the source contains no fo:table-row element.(package private) voidendTable()Receives notification of the end of the table.(package private) voidReceives notification of the end of a table-header/footer/body.(package private) voidReceives notification of the end of the current row.private voidhandleRowEnd(TableCellContainer container) private voidPrepares this builder for creating a new row group.private static voidsetFlagForCols(int flag, List row) (package private) voidstartTablePart(TablePart part) Receives notification of the start of a table-header/footer/body.(package private) voidstartTableRow(TableRow tableRow) Receives notification of the start of an fo:table-row element.
-
Field Details
-
numberOfColumns
private int numberOfColumnsNumber of columns in the corresponding table. -
currentTableRow
-
currentRowIndex
private int currentRowIndex0-based, index in the row group. -
rows
-
firstInPart
private boolean firstInPart -
lastRow
The last encountered row. This is the last row of the table if it has no footer. -
borderResolver
-
-
Constructor Details
-
FixedColRowGroupBuilder
FixedColRowGroupBuilder(Table t)
-
-
Method Details
-
initialize
private void initialize()Prepares this builder for creating a new row group. -
addTableCell
Adds a table-cell to the current row-group, creatingGridUnits accordingly.- Specified by:
addTableCellin classRowGroupBuilder- Parameters:
cell- the cell to add
-
setFlagForCols
-
startTableRow
Receives notification of the start of an fo:table-row element.- Specified by:
startTableRowin classRowGroupBuilder- Parameters:
tableRow- the row being started
-
endTableRow
void endTableRow()Receives notification of the end of the current row. If the current row finishes the row group, theTablePart.addRowGroup(List)method of the parent table part will be called.- Specified by:
endTableRowin classRowGroupBuilder
-
endRow
Receives notification of the end of the current row, when the source contains no fo:table-row element. If the current row finishes the row group, theTablePart.addRowGroup(List)method of the given table part will be called.If the source does contain explicit fo:table-row elements, then the
RowGroupBuilder.endTableRow()method will be called instead.- Specified by:
endRowin classRowGroupBuilder- Parameters:
part- the part containing the current row
-
handleRowEnd
-
startTablePart
Receives notification of the start of a table-header/footer/body.- Specified by:
startTablePartin classRowGroupBuilder- Parameters:
part- the part being started
-
endTablePart
Receives notification of the end of a table-header/footer/body. The current row-group is checked for emptiness. This row group builder is reset for handling further possible table parts.- Specified by:
endTablePartin classRowGroupBuilder- Throws:
ValidationException- if a row-spanning cell overflows the given table part
-
endTable
void endTable()Receives notification of the end of the table.- Specified by:
endTablein classRowGroupBuilder
-