Package org.patternfly.component.menu
Class MenuItem
- All Implemented Interfaces:
Attachable
,Container<HTMLElement,
,MenuItem> Finder<HTMLElement>
,HasElement<HTMLElement,
,MenuItem> HasHTMLElement<HTMLElement,
,MenuItem> IsElement<HTMLElement>
,TypedBuilder<HTMLElement,
,MenuItem> WithIcon<HTMLElement,
,MenuItem> WithIconAndText<HTMLElement,
,MenuItem> WithIdentifier<HTMLElement,
,MenuItem> WithText<HTMLElement,
,MenuItem> ComponentContext<HTMLElement,
,MenuItem> Modifiers.Disabled<HTMLElement,
MenuItem>
public class MenuItem
extends SubComponent<HTMLElement,MenuItem>
implements ComponentContext<HTMLElement,MenuItem>, Modifiers.Disabled<HTMLElement,MenuItem>, WithIdentifier<HTMLElement,MenuItem>, WithText<HTMLElement,MenuItem>, WithIcon<HTMLElement,MenuItem>, WithIconAndText<HTMLElement,MenuItem>, Attachable
-
Method Summary
Modifier and TypeMethodDescriptionstatic MenuItem
actionMenuItem
(String identifier, String text) Create a new menu item with typeMenuItemType.action
.add
(MenuItemAction itemAction) addAction
(MenuItemAction itemAction) static MenuItem
asyncMenuItem
(String identifier, String text, Function<MenuList, elemental2.promise.Promise<List<MenuItem>>> loadItems) void
attach
(MutationRecord mutationRecord) static MenuItem
checkboxMenuItem
(String identifier, String text) Create a new menu item with typeMenuItemType.link
.danger()
description
(HTMLElement element) description
(String description) disabled
(boolean disabled) external()
<T> T
boolean
iconAndText
(Element icon, String text, IconPosition iconPosition) static MenuItem
linkMenuItem
(String identifier, String text, String href) Create a new menu item with typeMenuItemType.link
.static MenuItem
menuItem
(String identifier, MenuItemType type) Create a new menu item with the specified type.onClick
(ComponentHandler<MenuItem> handler) selected()
<T> MenuItem
text()
text
(HTMLElement element) that()
Methods inherited from class org.patternfly.component.SubComponent
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.patternfly.core.ComponentContext
get, get
Methods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAll
Methods 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, uniqueId
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, title
Methods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabled
Methods inherited from interface org.patternfly.component.WithIconAndText
iconAndText, iconAndText
-
Method Details
-
actionMenuItem
Create a new menu item with typeMenuItemType.action
. -
linkMenuItem
Create a new menu item with typeMenuItemType.link
. -
checkboxMenuItem
Create a new menu item with typeMenuItemType.link
. -
asyncMenuItem
-
attach
- Specified by:
attach
in interfaceAttachable
-
danger
-
selected
-
disabled
- Specified by:
disabled
in interfaceModifiers.Disabled<HTMLElement,
MenuItem>
-
text
- Specified by:
text
in interfaceWithText<HTMLElement,
MenuItem>
-
text
-
href
-
external
-
description
-
description
-
icon
- Specified by:
icon
in interfaceWithIcon<HTMLElement,
MenuItem>
-
removeIcon
- Specified by:
removeIcon
in interfaceWithIcon<HTMLElement,
MenuItem>
-
iconAndText
- Specified by:
iconAndText
in interfaceWithIconAndText<HTMLElement,
MenuItem>
-
store
- Specified by:
store
in interfaceComponentContext<HTMLElement,
MenuItem>
-
that
- Specified by:
that
in interfaceTypedBuilder<HTMLElement,
MenuItem>
-
onClick
-
identifier
- Specified by:
identifier
in interfaceWithIdentifier<HTMLElement,
MenuItem>
-
text
- Specified by:
text
in interfaceWithText<HTMLElement,
MenuItem>
-
has
- Specified by:
has
in interfaceComponentContext<HTMLElement,
MenuItem>
-
get
- Specified by:
get
in interfaceComponentContext<HTMLElement,
MenuItem>
-