Class Tbody

All Implemented Interfaces:
Iterable<Tr>, ElementAttributeMethods<HTMLTableSectionElement, Tbody>, ElementClassListMethods<HTMLTableSectionElement, Tbody>, ElementConsumerMethods<HTMLTableSectionElement, Tbody>, ElementContainerMethods<HTMLTableSectionElement, Tbody>, ElementEventMethods<HTMLTableSectionElement, Tbody>, ElementIdMethods<HTMLTableSectionElement, Tbody>, ElementQueryMethods<HTMLTableSectionElement>, HTMLElementAttributeMethods<HTMLTableSectionElement, Tbody>, HTMLElementDataMethods<HTMLTableSectionElement, Tbody>, HTMLElementStyleMethods<HTMLTableSectionElement, Tbody>, HTMLElementVisibilityMethods<HTMLTableSectionElement, Tbody>, IsElement<HTMLTableSectionElement>, TypedBuilder<HTMLTableSectionElement, Tbody>, HasItems<HTMLTableSectionElement, Tbody, Tr>, Ordered<HTMLTableSectionElement, Tbody, Tr>

  • Field Details

  • Method Details

    • tbody

      public static Tbody tbody()
      Factory method to create a new instance of this component.
    • 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<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<HTMLTableSectionElement, Tbody, Tr>
      Parameters:
      comparator - the comparator used to define the ordering of the elements
      Returns:
      the builder instance with the elements ordered
    • that

      public Tbody that()
      Specified by:
      that in interface TypedBuilder<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<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<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<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
    • 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<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<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<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<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<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<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<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<HTMLTableSectionElement, Tbody, Tr>