Class Tabs
- All Implemented Interfaces:
Iterable<Tab>,Attachable,ElementAttributeMethods<HTMLElement, Tabs>,ElementClassListMethods<HTMLElement, Tabs>,ElementConsumerMethods<HTMLElement, Tabs>,ElementContainerMethods<HTMLElement, Tabs>,ElementEventMethods<HTMLElement, Tabs>,ElementIdMethods<HTMLElement, Tabs>,ElementQueryMethods<HTMLElement>,HTMLElementAttributeMethods<HTMLElement, Tabs>,HTMLElementDataMethods<HTMLElement, Tabs>,HTMLElementStyleMethods<HTMLElement, Tabs>,HTMLElementVisibilityMethods<HTMLElement, Tabs>,IsElement<HTMLElement>,TypedBuilder<HTMLElement, Tabs>,Component,Expandable<HTMLElement, Tabs>,HasItems<HTMLElement, Tabs, Tab>,Modifiers.Box<HTMLElement, Tabs>,Modifiers.Fill<HTMLElement, Tabs>,Modifiers.PageInsets<HTMLElement, Tabs>,Modifiers.Secondary<HTMLElement, Tabs>,Modifiers.Vertical<HTMLElement, Tabs>
public class Tabs
extends BaseComponent<HTMLElement, Tabs>
implements Attachable, Modifiers.Box<HTMLElement, Tabs>, Expandable<HTMLElement, Tabs>, Modifiers.Fill<HTMLElement, Tabs>, HasItems<HTMLElement, Tabs, Tab>, Modifiers.PageInsets<HTMLElement, Tabs>, Modifiers.Secondary<HTMLElement, Tabs>, Modifiers.Vertical<HTMLElement, Tabs>
Tabs allow users to navigate between views within the same page or context.
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> TabsariaAddLabel(String label) Aria-label for the add button.Provides an accessible label for the tabs.ariaOverflowLabel(String label) The aria label applied to the button which toggles the tab overflow menuariaScrollBackLabel(String label) Aria-label for the back scroll buttonariaScrollForwardLabel(String label) Aria-label for the forward scroll buttonariaToggleLabel(String label) Aria-label for the expandable togglevoidattach(MutationRecord mutationRecord) box(boolean box) Adds/removes modifier(box)voidclear()voidvoidcloseable(CloseHandler<Tab> closeHandler) voidcollapse(boolean fireEvent) booleanvoiddetach(MutationRecord mutationRecord) voidexpand(boolean fireEvent) expandable(Breakpoints<ExpandableModifier> expandable) Enable expandable vertical tabs at various breakpoints (Modifiers.Vertical.vertical()should be set to true for this to work).expandable(ExpandableModifier expandable) Same asexpandable(breakpoints(default_, expandable))booleanexpanded()fill(boolean fill) Adds/removes modifier(fill)initialSelection(String identifier) inset(Breakpoints<Inset> inset) Insets at various breakpoints.Same asinset(breakpoints(default_, inset))booleanisEmpty()iterator()Same as noBorderBottom(true)noBorderBottom(boolean noBorderBottom) Disables border bottom tab styling on tabs.By default, the first tab is selected initially.onAdd(BiConsumer<Tabs, Tab> onAdd) Callback for the 'add' button.onClose(CloseHandler<Tab> closeHandler) onRemove(BiConsumer<Tabs, Tab> onRemove) onSelect(SelectHandler<Tab> selectHandler) onToggle(ToggleHandler<Tabs> toggleHandler) Flag which places overflowing tabs into a menu triggered by the last tab.overflowHorizontal(String overflowText) Flag which places overflowing tabs into a menu triggered by the last tab.pageInsets(boolean pageInsets) Adds/removes modifier(pageInsets)voidremoveItem(String identifier) secondary(boolean secondary) Enables secondary styling to the tab componentvoidvoidvoidvoidSame as showTabCount(true)showTabCount(boolean showTabCount) Flag which shows the count of overflowing tabs when enabledintsize()subtab()Same as subtab(true)subtab(boolean subtab) Adds/removes modifier(subtab)static Tabstabs()static <E extends HTMLElement>
Tabstabs(HTMLContainerBuilder<E> builder) that()toggleText(String text) Text that appears in the expandable toggle.vertical(boolean vertical) Adds/removes modifier(vertical)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.patternfly.component.Expandable
collapse, expand, toggle, toggleMethods 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.Box
boxMethods inherited from interface org.patternfly.style.Modifiers.Fill
fillMethods inherited from interface org.patternfly.style.Modifiers.PageInsets
pageInsetsMethods inherited from interface org.patternfly.style.Modifiers.Secondary
secondaryMethods inherited from interface org.patternfly.style.Modifiers.Vertical
vertical
-
Method Details
-
tabs
-
tabs
-
attach
- Specified by:
attachin interfaceAttachable
-
detach
- Specified by:
detachin interfaceAttachable
-
addItems
-
add
-
box
Description copied from interface:Modifiers.BoxAdds/removes modifier(box)- Specified by:
boxin interfaceModifiers.Box<HTMLElement, Tabs>
-
closeable
-
closeable
-
expandable
Same asexpandable(breakpoints(default_, expandable)) -
expandable
Enable expandable vertical tabs at various breakpoints (Modifiers.Vertical.vertical()should be set to true for this to work). -
fill
Description copied from interface:Modifiers.FillAdds/removes modifier(fill)- Specified by:
fillin interfaceModifiers.Fill<HTMLElement, Tabs>
-
inset
-
inset
Insets at various breakpoints. -
noBorderBottom
Same as noBorderBottom(true) -
noBorderBottom
Disables border bottom tab styling on tabs. Defaults to false. To remove the bottom border, set this prop to true. -
pageInsets
Description copied from interface:Modifiers.PageInsetsAdds/removes modifier(pageInsets)- Specified by:
pageInsetsin interfaceModifiers.PageInsets<HTMLElement, Tabs>
-
overflowHorizontal
Flag which places overflowing tabs into a menu triggered by the last tab. Unlike other flags, this can only be turned on, but not off. -
overflowHorizontal
-
noInitialSelection
By default, the first tab is selected initially. Call this method to disable thi default behaviour. -
initialSelection
-
secondary
Enables secondary styling to the tab component- Specified by:
secondaryin interfaceModifiers.Secondary<HTMLElement, Tabs>
-
showTabCount
Same as showTabCount(true) -
showTabCount
Flag which shows the count of overflowing tabs when enabled -
subtab
Same as subtab(true) -
subtab
Adds/removes modifier(subtab) -
toggleText
-
vertical
Description copied from interface:Modifiers.VerticalAdds/removes modifier(vertical)- Specified by:
verticalin interfaceModifiers.Vertical<HTMLElement, Tabs>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement, Tabs>
-
ariaLabel
-
ariaAddLabel
-
ariaScrollBackLabel
-
ariaScrollForwardLabel
-
ariaOverflowLabel
-
ariaToggleLabel
-
onAdd
- Specified by:
onAddin interfaceHasItems<HTMLElement, Tabs, Tab>
-
onAdd
-
onClose
-
onRemove
- Specified by:
onRemovein interfaceHasItems<HTMLElement, Tabs, Tab>
-
onSelect
-
onToggle
-
expanded
public boolean expanded()- Specified by:
expandedin interfaceExpandable<HTMLElement, Tabs>- Returns:
trueif the element's class list has the modifierClasses.expanded,falseotherwise.
-
collapse
public void collapse(boolean fireEvent) - Specified by:
collapsein interfaceExpandable<HTMLElement, Tabs>
-
expand
public void expand(boolean fireEvent) - Specified by:
expandin interfaceExpandable<HTMLElement, Tabs>
-
close
-
close
-
select
-
select
-
select
-
select
-
currentTab
-
tab
-
iterator
-
size
public int size()- Specified by:
sizein interfaceHasItems<HTMLElement, Tabs, Tab>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceHasItems<HTMLElement, Tabs, Tab>
-
contains
-
item
-
removeItem
- Specified by:
removeItemin interfaceHasItems<HTMLElement, Tabs, Tab>
-
clear
public void clear()- Specified by:
clearin interfaceHasItems<HTMLElement, Tabs, Tab>
-