public interface Table
Table is the persistence object of DomTableEditorValue.
Since:
4.0.17
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addColumn(int index)
    Adds a new column at the specified index.
    void
    addRow(int index)
    Adds a new row at the specified index.
    void
    deleteColumn(int column)
    Deletes the column with the specified index
    void
    deleteRow(int row)
    Deletes the row with the specified index
    diff(Element other)
    Compute a difference between this element and the given one.
    @Nullable TableCell
    getCell(int row, int column)
    Gets the cell of this table with the given row & col index or null if no cell exists with these indices.
    int
    Returns the numer of existing columns in this table
    Returns the element node of this table.
    int
    Returns the number of existing rows in this table.
    boolean
    Indicates whether this table is empty or not.
    void
    replace(Table from)
    Replaces this table with the given table.
  • Method Details

    • getRows

      @ApiDoc(comment="Returns the number of existing rows in this table.", since="4.0.17") int getRows()
      Returns the number of existing rows in this table.
      Since:
      4.0.17
    • getColumns

      @ApiDoc(comment="Returns the numer of existing columns in this table", since="4.0.17") int getColumns()
      Returns the numer of existing columns in this table
      Since:
      4.0.17
    • addRow

      @ApiDoc(comment="Adds a new row at the specified index.", since="4.0.17") void addRow(int index)
      Adds a new row at the specified index. Use addRow(0 to add a new row at the beginning (will become first row). Use getRows() as param to add a new row at the end of this table.
      Parameters:
      index - the index at which the new row should be added
      Since:
      4.0.17
    • deleteRow

      @ApiDoc(comment="Deletes the row with the specified index", since="4.0.17") void deleteRow(int row)
      Deletes the row with the specified index
      Parameters:
      row - the index of the row to be deleted
      Since:
      4.0.17
    • addColumn

      @ApiDoc(comment="Adds a new column at the specified index.", since="4.0.17") void addColumn(int index)
      Adds a new column at the specified index. Use addColumn(0 to add a new column at the beginning (will become first column). Use getColumns() as param to add a new column at the end (will become last column).
      Parameters:
      index - the index at which the new column should be added
      Since:
      4.0.17
    • deleteColumn

      @ApiDoc(comment="Deletes the column with the specified index", since="4.0.17") void deleteColumn(int column)
      Deletes the column with the specified index
      Parameters:
      column - the index of the colum to be deleted
      Since:
      4.0.17
    • getCell

      @ApiDoc(comment="Gets the cell of this table with the given row & col index or null if no cell exists with these indices.", since="4.0.17") @Nullable @Nullable TableCell getCell(int row, int column)
      Gets the cell of this table with the given row & col index or null if no cell exists with these indices.
      Parameters:
      row - the row index
      column - the col index
      Returns:
      TableCell or null if no cell exists for given indices
      Since:
      4.0.17
    • getDom

      @ApiDoc(comment="Returns the element node of this table.", since="4.0.17") Element getDom()
      Returns the element node of this table.
      Since:
      4.0.17
    • isEmpty

      @ApiDoc(comment="Indicates whether this table is empty or not.", since="4.0.17") boolean isEmpty()
      Indicates whether this table is empty or not.
      Returns:
      true if this table is empty, false otherwise
      Since:
      4.0.17
    • replace

      @ApiDoc(comment="Replaces this table with the given table.", since="4.0.36") void replace(Table from)
      Replaces this table with the given table.
      Parameters:
      from - the table to replace this table with
      Since:
      4.0.36
    • diff

      @ApiDoc(comment="Compute a difference between this element and the given one.", since="4.0.59") Element diff(Element other)
      Compute a difference between this element and the given one.
      Parameters:
      other - The element to compare to.
      Returns:
      The difference element or null, if equal.
      Since:
      4.0.59