Class Tbody

java.lang.Object
org.patternfly.component.SubComponent<elemental2.dom.HTMLTableSectionElement, Tbody>
org.patternfly.component.table.Tbody
All Implemented Interfaces:
Iterable<Tr>, ElementAttributeMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, ElementClassListMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, ElementConsumerMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, ElementContainerMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, ElementEventMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, ElementIdMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, ElementQueryMethods<elemental2.dom.HTMLTableSectionElement>, HTMLElementAttributeMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, HTMLElementDataMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, HTMLElementStyleMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, HTMLElementVisibilityMethods<elemental2.dom.HTMLTableSectionElement, Tbody>, IsElement<elemental2.dom.HTMLTableSectionElement>, TypedBuilder<elemental2.dom.HTMLTableSectionElement, Tbody>, ComponentContext<elemental2.dom.HTMLTableSectionElement, Tbody>, HasIdentifier<elemental2.dom.HTMLTableSectionElement, Tbody>, HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>, Ordered<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>, OuiaSupport<elemental2.dom.HTMLTableSectionElement, Tbody>

public class Tbody extends SubComponent<elemental2.dom.HTMLTableSectionElement, Tbody> implements ComponentContext<elemental2.dom.HTMLTableSectionElement, Tbody>, HasIdentifier<elemental2.dom.HTMLTableSectionElement, Tbody>, Ordered<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
A table body within a Table component.
  • Field Details

  • Method Details

    • tbody

      public static Tbody tbody()
      Factory method to create a new instance of this component.
    • tbody

      public static Tbody tbody(String identifier)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • addRows

      public <T> Tbody addRows(Iterable<T> items, Function<T,Tr> display)
    • addRow

      public Tbody addRow(Tr row)
    • add

      public Tbody add(Tr row)
      Description copied from interface: HasItems
      Adds an item to the component.
      Specified by:
      add in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      row - the item to be added to the component
      Returns:
      the builder instance after the item has been added
    • ordered

      public Tbody ordered(Comparator<Tr> comparator)
      Description copied from interface: Ordered
      Orders the elements contained in the component using the specified comparator. The comparator determines the order in which the elements are arranged.
      Specified by:
      ordered in interface Ordered<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      comparator - the comparator used to define the ordering of the elements
      Returns:
      the builder instance with the elements ordered
    • store

      public <T> Tbody store(String key, T value)
      Description copied from interface: ComponentContext
      Stores a value associated with a key.
      Specified by:
      store in interface ComponentContext<elemental2.dom.HTMLTableSectionElement, Tbody>
      Type Parameters:
      T - the type of the value being stored
      Parameters:
      key - the key associated with the value
      value - the value to be stored
    • that

      public Tbody that()
      Specified by:
      that in interface TypedBuilder<elemental2.dom.HTMLTableSectionElement, Tbody>
    • onAdd

      public Tbody onAdd(AddItemHandler<Tbody,Tr> onAdd)
      Description copied from interface: HasItems
      Registers a callback to be invoked whenever a new item is added to the component.
      Specified by:
      onAdd in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      onAdd - a AddItemHandler that takes the builder instance and the item being added as arguments
      Returns:
      the builder instance after adding the callback
    • onUpdate

      public Tbody onUpdate(UpdateItemHandler<Tbody,Tr> onUpdate)
      Description copied from interface: HasItems
      Registers a callback to be invoked whenever an item is updated in the component.
      Specified by:
      onUpdate in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      onUpdate - a UpdateItemHandler that takes the component, the previous state of the item, and the updated state of the item as arguments
      Returns:
      the builder instance after adding the callback
    • onRemove

      public Tbody onRemove(RemoveItemHandler<Tbody,Tr> onRemove)
      Description copied from interface: HasItems
      Registers a callback to be invoked whenever an item is removed from the component.
      Specified by:
      onRemove in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      onRemove - a RemoveItemHandler that takes the component and the item being removed as arguments
      Returns:
      the builder instance after adding the callback
    • identifier

      public String identifier()
      Description copied from interface: HasIdentifier
      Retrieves the identifier associated with this component.
      Specified by:
      identifier in interface HasIdentifier<elemental2.dom.HTMLTableSectionElement, Tbody>
      Returns:
      the identifier of the component
    • has

      public boolean has(String key)
      Description copied from interface: ComponentContext
      Determines whether a value is stored with the specified key.
      Specified by:
      has in interface ComponentContext<elemental2.dom.HTMLTableSectionElement, Tbody>
      Parameters:
      key - the key to check
      Returns:
      true if a value is stored with the specified key, false otherwise
    • get

      public <T> T get(String key)
      Description copied from interface: ComponentContext
      Retrieves the value associated with the given key from the ComponentContext.
      Specified by:
      get in interface ComponentContext<elemental2.dom.HTMLTableSectionElement, Tbody>
      Type Parameters:
      T - the type of the value being retrieved
      Parameters:
      key - the key associated with the value
      Returns:
      the value associated with the key, or null if no value is found
    • comparator

      public Comparator<Tr> comparator()
      Description copied from interface: Ordered
      Retrieves the comparator used for ordering elements in a component.
      Specified by:
      comparator in interface Ordered<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Returns:
      the comparator that determines the order of elements
    • empty

      public Tbody empty(int colSpan, EmptyState emptyState)
    • clearEmpty

      public void clearEmpty()
    • iterator

      public Iterator<Tr> iterator()
      Specified by:
      iterator in interface Iterable<Tr>
    • size

      public int size()
      Description copied from interface: HasItems
      Retrieves the total number of items currently contained in the component.
      Specified by:
      size in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Returns:
      the number of items contained in the component
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: HasItems
      Checks whether the collection of items in the component is empty.
      Specified by:
      isEmpty in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Returns:
      true if the component contains no items; false otherwise
    • contains

      public boolean contains(String identifier)
      Description copied from interface: HasItems
      Checks whether the component contains an item associated with the given identifier.
      Specified by:
      contains in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      identifier - the identifier of the item to be checked
      Returns:
      true if the component contains an item associated with the provided identifier, false otherwise
    • item

      public Tr item(String identifier)
      Description copied from interface: HasItems
      Retrieves the item associated with the specified identifier from the component.
      Specified by:
      item in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      identifier - the identifier of the item to be retrieved
      Returns:
      the item associated with the given identifier, or null if no item is found
    • updateItem

      public void updateItem(Tr item)
      Description copied from interface: HasItems
      Updates an existing item in the component.
      Specified by:
      updateItem in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      item - the item to be updated
    • removeItem

      public void removeItem(String identifier)
      Description copied from interface: HasItems
      Removes an item from the component based on the provided identifier.
      Specified by:
      removeItem in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      identifier - the identifier of the item to be removed
    • clear

      public void clear()
      Description copied from interface: HasItems
      Clears all items from the component. This method removes any existing items within the component, leaving it empty. Any associated or registered callbacks related to the removal of items may be invoked as part of this operation.
      Specified by:
      clear in interface HasItems<elemental2.dom.HTMLTableSectionElement, Tbody, Tr>