Class NativeTableBody

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.NativeTableBody
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<NativeTableBody>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasComponentsOfType<com.vaadin.flow.component.Component>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, Serializable

@Deprecated(since="25.3", forRemoval=true) @Tag("tbody") public class NativeTableBody extends com.vaadin.flow.component.HtmlContainer implements com.vaadin.flow.component.ClickNotifier<NativeTableBody>
Deprecated, for removal: This API element is subject to removal in a future version.
since 25.3, scheduled for removal in Vaadin 26. Use TableBody instead, which cannot be given children the HTML specification does not allow inside this element.
Component representing a <tbody> element.
Since:
24.5
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText

    com.vaadin.flow.component.HasText.WhiteSpace
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new empty table body.
    NativeTableBody(com.vaadin.flow.component.Component... components)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new table body with the given children components.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create and append a row to the end of the container.
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Appends a list of rows to the container.
    getRow(int index)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the row at the given index.
    default long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the number of rows in the container.
    default int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the index of a given row.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a list of all the rows.
    insertRow(int position)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create and insert a row at a given position.
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Remove all the rows in the container.
    default void
    removeRow(int index)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Remove the row at the given index.
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Remove a list of rows from the container.
    default void
    replaceRow(int index, NativeTableRow row)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Replaces the row at a given position with a new one.

    Methods inherited from class com.vaadin.flow.component.HtmlComponent

    getTitle, setTitle

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttached

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.ClickNotifier

    addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add

    Methods inherited from interface com.vaadin.flow.component.HasComponentsOfType

    add, add, addComponentAsFirst, addComponentAtIndex, bindChildren, getChildren, getComponentAt, getComponentCount, indexOf, remove, remove, removeAll, replace

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    bindEnabled, isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasSize

    bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasText

    bindText, getText, getWhiteSpace, setText, setWhiteSpace
  • Constructor Details

    • NativeTableBody

      public NativeTableBody()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new empty table body.
    • NativeTableBody

      public NativeTableBody(com.vaadin.flow.component.Component... components)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new table body with the given children components.
      Parameters:
      components - the children components.
  • Method Details

    • getRowIndex

      default int getRowIndex(NativeTableRow row)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a list of all the rows.
      Returns:
      all the rows in the container.
    • getRow

      default Optional<NativeTableRow> getRow(int index)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Appends a list of rows to the container.
      Parameters:
      rows - the rows to append.
    • addRow

      default NativeTableRow addRow()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create and append a row to the end of the container.
      Returns:
      the new row.
    • insertRow

      default NativeTableRow insertRow(int position)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Remove the row at the given index.
      Parameters:
      index - the position of the row to remove.
    • removeAllRows

      default void removeAllRows()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Remove all the rows in the container.
    • replaceRow

      default void replaceRow(int index, NativeTableRow row)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the number of rows in the container.
      Returns:
      the row count.