Class List
- All Implemented Interfaces:
Iterable<ListItem>,ElementAttributeMethods<HTMLElement, List>,ElementClassListMethods<HTMLElement, List>,ElementConsumerMethods<HTMLElement, List>,ElementContainerMethods<HTMLElement, List>,ElementEventMethods<HTMLElement, List>,ElementIdMethods<HTMLElement, List>,ElementQueryMethods<HTMLElement>,HTMLElementAttributeMethods<HTMLElement, List>,HTMLElementDataMethods<HTMLElement, List>,HTMLElementStyleMethods<HTMLElement, List>,HTMLElementVisibilityMethods<HTMLElement, List>,IsElement<HTMLElement>,TypedBuilder<HTMLElement, List>,Component,HasItems<HTMLElement, List, ListItem>,Ordered<HTMLElement, List, ListItem>,Modifiers.Bordered<HTMLElement, List>,Modifiers.Inline<HTMLElement, List>,Modifiers.Plain<HTMLElement, List>
public class List
extends BaseComponent<HTMLElement, List>
implements Modifiers.Bordered<HTMLElement, List>, HasItems<HTMLElement, List, ListItem>, Modifiers.Inline<HTMLElement, List>, Ordered<HTMLElement, List, ListItem>, Modifiers.Plain<HTMLElement, List>
A list component embeds a formatted list (bulleted or numbered list) into page content.
- See Also:
-
Field Summary
Fields inherited from interface org.patternfly.component.Ordered
DATA_ORDER -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Retrieves the comparator used for ordering elements in a component.booleanbooleanisEmpty()iterator()static Listlist()Creates an unordered list component.static <E extends HTMLElement>
Listlist(HTMLContainerBuilder<E> builder) onAdd(BiConsumer<List, ListItem> onAdd) onRemove(BiConsumer<List, ListItem> onRemove) ordered(Comparator<ListItem> comparator) Orders the elements contained in the component using the specified comparator.voidremoveItem(String identifier) intsize()that()Methods inherited from class org.patternfly.component.BaseComponent
componentType, element, registerComponentMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface org.jboss.elemento.ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface org.jboss.elemento.ElementConsumerMethods
apply, runMethods inherited from interface org.jboss.elemento.ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.ElementEventMethods
on, on, onMethods inherited from interface org.jboss.elemento.ElementIdMethods
id, uniqueIdMethods inherited from interface org.jboss.elemento.ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface org.jboss.elemento.HTMLElementAttributeMethods
titleMethods inherited from interface org.jboss.elemento.HTMLElementDataMethods
dataMethods inherited from interface org.jboss.elemento.HTMLElementStyleMethods
style, style, style, style, style, styleMethods inherited from interface org.jboss.elemento.HTMLElementVisibilityMethods
hiddenMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.patternfly.style.Modifiers.Bordered
bordered, borderedMethods inherited from interface org.patternfly.style.Modifiers.Inline
inline, inlineMethods inherited from interface org.patternfly.style.Modifiers.Plain
plain, plainMethods inherited from interface org.patternfly.component.Ordered
addOrdered, defaultOrder, ordered
-
Method Details
-
list
Creates an unordered list component. -
list
-
add
-
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.- Specified by:
orderedin interfaceOrdered<HTMLElement, List, ListItem>- Parameters:
comparator- the comparator used to define the ordering of the elements- Returns:
- the builder instance with the elements ordered
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement, List>
-
onAdd
- Specified by:
onAddin interfaceHasItems<HTMLElement, List, ListItem>
-
onRemove
- Specified by:
onRemovein interfaceHasItems<HTMLElement, List, ListItem>
-
comparator
Description copied from interface:OrderedRetrieves the comparator used for ordering elements in a component.- Specified by:
comparatorin interfaceOrdered<HTMLElement, List, ListItem>- Returns:
- the comparator that determines the order of elements
-
iterator
-
size
public int size()- Specified by:
sizein interfaceHasItems<HTMLElement, List, ListItem>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceHasItems<HTMLElement, List, ListItem>
-
contains
-
item
-
removeItem
- Specified by:
removeItemin interfaceHasItems<HTMLElement, List, ListItem>
-
clear
public void clear()- Specified by:
clearin interfaceHasItems<HTMLElement, List, ListItem>
-