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>
public class Tr
extends SubComponent<HTMLTableRowElement, Tr>
implements ComponentContext<HTMLTableRowElement, Tr>, Expandable<HTMLTableRowElement, Tr>, HasItems<HTMLTableRowElement, Tr, Cell<?>>, HasIdentifier<HTMLTableRowElement, Tr>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionAdds an item to the component.<T> TraddChildren(Iterable<T> items, Function<T, Tr> display) addTitleCell(TitleCell titleCell) voidclear()Clears all items from the component.clickable(boolean clickable) voidcollapse(boolean fireEvent) booleanChecks whether the component contains an item associated with the given identifier.voidexpand(boolean fireEvent) <T> TRetrieves the value associated with the given key from the ComponentContext.booleanDetermines whether a value is stored with the specified key.Retrieves the identifier associated with this component.booleanisEmpty()Checks whether the collection of items in the component is empty.Cell<?> Retrieves the item associated with the specified identifier from the component.iterator()load()onAdd(AddItemHandler<Tr, Cell<?>> onAdd) Registers a callback to be invoked whenever a new item is added to the component.onRemove(RemoveItemHandler<Tr, Cell<?>> onRemove) Registers a callback to be invoked whenever an item is removed from the component.onToggle(ToggleHandler<Tr> toggleHandler) onUpdate(UpdateItemHandler<Tr, Cell<?>> onUpdate) Registers a callback to be invoked whenever an item is updated in the component.voidremoveItem(String identifier) Removes an item from the component based on the provided identifier.voidreset()intsize()Retrieves the total number of items currently contained in the component.<T> TrStores a value associated with a key.that()static TrFactory method to create a new instance of this component.voidupdateItem(Cell<?> item) Updates an existing item in the component.Methods inherited from class SubComponent
element, registerSubComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ComponentContext
get, getMethods inherited from interface ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface ElementConsumerMethods
apply, runMethods inherited from interface ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface ElementEventMethods
on, on, onMethods inherited from interface ElementIdMethods
id, uniqueIdMethods inherited from interface ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface HasItems
addItem, addItems, items, replaceItemElement, updateItem, updateItemMethods inherited from interface HTMLElementAttributeMethods
titleMethods inherited from interface HTMLElementDataMethods
data, dataMethods inherited from interface HTMLElementVisibilityMethods
hiddenMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
SUB_COMPONENT_NAME
- See Also:
-
-
Method Details
-
tr
-
add
-
addTitleCell
-
add
-
addChildren
-
add
-
addChildren
-
addChild
-
add
-
clickable
-
clickable
-
store
Description copied from interface:ComponentContextStores a value associated with a key.- Specified by:
storein interfaceComponentContext<HTMLTableRowElement, Tr>- Type Parameters:
T- the type of the value being stored- Parameters:
key- the key associated with the valuevalue- the value to be stored
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLTableRowElement, Tr>
-
onAdd
Description copied from interface:HasItemsRegisters a callback to be invoked whenever a new item is added to the component.- Specified by:
onAddin interfaceHasItems<HTMLTableRowElement, Tr, Cell<?>>- Parameters:
onAdd- aAddItemHandlerthat takes the builder instance and the item being added as arguments- Returns:
- the builder instance after adding the callback
-
onUpdate
Description copied from interface:HasItemsRegisters a callback to be invoked whenever an item is updated in the component.- Specified by:
onUpdatein interfaceHasItems<HTMLTableRowElement, Tr, Cell<?>>- Parameters:
onUpdate- aUpdateItemHandlerthat 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
Description copied from interface:HasItemsRegisters a callback to be invoked whenever an item is removed from the component.- Specified by:
onRemovein interfaceHasItems<HTMLTableRowElement, Tr, Cell<?>>- Parameters:
onRemove- aRemoveItemHandlerthat takes the component and the item being removed as arguments- Returns:
- the builder instance after adding the callback
-
onToggle
-
collapse
public void collapse(boolean fireEvent) - Specified by:
collapsein interfaceExpandable<HTMLTableRowElement, Tr>
-
expand
public void expand(boolean fireEvent) - Specified by:
expandin interfaceExpandable<HTMLTableRowElement, Tr>
-
load
-
reset
public void reset() -
iterator
-
size
-
isEmpty
-
contains
Description copied from interface:HasItemsChecks whether the component contains an item associated with the given identifier.- Specified by:
containsin interfaceHasItems<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
Description copied from interface:HasItemsRetrieves the item associated with the specified identifier from the component.- Specified by:
itemin interfaceHasItems<HTMLTableRowElement, Tr, Cell<?>>- Parameters:
identifier- the identifier of the item to be retrieved- Returns:
- the item associated with the given identifier, or
nullif no item is found
-
updateItem
Description copied from interface:HasItemsUpdates an existing item in the component.- Specified by:
updateItemin interfaceHasItems<HTMLTableRowElement, Tr, Cell<?>>- Parameters:
item- the item to be updated
-
removeItem
Description copied from interface:HasItemsRemoves an item from the component based on the provided identifier.- Specified by:
removeItemin interfaceHasItems<HTMLTableRowElement, Tr, Cell<?>>- Parameters:
identifier- the identifier of the item to be removed
-
clear
public void clear()Description copied from interface:HasItemsClears 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:
clearin interfaceHasItems<HTMLTableRowElement, Tr, Cell<?>>
-
identifier
Description copied from interface:HasIdentifierRetrieves the identifier associated with this component.- Specified by:
identifierin interfaceHasIdentifier<HTMLTableRowElement, Tr>- Returns:
- the identifier of the component
-
has
Description copied from interface:ComponentContextDetermines whether a value is stored with the specified key.- Specified by:
hasin interfaceComponentContext<HTMLTableRowElement, Tr>- Parameters:
key- the key to check- Returns:
- true if a value is stored with the specified key, false otherwise
-
get
Description copied from interface:ComponentContextRetrieves the value associated with the given key from the ComponentContext.- Specified by:
getin interfaceComponentContext<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
-