org.uispec4j
Class MenuBar

java.lang.Object
  extended by org.uispec4j.AbstractUIComponent
      extended by org.uispec4j.MenuBar
All Implemented Interfaces:
UIComponent

public class MenuBar
extends AbstractUIComponent

Wrapper for JMenuBar components.

A MenuBar is a container for top-level menu items represented by MenuItem components.


Field Summary
static java.lang.Class[] SWING_CLASSES
           
static java.lang.String TYPE_NAME
           
 
Constructor Summary
MenuBar(javax.swing.JMenuBar menuBar)
           
 
Method Summary
 Assertion contentEquals(java.lang.String... menuNames)
          Checks the names displayed in the menu, ommiting separators.
 javax.swing.JMenuBar getAwtComponent()
          Returns the Java GUI component represented by this object.
 java.lang.String getDescriptionTypeName()
          Returns the name of the component as it will appear in the XML representation returned by UIComponent.getDescription().
 MenuItem getMenu(java.lang.String menuName)
          Returns a MenuItem component representing a top-level menu (for instance File/Edit/etc.).
 
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
 

Field Detail

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
Constructor Detail

MenuBar

public MenuBar(javax.swing.JMenuBar menuBar)
Method Detail

getAwtComponent

public javax.swing.JMenuBar getAwtComponent()
Description copied from interface: UIComponent
Returns the Java GUI component represented by this object.


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().


getMenu

public MenuItem getMenu(java.lang.String menuName)
Returns a MenuItem component representing a top-level menu (for instance File/Edit/etc.). That MenuItem can be used then to access the individual menu commands, or other submenus.


contentEquals

public Assertion contentEquals(java.lang.String... menuNames)
Checks the names displayed in the menu, ommiting separators.



Copyright © 2004-2010. All Rights Reserved.