Package org.patternfly.component.tabs
Class Tabs
java.lang.Object
org.patternfly.component.BaseComponentFlat<elemental2.dom.HTMLElement,Tabs>
org.patternfly.component.tabs.Tabs
- All Implemented Interfaces:
Iterable<Tab>,Attachable,Finder<elemental2.dom.HTMLElement>,HasElement<elemental2.dom.HTMLElement,,Tabs> HasHTMLElement<elemental2.dom.HTMLElement,,Tabs> IsElement<elemental2.dom.HTMLElement>,TypedBuilder<elemental2.dom.HTMLElement,,Tabs> Component,Expandable<elemental2.dom.HTMLElement,,Tabs> HasItems<elemental2.dom.HTMLElement,,Tabs, Tab> Modifiers.Box<elemental2.dom.HTMLElement,,Tabs> Modifiers.Fill<elemental2.dom.HTMLElement,,Tabs> Modifiers.PageInsets<elemental2.dom.HTMLElement,,Tabs> Modifiers.Secondary<elemental2.dom.HTMLElement,,Tabs> Modifiers.Vertical<elemental2.dom.HTMLElement,Tabs>
public class Tabs
extends BaseComponentFlat<elemental2.dom.HTMLElement,Tabs>
implements Attachable, Modifiers.Box<elemental2.dom.HTMLElement,Tabs>, Expandable<elemental2.dom.HTMLElement,Tabs>, Modifiers.Fill<elemental2.dom.HTMLElement,Tabs>, HasItems<elemental2.dom.HTMLElement,Tabs,Tab>, Modifiers.PageInsets<elemental2.dom.HTMLElement,Tabs>, Modifiers.Secondary<elemental2.dom.HTMLElement,Tabs>, Modifiers.Vertical<elemental2.dom.HTMLElement,Tabs>
Tabs allow users to navigate between views within the same page or context.
-
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(elemental2.dom.MutationRecord mutationRecord) box(boolean box) voidclear()voidvoidcloseable(CloseHandler<Tab> closeHandler) voidcollapse(boolean fireEvent) booleanvoiddetach(elemental2.dom.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) initialSelection(String identifier) inset(Breakpoints<Inset> inset) Insets at various breakpoints.Same asinset(breakpoints(default_, inset))booleanisEmpty()iterator()Same as lightTabs(true)lightTabs(boolean lightTabs) Enables lightTabs styling to the tab componentSame 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.onClose(CloseHandler<Tab> closeHandler) 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) 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()static Tabstabs()static <E extends elemental2.dom.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.BaseComponentFlat
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.patternfly.component.Expandable
collapse, expand, toggle, toggleMethods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueIdMethods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, titleMethods 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
public void attach(elemental2.dom.MutationRecord mutationRecord) - Specified by:
attachin interfaceAttachable
-
detach
public void detach(elemental2.dom.MutationRecord mutationRecord) - Specified by:
detachin interfaceAttachable
-
addItems
-
add
-
box
- Specified by:
boxin interfaceModifiers.Box<elemental2.dom.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
- Specified by:
fillin interfaceModifiers.Fill<elemental2.dom.HTMLElement,Tabs>
-
lightTabs
Same as lightTabs(true) -
lightTabs
Enables lightTabs styling to the tab component -
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 interfaceModifiers.PageInsets<elemental2.dom.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 interfaceModifiers.Secondary<elemental2.dom.HTMLElement,Tabs>
-
showTabCount
Same as showTabCount(true) -
showTabCount
Flag which shows the count of overflowing tabs when enabled -
toggleText
Text that appears in the expandable toggle. If not set, the text of the selected tab is used. -
vertical
- Specified by:
verticalin interfaceModifiers.Vertical<elemental2.dom.HTMLElement,Tabs>
-
that
- Specified by:
thatin interfaceTypedBuilder<elemental2.dom.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<elemental2.dom.HTMLElement,Tabs> - Returns:
trueif the elements class list has the modifierClasses.expanded,falseotherwise.
-
collapse
public void collapse(boolean fireEvent) - Specified by:
collapsein interfaceExpandable<elemental2.dom.HTMLElement,Tabs>
-
expand
public void expand(boolean fireEvent) - Specified by:
expandin interfaceExpandable<elemental2.dom.HTMLElement,Tabs>
-
close
-
close
-
select
-
select
-
select
-
select
-
currentTab
-
tab
-
iterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
item
-
clear
public void clear()
-