Package org.patternfly.component.menu
Class Menu
- java.lang.Object
-
- org.patternfly.component.BaseComponent<HTMLDivElement,Menu>
-
- org.patternfly.component.menu.Menu
-
- All Implemented Interfaces:
Attachable,Container<HTMLDivElement,Menu>,Finder<HTMLDivElement>,HasElement<HTMLDivElement,Menu>,HasHTMLElement<HTMLDivElement,Menu>,IsElement<HTMLDivElement>,TypedBuilder<HTMLDivElement,Menu>,Component,Modifiers.Plain<HTMLDivElement,Menu>
public class Menu extends BaseComponent<HTMLDivElement,Menu> implements Attachable, Modifiers.Plain<HTMLDivElement,Menu>
A menu is a list of options or actions that users can choose from. It can be used in a variety of contexts whenever the user needs to choose between multiple values, options, or actions. A menu is most often paired with aMenuToggleas its trigger, but can also be used inline or can be attached to other interactable elements to toggle it open and close.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Menuadd(MenuContent content)Menuadd(MenuSearchInput searchInput)MenuaddContent(MenuContent content)MenuaddDivider()MenuaddFooter(String text)Shortcut foraddFooter(menuFooter(text))MenuaddFooter(MenuFooter footer)MenuaddHeader(String text)Shortcut foraddHeader(menuHeader(text))MenuaddHeader(MenuHeader header)MenuaddSearchInput(MenuSearchInput searchInput)MenuaddSearchInput(MenuSearchInput searchInput, boolean noSeparator)voidattach(MutationRecord mutationRecord)Menufavorites()Menuflyout()Menuheight(String height)Sets the--pf-v5-c-menu__content--MaxHeightvariable to the specified valuestatic Menumenu()static Menumenu(SelectionMode selectionMode)MenuonAction(MenuActionHandler actionHandler)MenuonMultiSelect(MultiSelectHandler<MenuItem> selectHandler)MenuonSingleSelect(SelectHandler<MenuItem> selectHandler)Menuscrollable()voidselect(String itemId)voidselect(String itemId, boolean fireEvent)voidselect(MenuItem item)voidselect(MenuItem item, boolean fireEvent)voidselect(MenuItem item, boolean selected, boolean fireEvent)Menuthat()-
Methods inherited from class org.patternfly.component.BaseComponent
componentType, element
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.elemento.Attachable
detach
-
Methods inherited from interface org.jboss.elemento.Container
add, add, addAll, addAll, addAll, addAll, addAll
-
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, css, id, id, innerHtml, on, textContent, toggle, toggle, toggle
-
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, title
-
Methods inherited from interface org.patternfly.core.Modifiers.Plain
plain, plain
-
-
-
-
Method Detail
-
menu
public static Menu menu()
-
menu
public static Menu menu(SelectionMode selectionMode)
-
attach
public void attach(MutationRecord mutationRecord)
- Specified by:
attachin interfaceAttachable
-
that
public Menu that()
- Specified by:
thatin interfaceTypedBuilder<HTMLDivElement,Menu>
-
addHeader
public Menu addHeader(MenuHeader header)
-
addContent
public Menu addContent(MenuContent content)
-
add
public Menu add(MenuContent content)
-
addFooter
public Menu addFooter(MenuFooter footer)
-
addSearchInput
public Menu addSearchInput(MenuSearchInput searchInput)
-
addSearchInput
public Menu addSearchInput(MenuSearchInput searchInput, boolean noSeparator)
-
add
public Menu add(MenuSearchInput searchInput)
-
addDivider
public Menu addDivider()
-
onSingleSelect
public Menu onSingleSelect(SelectHandler<MenuItem> selectHandler)
-
onMultiSelect
public Menu onMultiSelect(MultiSelectHandler<MenuItem> selectHandler)
-
onAction
public Menu onAction(MenuActionHandler actionHandler)
-
select
public void select(String itemId)
-
select
public void select(String itemId, boolean fireEvent)
-
select
public void select(MenuItem item)
-
select
public void select(MenuItem item, boolean fireEvent)
-
select
public void select(MenuItem item, boolean selected, boolean fireEvent)
-
flyout
public Menu flyout()
-
scrollable
public Menu scrollable()
-
favorites
public Menu favorites()
-
-