Package org.apache.fop.fo.flow.table
Class FixedColRowGroupBuilder
- java.lang.Object
-
- org.apache.fop.fo.flow.table.RowGroupBuilder
-
- org.apache.fop.fo.flow.table.FixedColRowGroupBuilder
-
class FixedColRowGroupBuilder extends RowGroupBuilder
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
Fields Modifier and Type Field Description private BorderResolverborderResolverprivate intcurrentRowIndex0-based, index in the row group.private TableRowcurrentTableRowprivate booleanfirstInPartprivate java.util.ListlastRowThe last encountered row.private intnumberOfColumnsNumber of columns in the corresponding table.private java.util.List<java.util.List<GridUnit>>rowsThe rows belonging to this row group.-
Fields inherited from class org.apache.fop.fo.flow.table.RowGroupBuilder
table
-
-
Constructor Summary
Constructors Constructor Description FixedColRowGroupBuilder(Table t)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddTableCell(TableCell cell)Adds a table-cell to the current row-group, creatingGridUnits accordingly.(package private) voidendRow(TablePart part)Receives 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) voidendTablePart()Receives notification of the end of a table-header/footer/body.(package private) voidendTableRow()Receives notification of the end of the current row.private voidhandleRowEnd(TableCellContainer container)private voidinitialize()Prepares this builder for creating a new row group.private static voidsetFlagForCols(int flag, java.util.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 Detail
-
numberOfColumns
private int numberOfColumns
Number of columns in the corresponding table.
-
currentTableRow
private TableRow currentTableRow
-
currentRowIndex
private int currentRowIndex
0-based, index in the row group.
-
rows
private java.util.List<java.util.List<GridUnit>> rows
The rows belonging to this row group. List of List ofGridUnits.
-
firstInPart
private boolean firstInPart
-
lastRow
private java.util.List lastRow
The last encountered row. This is the last row of the table if it has no footer.
-
borderResolver
private BorderResolver borderResolver
-
-
Constructor Detail
-
FixedColRowGroupBuilder
FixedColRowGroupBuilder(Table t)
-
-
Method Detail
-
initialize
private void initialize()
Prepares this builder for creating a new row group.
-
addTableCell
void addTableCell(TableCell cell)
Adds a table-cell to the current row-group, creatingGridUnits accordingly.- Specified by:
addTableCellin classRowGroupBuilder- Parameters:
cell- the cell to add
-
setFlagForCols
private static void setFlagForCols(int flag, java.util.List row)
-
startTableRow
void startTableRow(TableRow tableRow)
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
void endRow(TablePart part)
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
private void handleRowEnd(TableCellContainer container)
-
startTablePart
void startTablePart(TablePart part)
Receives notification of the start of a table-header/footer/body.- Specified by:
startTablePartin classRowGroupBuilder- Parameters:
part- the part being started
-
endTablePart
void endTablePart() throws ValidationExceptionReceives 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
-
-