Package org.patternfly.component.tabs
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> org.patternfly.style.Modifiers.Box<HTMLElement,,Tabs> org.patternfly.style.Modifiers.Fill<HTMLElement,,Tabs> org.patternfly.style.Modifiers.PageInsets<HTMLElement,,Tabs> org.patternfly.style.Modifiers.Secondary<HTMLElement,,Tabs> org.patternfly.style.Modifiers.Vertical<HTMLElement,Tabs>
public class Tabs
extends BaseComponent<HTMLElement,Tabs>
implements Attachable, org.patternfly.style.Modifiers.Box<HTMLElement,Tabs>, Expandable<HTMLElement,Tabs>, org.patternfly.style.Modifiers.Fill<HTMLElement,Tabs>, HasItems<HTMLElement,Tabs,Tab>, org.patternfly.style.Modifiers.PageInsets<HTMLElement,Tabs>, org.patternfly.style.Modifiers.Secondary<HTMLElement,Tabs>, org.patternfly.style.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) voidclear()voidvoidvoidcollapse(boolean fireEvent) booleanvoiddetach(MutationRecord mutationRecord) voidexpand(boolean fireEvent) expandable(org.patternfly.style.Breakpoints<org.patternfly.style.ExpandableModifier> expandable) Enable expandable vertical tabs at various breakpoints (Modifiers.Vertical.vertical()should be set to true for this to work).expandable(org.patternfly.style.ExpandableModifier expandable) Same asexpandable(breakpoints(default_, expandable))booleanexpanded()fill(boolean fill) initialSelection(String identifier) inset(org.patternfly.style.Breakpoints<org.patternfly.style.Inset> inset) Insets at various breakpoints.inset(org.patternfly.style.Inset inset) 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.Callback for the add button.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) 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) Methods inherited from class org.patternfly.component.BaseComponent
componentType, elementMethods 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
- Specified by:
addItemsin interfaceHasItems<HTMLElement,Tabs, Tab>
-
add
- Specified by:
addin interfaceHasItems<HTMLElement,Tabs, Tab>
-
box
- Specified by:
boxin interfaceorg.patternfly.style.Modifiers.Box<HTMLElement,Tabs>
-
closeable
-
closeable
-
expandable
Same asexpandable(breakpoints(default_, expandable)) -
expandable
public Tabs expandable(org.patternfly.style.Breakpoints<org.patternfly.style.ExpandableModifier> expandable) Enable expandable vertical tabs at various breakpoints (Modifiers.Vertical.vertical()should be set to true for this to work). -
fill
- Specified by:
fillin interfaceorg.patternfly.style.Modifiers.Fill<HTMLElement,Tabs>
-
inset
Same asinset(breakpoints(default_, 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
- Specified by:
pageInsetsin interfaceorg.patternfly.style.Modifiers.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
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. -
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 interfaceorg.patternfly.style.Modifiers.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
Text that appears in the expandable toggle. If not set, the text of the selected tab is used. -
vertical
- Specified by:
verticalin interfaceorg.patternfly.style.Modifiers.Vertical<HTMLElement,Tabs>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Tabs>
-
ariaLabel
Provides an accessible label for the tabs. Labels should be unique for each set of tabs that are present on a page. When component is set to nav, this prop should be defined to differentiate the tabs from other navigation regions on the page. -
ariaAddLabel
Aria-label for the add button. -
ariaScrollBackLabel
Aria-label for the back scroll button -
ariaScrollForwardLabel
Aria-label for the forward scroll button -
ariaOverflowLabel
The aria label applied to the button which toggles the tab overflow menu -
ariaToggleLabel
Aria-label for the expandable toggle -
onAdd
Callback for the add button. Passing this property inserts the add button. -
onClose
-
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
- Specified by:
containsin interfaceHasItems<HTMLElement,Tabs, Tab>
-
item
- Specified by:
itemin interfaceHasItems<HTMLElement,Tabs, Tab>
-
clear
public void clear()- Specified by:
clearin interfaceHasItems<HTMLElement,Tabs, Tab>
-