Class 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 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 of GridUnits.
      • 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.
    • Constructor Detail

      • FixedColRowGroupBuilder

        FixedColRowGroupBuilder​(Table t)
    • Method Detail

      • initialize

        private void initialize()
        Prepares this builder for creating a new row group.
      • 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:
        startTableRow in class RowGroupBuilder
        Parameters:
        tableRow - the row being started
      • 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, the TablePart.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:
        endRow in class RowGroupBuilder
        Parameters:
        part - the part containing the current row
      • startTablePart

        void startTablePart​(TablePart part)
        Receives notification of the start of a table-header/footer/body.
        Specified by:
        startTablePart in class RowGroupBuilder
        Parameters:
        part - the part being started
      • endTablePart

        void endTablePart()
                   throws ValidationException
        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:
        endTablePart in class RowGroupBuilder
        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:
        endTable in class RowGroupBuilder