Package org.patternfly.component.menu
Class MenuItem
- java.lang.Object
-
- org.patternfly.component.SubComponent<HTMLElement,MenuItem>
-
- org.patternfly.component.menu.MenuItem
-
- All Implemented Interfaces:
Container<HTMLElement,MenuItem>,Finder<HTMLElement>,HasElement<HTMLElement,MenuItem>,HasHTMLElement<HTMLElement,MenuItem>,IsElement<HTMLElement>,TypedBuilder<HTMLElement,MenuItem>,ComponentReference<Menu>,Modifiers.Disabled<HTMLElement,MenuItem>
public class MenuItem extends SubComponent<HTMLElement,MenuItem> implements Modifiers.Disabled<HTMLElement,MenuItem>, ComponentReference<Menu>
-
-
Method Summary
-
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.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.Disabled
disabled
-
-
-
-
Field Detail
-
id
public final String id
-
-
Method Detail
-
actionMenuItem
public static MenuItem actionMenuItem(String id, String text)
Create a new menu item with typeMenuItemType.action.
-
linkMenuItem
public static MenuItem linkMenuItem(String id, String text, String href)
Create a new menu item with typeMenuItemType.link.
-
checkboxMenuItem
public static MenuItem checkboxMenuItem(String id, String text)
Create a new menu item with typeMenuItemType.link.
-
menuItem
public static MenuItem menuItem(String id, MenuItemType type)
Create a new menu item with the specified type. Use this method, if you want full control over the text and type.
-
passComponent
public void passComponent(Menu menu)
- Specified by:
passComponentin interfaceComponentReference<Menu>
-
that
public MenuItem that()
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,MenuItem>
-
addAction
public MenuItem addAction(MenuItemAction itemAction)
-
add
public MenuItem add(MenuItemAction itemAction)
-
danger
public MenuItem danger()
-
selected
public MenuItem selected()
-
disabled
public MenuItem disabled(boolean disabled)
Description copied from interface:Modifiers.DisabledAdds/removes modifier(disabled)- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement,MenuItem>
-
text
public MenuItem text(HTMLElement element)
-
external
public MenuItem external()
-
description
public MenuItem description(HTMLElement element)
-
icon
public MenuItem icon(PredefinedIcon predefinedIcon)
-
icon
public MenuItem icon(HTMLElement element)
-
onClick
public MenuItem onClick(ActionHandler<MenuItem> actionHandler)
-
-