Class FlexTable

    • Constructor Detail

      • FlexTable

        public FlexTable()
    • Method Detail

      • addCell

        public void addCell​(int row)
        Appends a cell to the specified row.
        Parameters:
        row - the row to which the new cell will be added
        Throws:
        java.lang.IndexOutOfBoundsException
      • getCellCount

        public int getCellCount​(int row)
        Gets the number of cells on a given row.
        Specified by:
        getCellCount in class HTMLTable
        Parameters:
        row - the row whose cells are to be counted
        Returns:
        the number of cells present
        Throws:
        java.lang.IndexOutOfBoundsException
      • getRowCount

        public int getRowCount()
        Gets the number of rows.
        Specified by:
        getRowCount in class HTMLTable
        Returns:
        number of rows
      • insertCell

        public void insertCell​(int beforeRow,
                               int beforeColumn)
        Inserts a cell into the FlexTable.
        Overrides:
        insertCell in class HTMLTable
        Parameters:
        beforeRow - the cell's row
        beforeColumn - the cell's column
      • insertRow

        public int insertRow​(int beforeRow)
        Inserts a row into the FlexTable.
        Overrides:
        insertRow in class HTMLTable
        Parameters:
        beforeRow - the row to insert
        Returns:
        the index of the newly-created row
      • removeAllRows

        public void removeAllRows()
        Remove all rows in this table.
      • removeCell

        public void removeCell​(int row,
                               int col)
        Description copied from class: HTMLTable
        Removes the specified cell from the table.
        Overrides:
        removeCell in class HTMLTable
        Parameters:
        row - the row of the cell to remove
        col - the column of cell to remove
      • removeCells

        public void removeCells​(int row,
                                int column,
                                int num)
        Removes a number of cells from a row in the table.
        Parameters:
        row - the row of the cells to be removed
        column - the column of the first cell to be removed
        num - the number of cells to be removed
        Throws:
        java.lang.IndexOutOfBoundsException
      • removeRow

        public void removeRow​(int row)
        Description copied from class: HTMLTable
        Removes the specified row from the table.
        Overrides:
        removeRow in class HTMLTable
        Parameters:
        row - the index of the row to be removed
      • prepareCell

        protected void prepareCell​(int row,
                                   int column)
        Ensure that the cell exists.
        Specified by:
        prepareCell in class HTMLTable
        Parameters:
        row - the row to prepare.
        column - the column to prepare.
        Throws:
        java.lang.IndexOutOfBoundsException - if the row is negative
      • prepareRow

        protected void prepareRow​(int row)
        Ensure that the row exists.
        Specified by:
        prepareRow in class HTMLTable
        Parameters:
        row - The row to prepare.
        Throws:
        java.lang.IndexOutOfBoundsException - if the row is negative