org.uispec4j
Class MenuItem
java.lang.Object
org.uispec4j.AbstractUIComponent
org.uispec4j.MenuItem
- All Implemented Interfaces:
- UIComponent
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.
|
Constructor Summary |
MenuItem(javax.swing.JMenuItem menu)
|
MenuItem(javax.swing.JPopupMenu menu)
|
| Methods inherited from class org.uispec4j.AbstractUIComponent |
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKey |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_NAME
public static final java.lang.String TYPE_NAME
- See Also:
- Constant Field Values
SWING_CLASSES
public static final java.lang.Class[] SWING_CLASSES
MenuItem
public MenuItem(javax.swing.JMenuItem menu)
MenuItem
public MenuItem(javax.swing.JPopupMenu menu)
getDescriptionTypeName
public java.lang.String getDescriptionTypeName()
- Description copied from interface:
UIComponent
- Returns the name of the component as it will appear in the XML representation
returned by
UIComponent.getDescription().
getAwtComponent
public java.awt.Component getAwtComponent()
- Description copied from interface:
UIComponent
- Returns the Java GUI component represented by this object.
click
public void click()
triggerClick
public Trigger triggerClick()
getSubMenu
public MenuItem getSubMenu(java.lang.String subMenuItem)
- Returns a submenu given its name, or raises an exception if it was not found.
contentEquals
public Assertion contentEquals(java.lang.String... expectedNames)
contentEquals
public Assertion contentEquals(java.lang.String xmlContent)
Copyright © 2004-2010. All Rights Reserved.