Class DescriptionList
java.lang.Object
org.patternfly.component.BaseComponent<HTMLElement, DescriptionList>
org.patternfly.component.list.DescriptionList
- All Implemented Interfaces:
Iterable<DescriptionListGroup>, ElementAttributeMethods<HTMLElement, DescriptionList>, ElementClassListMethods<HTMLElement, DescriptionList>, ElementConsumerMethods<HTMLElement, DescriptionList>, ElementContainerMethods<HTMLElement, DescriptionList>, ElementEventMethods<HTMLElement, DescriptionList>, ElementIdMethods<HTMLElement, DescriptionList>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, DescriptionList>, HTMLElementDataMethods<HTMLElement, DescriptionList>, HTMLElementStyleMethods<HTMLElement, DescriptionList>, HTMLElementVisibilityMethods<HTMLElement, DescriptionList>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, DescriptionList>, Component, HasItems<HTMLElement, DescriptionList, DescriptionListGroup>, Ordered<HTMLElement, DescriptionList, DescriptionListGroup>, Modifiers.Compact<HTMLElement, DescriptionList>, Modifiers.Horizontal<HTMLElement, DescriptionList>
public class DescriptionList
extends BaseComponent<HTMLElement, DescriptionList>
implements Modifiers.Compact<HTMLElement, DescriptionList>, Modifiers.Horizontal<HTMLElement, DescriptionList>, Ordered<HTMLElement, DescriptionList, DescriptionListGroup>
A description list contains terms and their corresponding descriptions.
- See Also:
-
Field Summary
Fields inherited from interface Ordered
DATA_ORDER -
Method Summary
Modifier and TypeMethodDescriptionadd(DescriptionListGroup item) Adds an item to the component.Same as autoColumnWidths(true)autoColumnWidths(boolean autoColumnWidths) Sets the description list to format automatically.autoFit()Same as autoFit(true)autoFit(boolean autoFit) Sets the description list to auto-fit.autoFitMin(String autoFitMin) Same asautoFitMin(breakpoints(default_, autoFitMin))autoFitMin(Breakpoints<String> autoFitMin) Sets the minimum column size for the auto-fit layout at various breakpoints.voidclear()Clears all items from the component.Same ascolumns(breakpoints(default_, columns))columns(Breakpoints<Integer> columns) Sets the number of columns on the description list at various breakpoints.Retrieves the comparator used for ordering elements in a component.booleanChecks whether the component contains an item associated with the given identifier.static DescriptionListdisplaySize(Size size) Sets the display size of the descriptions in the description list.Same as fillColumns(true)fillColumns(boolean fillColumns) Sets the default placement of description list groups to fill from top to bottom.fluid()Same as fluid(true)fluid(boolean fluid) Sets a horizontal description list to have fluid styling.horizontalTermWidth(String horizontalTermWidth) Same ashorizontalTermWidth(breakpoints(default_, horizontalTermWidth))horizontalTermWidth(Breakpoints<String> horizontalTermWidth) Sets the horizontal description list's term column width at various breakpoints.Same as inlineGrid(true)inlineGrid(boolean inlineGrid) Modifies the description list display to inline-grid.booleanisEmpty()Checks whether the collection of items in the component is empty.Retrieves the item associated with the specified identifier from the component.iterator()Registers a callback to be invoked whenever a new item is added to the component.onRemove(RemoveItemHandler<DescriptionList, DescriptionListGroup> onRemove) Registers a callback to be invoked whenever an item is removed from the component.onUpdate(UpdateItemHandler<DescriptionList, DescriptionListGroup> onUpdate) Registers a callback to be invoked whenever an item is updated in the component.ordered(Comparator<DescriptionListGroup> comparator) Orders the elements contained in the component using the specified comparator.orientation(Breakpoints<Orientation> orientation) Indicates how the menu will align at various breakpoints.orientation(Orientation orientation) Same asorientation(breakpoints(default_, orientation))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()voidUpdates an existing item in the component.Methods inherited from class BaseComponent
componentType, element, 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.Compact
compact, compactMethods inherited from interface Modifiers.Horizontal
horizontal, horizontalMethods inherited from interface Ordered
addOrdered, defaultOrder, ordered
-
Method Details
-
descriptionList
-
add
Description copied from interface:HasItemsAdds an item to the component.- Specified by:
addin interfaceHasItems<HTMLElement, DescriptionList, DescriptionListGroup>- Parameters:
item- the item to be added to the component- Returns:
- the builder instance after the item has been added
-
autoColumnWidths
Same as autoColumnWidths(true) -
autoColumnWidths
Sets the description list to format automatically. -
autoFit
Same as autoFit(true) -
autoFit
Sets the description list to auto-fit. -
autoFitMin
Same asautoFitMin(breakpoints(default_, autoFitMin)) -
autoFitMin
Sets the minimum column size for the auto-fit layout at various breakpoints. -
columns
Same ascolumns(breakpoints(default_, columns)) -
columns
Sets the number of columns on the description list at various breakpoints. -
displaySize
Sets the display size of the descriptions in the description list. -
fillColumns
Same as fillColumns(true) -
fillColumns
Sets the default placement of description list groups to fill from top to bottom. -
fluid
Same as fluid(true) -
fluid
Sets a horizontal description list to have fluid styling. -
horizontalTermWidth
Same ashorizontalTermWidth(breakpoints(default_, horizontalTermWidth)) -
horizontalTermWidth
Sets the horizontal description list's term column width at various breakpoints. -
inlineGrid
Same as inlineGrid(true) -
inlineGrid
Modifies the description list display to inline-grid. -
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, DescriptionList, DescriptionListGroup>- Parameters:
comparator- the comparator used to define the ordering of the elements- Returns:
- the builder instance with the elements ordered
-
orientation
Same asorientation(breakpoints(default_, orientation)) -
orientation
Indicates how the menu will align at various breakpoints. -
termWidth
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement, DescriptionList>
-
onAdd
Description copied from interface:HasItemsRegisters a callback to be invoked whenever a new item is added to the component.- Specified by:
onAddin interfaceHasItems<HTMLElement, DescriptionList, DescriptionListGroup>- 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<HTMLElement, DescriptionList, DescriptionListGroup>- 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<HTMLElement, DescriptionList, DescriptionListGroup>- 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<HTMLElement, DescriptionList, DescriptionListGroup>- Returns:
- the comparator that determines the order of elements
-
iterator
- Specified by:
iteratorin interfaceIterable<DescriptionListGroup>
-
size
public int size()Description copied from interface:HasItemsRetrieves the total number of items currently contained in the component.- Specified by:
sizein interfaceHasItems<HTMLElement, DescriptionList, DescriptionListGroup>- Returns:
- the number of items contained in the component
-
isEmpty
public boolean isEmpty()Description copied from interface:HasItemsChecks whether the collection of items in the component is empty.- Specified by:
isEmptyin interfaceHasItems<HTMLElement, DescriptionList, DescriptionListGroup>- Returns:
trueif the component contains no items;falseotherwise
-
contains
Description copied from interface:HasItemsChecks whether the component contains an item associated with the given identifier.- Specified by:
containsin interfaceHasItems<HTMLElement, DescriptionList, DescriptionListGroup>- 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<HTMLElement, DescriptionList, DescriptionListGroup>- 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<HTMLElement, DescriptionList, DescriptionListGroup>- 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<HTMLElement, DescriptionList, DescriptionListGroup>- 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<HTMLElement, DescriptionList, DescriptionListGroup>
-