public class MenuBar extends AbstractUIComponent
Wrapper for JMenuBar components.
A MenuBar is a container for top-level menu items represented byMenuItem
components.Modifier and Type | Field and Description |
---|---|
static Class[] |
SWING_CLASSES |
static String |
TYPE_NAME |
Modifier and Type | Method and Description |
---|---|
Assertion |
contentEquals(String... menuNames)
Checks the names displayed in the menu, ommiting separators.
|
JMenuBar |
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 |
getMenu(String menuName)
Returns a
MenuItem component representing a top-level menu (for instance File/Edit/etc.). |
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKey
public static final String TYPE_NAME
public static final Class[] SWING_CLASSES
public MenuBar(JMenuBar menuBar)
public JMenuBar getAwtComponent()
UIComponent
public String getDescriptionTypeName()
UIComponent
UIComponent.getDescription()
.public MenuItem getMenu(String menuName)
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.Copyright © 2004–2016. All rights reserved.