Package org.patternfly.component.menu
Class MenuItem
java.lang.Object
org.patternfly.component.SubComponent<E,B>
org.patternfly.component.menu.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> WithText<HTMLElement,,MenuItem> Modifiers.Disabled<HTMLElement,MenuItem>
public class MenuItem
extends SubComponent<E,B>
implements Modifiers.Disabled<HTMLElement,MenuItem>, WithText<HTMLElement,MenuItem>, WithIcon<HTMLElement,MenuItem>, WithIconAndText<HTMLElement,MenuItem>, Attachable
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic MenuItemactionMenuItem(String id, String text) Create a new menu item with typeMenuItemType.action.add(MenuItemAction itemAction) addAction(MenuItemAction itemAction) static MenuItemasyncMenuItem(String id, String text, Function<MenuList, elemental2.promise.Promise<List<MenuItem>>> loadItems) voidattach(MutationRecord mutationRecord) static MenuItemcheckboxMenuItem(String id, String text) Create a new menu item with typeMenuItemType.link.danger()description(HTMLElement element) description(String description) disabled(boolean disabled) external()iconAndText(Element icon, String text, IconPosition iconPosition) static MenuItemlinkMenuItem(String id, String text, String href) Create a new menu item with typeMenuItemType.link.static MenuItemmenuItem(String id, MenuItemType type) Create a new menu item with the specified type.onClick(ComponentHandler<MenuItem> handler) selected()text()text(HTMLElement element) that()Methods inherited from class org.patternfly.component.SubComponent
elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.Attachable
detachMethods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, 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 org.patternfly.style.Modifiers.Disabled
disabled, isDisabledMethods inherited from interface org.patternfly.component.WithIconAndText
iconAndText, iconAndText
-
Field Details
-
id
-
-
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:
attachin interfaceAttachable
-
danger
-
selected
-
disabled
- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement,MenuItem>
-
text
- Specified by:
textin interfaceWithText<HTMLElement,MenuItem>
-
text
-
href
-
external
-
description
-
description
-
icon
- Specified by:
iconin interfaceWithIcon<HTMLElement,MenuItem>
-
removeIcon
- Specified by:
removeIconin interfaceWithIcon<HTMLElement,MenuItem>
-
iconAndText
- Specified by:
iconAndTextin interfaceWithIconAndText<HTMLElement,MenuItem>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,MenuItem>
-
onClick
-
text
- Specified by:
textin interfaceWithText<HTMLElement,MenuItem>
-