Class JumpLinks
java.lang.Object
org.patternfly.component.BaseComponent<HTMLElement, JumpLinks>
org.patternfly.component.jumplinks.JumpLinks
- All Implemented Interfaces:
Iterable<JumpLinksItem>, Attachable, ElementAttributeMethods<HTMLElement, JumpLinks>, ElementClassListMethods<HTMLElement, JumpLinks>, ElementConsumerMethods<HTMLElement, JumpLinks>, ElementContainerMethods<HTMLElement, JumpLinks>, ElementEventMethods<HTMLElement, JumpLinks>, ElementIdMethods<HTMLElement, JumpLinks>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, JumpLinks>, HTMLElementDataMethods<HTMLElement, JumpLinks>, HTMLElementStyleMethods<HTMLElement, JumpLinks>, HTMLElementVisibilityMethods<HTMLElement, JumpLinks>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, JumpLinks>, Component, Expandable<HTMLElement, JumpLinks>, HasItems<HTMLElement, JumpLinks, JumpLinksItem>, Modifiers.Center<HTMLElement, JumpLinks>, Modifiers.Vertical<HTMLElement, JumpLinks>
public class JumpLinks
extends BaseComponent<HTMLElement, JumpLinks>
implements Attachable, Modifiers.Center<HTMLElement, JumpLinks>, Expandable<HTMLElement, JumpLinks>, HasItems<HTMLElement, JumpLinks, JumpLinksItem>, Modifiers.Vertical<HTMLElement, JumpLinks>
Jump links allow users to navigate to sections within a page.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionadd(JumpLinksItem item) Adds an item to the component.ariaToggleLabel(String label) voidattach(MutationRecord mutationRecord) voidclear()Clears all items from the component.voidcollapse(boolean fireEvent) booleanChecks whether the component contains an item associated with the given identifier.voidexpand(boolean fireEvent) expandable(Breakpoints<ExpandableModifier> expandable) When to collapse/expand at different breakpoints (Modifiers.Vertical.vertical()should be set to true for this to work).expandable(ExpandableModifier expandable) Same asexpandable(breakpoints(default_, expandable))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 JumpLinksstatic JumpLinksonAdd(AddItemHandler<JumpLinks, JumpLinksItem> onAdd) Registers a callback to be invoked whenever a new item is added to the component.onRemove(RemoveItemHandler<JumpLinks, JumpLinksItem> onRemove) Registers a callback to be invoked whenever an item is removed from the component.onSelect(SelectHandler<JumpLinksItem> selectHandler) onToggle(ToggleHandler<JumpLinks> toggleHandler) onUpdate(UpdateItemHandler<JumpLinks, JumpLinksItem> 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.scrollableSelector(HTMLElement element) scrollableSelector(String selector) scrollableSelector(Supplier<HTMLElement> element) scrollableSelector(By selector) voidvoidvoidvoidselect(JumpLinksItem item) voidselect(JumpLinksItem item, boolean selected) voidselect(JumpLinksItem item, boolean fireEvent, boolean selected) intsize()Retrieves the total number of items currently contained in the component.that()voidupdateItem(JumpLinksItem item) Updates an existing item in the component.vertical(boolean vertical) Adds/removes modifier(vertical)Methods inherited from class BaseComponent
componentType, element, registerComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Attachable
detachMethods 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.Center
center, centerMethods inherited from interface Modifiers.Vertical
vertical
-
Method Details
-
jumpLinks
-
jumpLinks
-
attach
- Specified by:
attachin interfaceAttachable
-
add
Description copied from interface:HasItemsAdds an item to the component.- Specified by:
addin interfaceHasItems<HTMLElement, JumpLinks, JumpLinksItem>- Parameters:
item- the item to be added to the component- Returns:
- the builder instance after the item has been added
-
expandable
Same asexpandable(breakpoints(default_, expandable)) -
expandable
When to collapse/expand at different breakpoints (Modifiers.Vertical.vertical()should be set to true for this to work). -
label
-
scrollableSelector
-
scrollableSelector
-
scrollableSelector
-
scrollableSelector
-
vertical
Description copied from interface:Modifiers.VerticalAdds/removes modifier(vertical)- Specified by:
verticalin interfaceModifiers.Vertical<HTMLElement, JumpLinks>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement, JumpLinks>
-
ariaLabel
-
ariaToggleLabel
-
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, JumpLinks, JumpLinksItem>- 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, JumpLinks, JumpLinksItem>- 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, JumpLinks, JumpLinksItem>- Parameters:
onRemove- aRemoveItemHandlerthat takes the component and the item being removed as arguments- Returns:
- the builder instance after adding the callback
-
onSelect
-
onToggle
-
collapse
public void collapse(boolean fireEvent) - Specified by:
collapsein interfaceExpandable<HTMLElement, JumpLinks>
-
expand
public void expand(boolean fireEvent) - Specified by:
expandin interfaceExpandable<HTMLElement, JumpLinks>
-
select
-
select
-
select
-
select
-
select
-
select
-
iterator
- Specified by:
iteratorin interfaceIterable<JumpLinksItem>
-
size
public int size()Description copied from interface:HasItemsRetrieves the total number of items currently contained in the component.- Specified by:
sizein interfaceHasItems<HTMLElement, JumpLinks, JumpLinksItem>- 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, JumpLinks, JumpLinksItem>- 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, JumpLinks, JumpLinksItem>- 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, JumpLinks, JumpLinksItem>- 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, JumpLinks, JumpLinksItem>- 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, JumpLinks, JumpLinksItem>- 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, JumpLinks, JumpLinksItem>
-