Class List
java.lang.Object
org.patternfly.component.BaseComponent<elemental2.dom.HTMLElement, List>
org.patternfly.component.list.List
- All Implemented Interfaces:
Iterable<ListItem>, ElementAttributeMethods<elemental2.dom.HTMLElement, List>, ElementClassListMethods<elemental2.dom.HTMLElement, List>, ElementConsumerMethods<elemental2.dom.HTMLElement, List>, ElementContainerMethods<elemental2.dom.HTMLElement, List>, ElementEventMethods<elemental2.dom.HTMLElement, List>, ElementIdMethods<elemental2.dom.HTMLElement, List>, ElementQueryMethods<elemental2.dom.HTMLElement>, HTMLElementAttributeMethods<elemental2.dom.HTMLElement, List>, HTMLElementDataMethods<elemental2.dom.HTMLElement, List>, HTMLElementStyleMethods<elemental2.dom.HTMLElement, List>, HTMLElementVisibilityMethods<elemental2.dom.HTMLElement, List>, IsElement<elemental2.dom.HTMLElement>, TypedBuilder<elemental2.dom.HTMLElement, List>, Component, HasItems<elemental2.dom.HTMLElement, List, ListItem>, Ordered<elemental2.dom.HTMLElement, List, ListItem>, OuiaSupport<elemental2.dom.HTMLElement, List>, Modifiers.Bordered<elemental2.dom.HTMLElement, List>, Modifiers.Inline<elemental2.dom.HTMLElement, List>, Modifiers.Plain<elemental2.dom.HTMLElement, List>
public class List
extends BaseComponent<elemental2.dom.HTMLElement, List>
implements Modifiers.Bordered<elemental2.dom.HTMLElement, List>, Modifiers.Inline<elemental2.dom.HTMLElement, List>, Ordered<elemental2.dom.HTMLElement, List, ListItem>, Modifiers.Plain<elemental2.dom.HTMLElement, List>
A list component embeds a formatted list (bulleted or numbered list) into page content.
- See Also:
-
Field Summary
Fields inherited from interface Ordered
DATA_ORDER -
Method Summary
Modifier and TypeMethodDescriptionAdds an item to the component.voidclear()Clears all items from the component.Retrieves the comparator used for ordering elements in a component.booleanChecks whether the component contains an item associated with the given identifier.booleanisEmpty()Checks whether the collection of items in the component is empty.Retrieves the item associated with the specified identifier from the component.iterator()static Listlist()Creates an unordered list component.static <E extends elemental2.dom.HTMLElement>
Listlist(HTMLContainerBuilder<E> builder) onAdd(AddItemHandler<List, ListItem> onAdd) Registers a callback to be invoked whenever a new item is added to the component.onRemove(RemoveItemHandler<List, ListItem> onRemove) Registers a callback to be invoked whenever an item is removed from the component.onUpdate(UpdateItemHandler<List, ListItem> onUpdate) Registers a callback to be invoked whenever an item is updated in the component.ordered(Comparator<ListItem> comparator) Orders the elements contained in the component using the specified comparator.voidremoveItem(String identifier) Removes an item from the component based on the provided identifier.intsize()Retrieves the total number of items currently contained in the component.that()voidupdateItem(ListItem item) Updates an existing item in the component.Methods inherited from class BaseComponent
componentType, element, ouiaComponentType, registerComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, spliteratorMethods inherited from interface Modifiers.Bordered
bordered, borderedMethods inherited from interface Modifiers.Inline
inline, inlineMethods inherited from interface Modifiers.Plain
plain, plainMethods inherited from interface Ordered
addOrdered, defaultOrder, orderedMethods inherited from interface OuiaSupport
initOuia, ouiaId, ouiaSafe, ouiaTransition
-
Method Details
-
list
Creates an unordered list component. -
list
-
add
Description copied from interface:HasItemsAdds an item to the component. -
addDivider
-
largeIcons
-
ordered
Description copied from interface:OrderedOrders the elements contained in the component using the specified comparator. The comparator determines the order in which the elements are arranged. -
that
- Specified by:
thatin interfaceTypedBuilder<elemental2.dom.HTMLElement, List>
-
onAdd
Description copied from interface:HasItemsRegisters a callback to be invoked whenever a new item is added to the component.- Specified by:
onAddin interfaceHasItems<elemental2.dom.HTMLElement, List, ListItem>- 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<elemental2.dom.HTMLElement, List, ListItem>- 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<elemental2.dom.HTMLElement, List, ListItem>- Parameters:
onRemove- aRemoveItemHandlerthat takes the component and the item being removed as arguments- Returns:
- the builder instance after adding the callback
-
comparator
Description copied from interface:OrderedRetrieves the comparator used for ordering elements in a component.- Specified by:
comparatorin interfaceOrdered<elemental2.dom.HTMLElement, List, ListItem>- Returns:
- the comparator that determines the order of elements
-
iterator
-
size
-
isEmpty
-
contains
Description copied from interface:HasItemsChecks whether the component contains an item associated with the given identifier. -
item
Description copied from interface:HasItemsRetrieves the item associated with the specified identifier from the component. -
updateItem
-
removeItem
Description copied from interface:HasItemsRemoves an item from the component based on the provided identifier.- Specified by:
removeItemin interfaceHasItems<elemental2.dom.HTMLElement, List, ListItem>- 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.
-