Class NativeTableFooter

All Implemented Interfaces:
AttachNotifier, ClickNotifier<NativeTableFooter>, DetachNotifier, HasComponents, HasElement, HasEnabled, HasOrderedComponents, HasSize, HasStyle, HasText, Serializable

@Tag("tfoot") public class NativeTableFooter extends HtmlContainer implements ClickNotifier<NativeTableFooter>
Component representing a <tfoot> element.
Since:
24.4
See Also:
  • Constructor Details

    • NativeTableFooter

      public NativeTableFooter()
      Creates a new empty table footer.
    • NativeTableFooter

      public NativeTableFooter(Component... components)
      Creates a new table footer with the given children components.
      Parameters:
      components - the children components.
  • Method Details

    • getRowIndex

      default int getRowIndex(NativeTableRow row)
      Get the index of a given row.
      Parameters:
      row - the row to get the index of.
      Returns:
      the index of the row.
    • getRows

      default List<NativeTableRow> getRows()
      Returns a list of all the rows.
      Returns:
      all the rows in the container.
    • getRow

      default Optional<NativeTableRow> getRow(int index)
      Returns the row at the given index.
      Parameters:
      index - the index of the row. Must be greater than 0 and less than the size of the container.
      Returns:
      the row at position index.
    • addRows

      default void addRows(NativeTableRow... rows)
      Appends a list of rows to the container.
      Parameters:
      rows - the rows to append.
    • addRow

      default NativeTableRow addRow()
      Create and append a row to the end of the container.
      Returns:
      the new row.
    • insertRow

      default NativeTableRow insertRow(int position)
      Create and insert a row at a given position.
      Parameters:
      position - a value greater than 0 and less than the container's size.
      Returns:
      the new row.
    • removeRows

      default void removeRows(NativeTableRow... rows)
      Remove a list of rows from the container.
      Parameters:
      rows - the rows to remove. If a component in the list is not a child of the container, it will throw an exception.
    • removeRow

      default void removeRow(int index)
      Remove the row at the given index.
      Parameters:
      index - the position of the row to remove.
    • removeAllRows

      default void removeAllRows()
      Remove all the rows in the container.
    • replaceRow

      default void replaceRow(int index, NativeTableRow row)
      Replaces the row at a given position with a new one. If both rows exist within the container, they swap positions.
      Parameters:
      index - the index of the row to replace.
      row - the new row to insert at the position of the old row.
    • getRowCount

      default long getRowCount()
      Returns the number of rows in the container.
      Returns:
      the row count.