public class MenuItem extends AbstractUIComponent
Wrapper for menu items (commands or sub-menus) such as JMenu, JMenuItem or JPopupMenu.
A given MenuItem can be either a command, or a sub-menu containing other MenuItem components.| Modifier and Type | Field and Description |
|---|---|
static Class[] |
SWING_CLASSES |
static String |
TYPE_NAME |
| Constructor and Description |
|---|
MenuItem(JMenuItem menu) |
MenuItem(JPopupMenu menu) |
| Modifier and Type | Method and Description |
|---|---|
void |
click() |
Assertion |
contentEquals(String... expectedNames) |
Assertion |
contentEquals(String xmlContent) |
Component |
getAwtComponent()
Returns the Java GUI component represented by this object.
|
String |
getDescriptionTypeName()
Returns the name of the component as it will appear in the XML representation
returned by
UIComponent.getDescription(). |
MenuItem |
getSubMenu(String subMenuItem)
Returns a submenu given its name, or raises an exception if it was not found.
|
Trigger |
triggerClick() |
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKeypublic static final String TYPE_NAME
public static final Class[] SWING_CLASSES
public MenuItem(JMenuItem menu)
public MenuItem(JPopupMenu menu)
public String getDescriptionTypeName()
UIComponentUIComponent.getDescription().public Component getAwtComponent()
UIComponentpublic void click()
public Trigger triggerClick()
public MenuItem getSubMenu(String subMenuItem)
Copyright © 2004–2016. All rights reserved.