Interface TableShape<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>

All Superinterfaces:
PlaceableShape<S,P>, Shape<S,P>
All Known Implementing Classes:
HSLFTable, XSLFTable

public interface TableShape<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> extends Shape<S,P>, PlaceableShape<S,P>
  • Method Details

    • getNumberOfColumns

      int getNumberOfColumns()
      Return the maximum number of columns. If the table contains merged cells, the number of columns might be less than the maximum.
      Returns:
      the maximum number of column
    • getNumberOfRows

      int getNumberOfRows()
      Return the number of rows
      Returns:
      the row count
    • getCell

      TableCell<S,P> getCell(int row, int col)
      Gets a cell
      Parameters:
      row - the row index (0-based)
      col - the column index (0-based)
      Returns:
      the cell or null if the cell doesn't exists, e.g. when accessing a merged cell or if the index is out of bounds
    • getColumnWidth

      double getColumnWidth(int idx)
      Gets the width (in points) of the n-th column
      Parameters:
      idx - the column index (0-based)
      Returns:
      the width (in points)
    • setColumnWidth

      void setColumnWidth(int idx, double width)
      Sets the width (in points) of the n-th column
      Parameters:
      idx - the column index (0-based)
      width - the width (in points)
    • getRowHeight

      double getRowHeight(int row)
      Gets the row height
      Parameters:
      row - the row index (0-based)
      Returns:
      the height (in points)
    • setRowHeight

      void setRowHeight(int row, double height)
      Sets the row height.
      Parameters:
      row - the row index (0-based)
      height - the height to set (in points)