Class Tr

All Implemented Interfaces:
Iterable<Cell<?>>, ElementAttributeMethods<HTMLTableRowElement, Tr>, ElementClassListMethods<HTMLTableRowElement, Tr>, ElementConsumerMethods<HTMLTableRowElement, Tr>, ElementContainerMethods<HTMLTableRowElement, Tr>, ElementEventMethods<HTMLTableRowElement, Tr>, ElementIdMethods<HTMLTableRowElement, Tr>, ElementQueryMethods<HTMLTableRowElement>, HTMLElementAttributeMethods<HTMLTableRowElement, Tr>, HTMLElementDataMethods<HTMLTableRowElement, Tr>, HTMLElementStyleMethods<HTMLTableRowElement, Tr>, HTMLElementVisibilityMethods<HTMLTableRowElement, Tr>, IsElement<HTMLTableRowElement>, TypedBuilder<HTMLTableRowElement, Tr>, Expandable<HTMLTableRowElement, Tr>, HasIdentifier<HTMLTableRowElement, Tr>, HasItems<HTMLTableRowElement, Tr, Cell<?>>, ComponentContext<HTMLTableRowElement, Tr>

  • Field Details

  • Method Details

    • tr

      public static Tr tr(String identifier)
      Factory method to create a new instance of this component.
    • add

      public Tr add(Cell<?> item)
      Description copied from interface: HasItems
      Adds an item to the component.
      Specified by:
      add in interface HasItems<HTMLTableRowElement, Tr, Cell<?>>
      Parameters:
      item - the item to be added to the component
      Returns:
      the builder instance after the item has been added
    • addTitleCell

      public Tr addTitleCell(TitleCell titleCell)
    • add

      public Tr add(TitleCell titleCell)
    • addChildren

      public Tr addChildren(Function<Tr, Promise<Iterable<Tr>>> children)
    • add

      public Tr add(Function<Tr, Promise<Iterable<Tr>>> children)
    • addChildren

      public <T> Tr addChildren(Iterable<T> items, Function<T,Tr> display)
    • addChild

      public Tr addChild(Tr child)
    • add

      public Tr add(Tr child)
    • clickable

      public Tr clickable()
    • clickable

      public Tr clickable(boolean clickable)
    • store

      public <T> Tr store(String key, T value)
      Description copied from interface: ComponentContext
      Stores a value associated with a key.
      Specified by:
      store in interface ComponentContext<HTMLTableRowElement, Tr>
      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 Tr that()
      Specified by:
      that in interface TypedBuilder<HTMLTableRowElement, Tr>
    • onAdd

      public Tr onAdd(AddItemHandler<Tr,Cell<?>> 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<HTMLTableRowElement, Tr, Cell<?>>
      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 Tr onUpdate(UpdateItemHandler<Tr,Cell<?>> 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<HTMLTableRowElement, Tr, Cell<?>>
      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 Tr onRemove(RemoveItemHandler<Tr,Cell<?>> 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<HTMLTableRowElement, Tr, Cell<?>>
      Parameters:
      onRemove - a RemoveItemHandler that takes the component and the item being removed as arguments
      Returns:
      the builder instance after adding the callback
    • onToggle

      public Tr onToggle(ToggleHandler<Tr> toggleHandler)
    • collapse

      public void collapse(boolean fireEvent)
      Specified by:
      collapse in interface Expandable<HTMLTableRowElement, Tr>
    • expand

      public void expand(boolean fireEvent)
      Specified by:
      expand in interface Expandable<HTMLTableRowElement, Tr>
    • load

      public Promise<Iterable<TreeViewItem>> load()
    • reset

      public void reset()
    • iterator

      public Iterator<Cell<?>> iterator()
      Specified by:
      iterator in interface Iterable<Cell<?>>
    • 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<HTMLTableRowElement, Tr, Cell<?>>
      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<HTMLTableRowElement, Tr, Cell<?>>
      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<HTMLTableRowElement, Tr, Cell<?>>
      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 Cell<?> 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<HTMLTableRowElement, Tr, Cell<?>>
      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(Cell<?> item)
      Description copied from interface: HasItems
      Updates an existing item in the component.
      Specified by:
      updateItem in interface HasItems<HTMLTableRowElement, Tr, Cell<?>>
      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<HTMLTableRowElement, Tr, Cell<?>>
      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<HTMLTableRowElement, Tr, Cell<?>>
    • identifier

      public String identifier()
      Description copied from interface: HasIdentifier
      Retrieves the identifier associated with this component.
      Specified by:
      identifier in interface HasIdentifier<HTMLTableRowElement, Tr>
      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<HTMLTableRowElement, Tr>
      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<HTMLTableRowElement, Tr>
      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