org.netbeans.jemmy.operators
public class JMenuBarOperator extends JComponentOperator implements Outputable, Timeoutable
Timeouts
Modifier and Type | Class and Description |
---|---|
static class |
JMenuBarOperator.JMenuBarFinder
Checks component type.
|
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder
ContainerOperator.ContainerFinder
Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapCharacterAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator
Modifier and Type | Field and Description |
---|---|
static String |
SUBMENU_PREFIX_DPROP
Identifier for a "submenu" properties.
|
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP
CLASS_DPROP, TO_STRING_DPROP
Constructor and Description |
---|
JMenuBarOperator(ContainerOperator cont)
Constructor.
|
JMenuBarOperator(ContainerOperator cont,
ComponentChooser chooser)
Constructs a JMenuBarOperator object.
|
JMenuBarOperator(ContainerOperator cont,
ComponentChooser chooser,
int index)
Constructs a JMenuBarOperator object.
|
JMenuBarOperator(JMenuBar b)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
JMenu |
add(JMenu jMenu)
Maps
JMenuBar.add(JMenu) through queue |
void |
closeSubmenus()
Closes all expanded submenus.
|
void |
copyEnvironment(Operator anotherOperator)
Copies all environment (output, timeouts,
visualizer) from another operator.
|
static JMenuBar |
findJMenuBar(Container cont)
Waits JMenuBar in container.
|
static JMenuBar |
findJMenuBar(JDialog dialog)
Searches JMenuBar in dialog.
|
static JMenuBar |
findJMenuBar(JFrame frame)
Searches JMenuBar in frame.
|
int |
getComponentIndex(Component component)
Maps
JMenuBar.getComponentIndex(Component) through queue |
Hashtable |
getDump()
Returns information about component.
|
JMenu |
getHelpMenu()
Maps
JMenuBar.getHelpMenu() through queue |
Insets |
getMargin()
Maps
JMenuBar.getMargin() through queue |
JMenu |
getMenu(int i)
Maps
JMenuBar.getMenu(int) through queue |
int |
getMenuCount()
Maps
JMenuBar.getMenuCount() through queue |
TestOut |
getOutput()
Returns print output streams or writers.
|
SingleSelectionModel |
getSelectionModel()
Maps
JMenuBar.getSelectionModel() through queue |
MenuElement[] |
getSubElements()
Maps
JMenuBar.getSubElements() through queue |
Timeouts |
getTimeouts()
Return current timeouts.
|
MenuBarUI |
getUI()
Maps
JMenuBar.getUI() through queue |
boolean |
isBorderPainted()
Maps
JMenuBar.isBorderPainted() through queue |
boolean |
isSelected()
Maps
JMenuBar.isSelected() through queue |
void |
menuSelectionChanged(boolean b)
Maps
JMenuBar.menuSelectionChanged(boolean) through queue |
void |
processKeyEvent(KeyEvent keyEvent,
MenuElement[] menuElement,
MenuSelectionManager menuSelectionManager)
Maps
JMenuBar.processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager) through queue |
void |
processMouseEvent(MouseEvent mouseEvent,
MenuElement[] menuElement,
MenuSelectionManager menuSelectionManager)
Maps
JMenuBar.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) through queue |
JMenuItem |
pushMenu(ComponentChooser[] choosers)
Pushes menu.
|
JMenuItem |
pushMenu(String path)
Pushes menu.
|
JMenuItem |
pushMenu(String[] names)
Pushes menu.
|
JMenuItem |
pushMenu(String[] names,
boolean ce,
boolean ccs)
Deprecated.
Use pushMenu(String[]) or pushMenu(String[], StringComparator)
|
JMenuItem |
pushMenu(String[] names,
Operator.StringComparator comparator)
Pushes menu.
|
JMenuItem |
pushMenu(String path,
Operator.StringComparator comparator)
Pushes menu.
|
JMenuItem |
pushMenu(String path,
String delim)
Pushes menu.
|
JMenuItem |
pushMenu(String path,
String delim,
boolean ce,
boolean ccs)
Deprecated.
Use pushMenu(String, String) or pushMenu(String, String, StringComparator)
|
JMenuItem |
pushMenu(String path,
String delim,
Operator.StringComparator comparator)
Pushes menu.
|
void |
pushMenuNoBlock(ComponentChooser[] choosers)
Executes
pushMenu(choosers) in a separate thread. |
void |
pushMenuNoBlock(String path)
Executes
pushMenu(path) in a separate thread. |
void |
pushMenuNoBlock(String[] names)
Executes
pushMenu(names) in a separate thread. |
void |
pushMenuNoBlock(String[] names,
boolean ce,
boolean ccs)
Deprecated.
Use pushMenuNoBlock(String[]) or pushMenuNoBlock(String[], StringComparator)
|
void |
pushMenuNoBlock(String[] names,
Operator.StringComparator comparator)
Executes
pushMenu(names, ce, ccs) in a separate thread. |
void |
pushMenuNoBlock(String path,
Operator.StringComparator comparator)
Executes
pushMenu(names, comparator) in a separate thread. |
void |
pushMenuNoBlock(String path,
String delim)
Executes
pushMenu(path, delim) in a separate thread. |
void |
pushMenuNoBlock(String path,
String delim,
boolean ce,
boolean ccs)
Deprecated.
Use pushMenuNoBlock(String, String) or pushMenuNoBlock(String, String, StringComparator)
|
void |
pushMenuNoBlock(String path,
String delim,
Operator.StringComparator comparator)
Executes
pushMenu(names, delim, comparator) in a separate thread. |
void |
setBorderPainted(boolean b)
Maps
JMenuBar.setBorderPainted(boolean) through queue |
void |
setHelpMenu(JMenu jMenu)
Maps
JMenuBar.setHelpMenu(JMenu) through queue |
void |
setMargin(Insets insets)
Maps
JMenuBar.setMargin(Insets) through queue |
void |
setOutput(TestOut out)
Defines print output streams or writers.
|
void |
setSelected(Component component)
Maps
JMenuBar.setSelected(Component) through queue |
void |
setSelectionModel(SingleSelectionModel singleSelectionModel)
Maps
JMenuBar.setSelectionModel(SingleSelectionModel) through queue |
void |
setTimeouts(Timeouts times)
Defines current timeouts.
|
void |
setUI(MenuBarUI menuBarUI)
Maps
JMenuBar.setUI(MenuBarUI) through queue |
JMenuItemOperator |
showMenuItem(ComponentChooser[] choosers) |
JMenuItemOperator |
showMenuItem(String path)
Expands all menus to show menu item specified by a
path parameter. |
JMenuItemOperator |
showMenuItem(String[] path)
Expands all menus to show menu item specified by a
path parameter. |
JMenuItemOperator |
showMenuItem(String[] path,
Operator.StringComparator comparator)
Expends all menus to show menu item specified by a
path parameter. |
JMenuItemOperator |
showMenuItem(String path,
Operator.StringComparator comparator)
Expands all menus to show menu item specified by a
path parameter. |
JMenuItemOperator |
showMenuItem(String path,
String delim)
Expands all menus to show menu item specified by a
path parameter. |
JMenuItemOperator |
showMenuItem(String path,
String delim,
Operator.StringComparator comparator)
Expands all menus to show menu item specified by a
path parameter. |
JMenuItemOperator[] |
showMenuItems(ComponentChooser[] choosers) |
JMenuItemOperator[] |
showMenuItems(String path)
Shows submenu of menu specified by a
path parameter. |
JMenuItemOperator[] |
showMenuItems(String[] path)
Shows submenu of menu specified by a
path parameter. |
JMenuItemOperator[] |
showMenuItems(String[] path,
Operator.StringComparator comparator)
Shows submenu of menu specified by a
path parameter. |
JMenuItemOperator[] |
showMenuItems(String path,
Operator.StringComparator comparator)
Shows submenu of menu specified by a
path parameter. |
JMenuItemOperator[] |
showMenuItems(String path,
String delim)
Shows submenu of menu specified by a
path parameter. |
JMenuItemOperator[] |
showMenuItems(String path,
String delim,
Operator.StringComparator comparator)
Shows submenu of menu specified by a
path parameter. |
static JMenuBar |
waitJMenuBar(Container cont)
Searches JMenuBar in container.
|
static JMenuBar |
waitJMenuBar(JDialog dialog)
Waits JMenuBar in dialog.
|
static JMenuBar |
waitJMenuBar(JFrame frame)
Waits JMenuBar in frame.
|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, createToolTip, findJComponent, findJComponent, findJComponent, findJComponent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAutoscrolls, getBorder, getCenterXForClick, getCenterYForClick, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getInsets, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWindowContainerOperator, grabFocus, isFocusCycleRoot, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, showToolTip, unregisterKeyboardAction, updateUI, waitJComponent, waitJComponent, waitJComponent, waitJComponent, waitToolTip
add, add, add, add, add, addContainerListener, createSubOperator, createSubOperator, findComponentAt, findComponentAt, findContainer, findContainer, findContainer, findContainer, findContainerUnder, findContainerUnder, findSubComponent, findSubComponent, getComponent, getComponentCount, getComponents, getInsets, getLayout, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, waitContainer, waitContainer, waitContainer, waitContainer, waitSubComponent, waitSubComponent
activateWindow, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, checkImage, checkImage, clickForPopup, clickForPopup, clickForPopup, clickForPopup, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, contains, contains, createImage, createImage, dispatchEvent, doLayout, dragMouse, dragMouse, dragMouse, dragNDrop, dragNDrop, dragNDrop, enableInputMethods, enterMouse, exitMouse, findComponent, findComponent, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getCenterX, getCenterY, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getContainer, getContainers, getCursor, getDropTarget, getEventDispatcher, getFocus, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getSize, getSource, getToolkit, getTreeLock, getWidth, getWindow, getX, getY, hasFocus, imageUpdate, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, list, list, list, list, list, makeComponentVisible, moveMouse, paint, paintAll, prepareImage, prepareImage, pressKey, pressKey, pressMouse, pressMouse, print, printAll, pushKey, pushKey, releaseKey, releaseKey, releaseMouse, releaseMouse, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, transferFocus, typeKey, typeKey, typeKey, update, validate, waitComponent, waitComponent, waitComponent, waitComponent, waitComponentEnabled, waitComponentShowing, waitComponentVisible, waitHasFocus, wtComponentEnabled
addOperatorPackage, addToDump, addToDump, createOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getEnvironmentOperator, getParentPath, getParentPath, getPathParser, getPopupMouseButton, getProperties, getQueueTool, getVerification, getVisualizer, isCaptionEqual, isCaptionEqual, isCaptionEqual, lockQueue, parseString, parseString, printDump, produceNoBlocking, produceNoBlocking, produceTimeRestricted, produceTimeRestricted, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, setCharBindingMap, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setPathParser, setProperties, setVerification, setVisualizer, toStringSource, unlockAndThrow, unlockQueue, waitState
public static final String SUBMENU_PREFIX_DPROP
getDump()
,
Constant Field Valuespublic JMenuBarOperator(JMenuBar b)
b
- a componentpublic JMenuBarOperator(ContainerOperator cont, ComponentChooser chooser, int index)
cont
- a containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.public JMenuBarOperator(ContainerOperator cont, ComponentChooser chooser)
cont
- a containerchooser
- a component chooser specifying searching criteria.public JMenuBarOperator(ContainerOperator cont)
cont
- Operator pointing a container to search component in.TimeoutExpiredException
public static JMenuBar findJMenuBar(JFrame frame)
frame
- a containerpublic static JMenuBar findJMenuBar(JDialog dialog)
dialog
- a containerpublic static JMenuBar waitJMenuBar(Container cont)
cont
- a containerTimeoutExpiredException
public static JMenuBar waitJMenuBar(JFrame frame)
frame
- a containerTimeoutExpiredException
public static JMenuBar waitJMenuBar(JDialog dialog)
dialog
- a containerTimeoutExpiredException
public static JMenuBar findJMenuBar(Container cont)
cont
- a containerpublic void setOutput(TestOut out)
Outputable
setOutput
in interface Outputable
setOutput
in class JComponentOperator
out
- Identify the streams or writers used for print output.Outputable.getOutput()
public TestOut getOutput()
Outputable
getOutput
in interface Outputable
getOutput
in class JComponentOperator
Outputable.setOutput(org.netbeans.jemmy.TestOut)
public void setTimeouts(Timeouts times)
Timeoutable
setTimeouts
in interface Timeoutable
setTimeouts
in class JComponentOperator
times
- A collection of timeout assignments.Timeoutable.getTimeouts()
public Timeouts getTimeouts()
Timeoutable
getTimeouts
in interface Timeoutable
getTimeouts
in class JComponentOperator
Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)
public void copyEnvironment(Operator anotherOperator)
Operator
copyEnvironment
in class ComponentOperator
anotherOperator
- an operator to copy the environment to.public JMenuItem pushMenu(ComponentChooser[] choosers)
choosers
- Array of choosers to find menuItems to push.TimeoutExpiredException
public void pushMenuNoBlock(ComponentChooser[] choosers)
pushMenu(choosers)
in a separate thread.choosers
- Array of choosers to find menuItems to push.pushMenu(ComponentChooser[])
public JMenuItem pushMenu(String[] names, Operator.StringComparator comparator)
names
- an array of menu texts.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItem pushMenu(String[] names, boolean ce, boolean ccs)
names
- Menu items texts.ce
- Compare text exactly.ccs
- Compare text case sensitively.TimeoutExpiredException
Operator.isCaptionEqual(String, String, boolean, boolean)
public void pushMenuNoBlock(String[] names, Operator.StringComparator comparator)
pushMenu(names, ce, ccs)
in a separate thread.names
- an array of menu texts.comparator
- a string comparision algorithmpublic void pushMenuNoBlock(String[] names, boolean ce, boolean ccs)
pushMenu(names, ce, ccs)
in a separate thread.names
- Menu items texts.ce
- Compare text exactly.ccs
- Compare text case sensitively.pushMenu(String[], boolean,boolean)
public JMenuItem pushMenu(String[] names)
names
- Menu items texts.TimeoutExpiredException
public void pushMenuNoBlock(String[] names)
pushMenu(names)
in a separate thread.names
- Menu items texts.pushMenu(String[])
public JMenuItem pushMenu(String path, String delim, Operator.StringComparator comparator)
path
- a menu path.delim
- a path delimiter.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItem pushMenu(String path, Operator.StringComparator comparator)
path
- a menu path.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItem pushMenu(String path, String delim, boolean ce, boolean ccs)
path
- String menupath representation ("File/New", for example).delim
- String menupath divider ("/").ce
- Compare text exactly.ccs
- Compare text case sensitively.TimeoutExpiredException
Operator.isCaptionEqual(String, String, boolean, boolean)
public void pushMenuNoBlock(String path, String delim, Operator.StringComparator comparator)
pushMenu(names, delim, comparator)
in a separate thread.path
- a menu path.delim
- a path delimiter.comparator
- a string comparision algorithmpublic void pushMenuNoBlock(String path, Operator.StringComparator comparator)
pushMenu(names, comparator)
in a separate thread.
Uses PathParser assigned to this operator.path
- a menu path.comparator
- a string comparision algorithmpublic void pushMenuNoBlock(String path, String delim, boolean ce, boolean ccs)
pushMenu(path, delim, ce, ccs)
in a separate thread.path
- String menupath representation ("File/New", for example).delim
- String menupath divider ("/").ce
- Compare text exactly.ccs
- Compare text case sensitively.pushMenu(org.netbeans.jemmy.ComponentChooser[])
public JMenuItem pushMenu(String path, String delim)
path
- String menupath representation ("File/New", for example).delim
- String menupath divider ("/").TimeoutExpiredException
public JMenuItem pushMenu(String path)
path
- String menupath representation ("File/New", for example).TimeoutExpiredException
public void pushMenuNoBlock(String path, String delim)
pushMenu(path, delim)
in a separate thread.path
- String menupath representation ("File/New", for example).delim
- String menupath divider ("/").public void pushMenuNoBlock(String path)
pushMenu(path)
in a separate thread.path
- String menupath representation ("File/New", for example).public JMenuItemOperator[] showMenuItems(ComponentChooser[] choosers)
public JMenuItemOperator[] showMenuItems(String[] path, Operator.StringComparator comparator)
path
parameter.path
- an array of menu texts.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItemOperator[] showMenuItems(String[] path)
path
parameter.
Uses StringComparator assigned to the operator.path
- an array of menu texts.TimeoutExpiredException
public JMenuItemOperator[] showMenuItems(String path, String delim, Operator.StringComparator comparator)
path
parameter.path
- a string identifying the menu path.delim
- a path delimiter.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItemOperator[] showMenuItems(String path, Operator.StringComparator comparator)
path
parameter.
Uses PathParser assigned to this operator.path
- a string identifying the menu path.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItemOperator[] showMenuItems(String path, String delim)
path
parameter.
Uses StringComparator assigned to the operator.path
- a string identifying the menu path.delim
- a path delimiter.TimeoutExpiredException
public JMenuItemOperator[] showMenuItems(String path)
path
parameter.
Uses PathParser assigned to this operator.
Uses StringComparator assigned to the operator.path
- a string identifying the menu path.TimeoutExpiredException
public JMenuItemOperator showMenuItem(ComponentChooser[] choosers)
public JMenuItemOperator showMenuItem(String[] path, Operator.StringComparator comparator)
path
parameter.path
- an array of menu texts.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItemOperator showMenuItem(String[] path)
path
parameter.path
- an array of menu texts.TimeoutExpiredException
public JMenuItemOperator showMenuItem(String path, String delim, Operator.StringComparator comparator)
path
parameter.path
- a string identifying the menu path.delim
- a path delimiter.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItemOperator showMenuItem(String path, Operator.StringComparator comparator)
path
parameter.
Uses PathParser assigned to this operator.path
- a string identifying the menu path.comparator
- a string comparision algorithmTimeoutExpiredException
public JMenuItemOperator showMenuItem(String path, String delim)
path
parameter.
Uses StringComparator assigned to the operator.path
- a string identifying the menu path.delim
- a path delimiter.TimeoutExpiredException
public JMenuItemOperator showMenuItem(String path)
path
parameter.
Uses PathParser assigned to this operator.
Uses StringComparator assigned to the operator.path
- a string identifying the menu path.TimeoutExpiredException
public void closeSubmenus()
public Hashtable getDump()
ComponentOperator
getDump
in class JComponentOperator
public int getComponentIndex(Component component)
JMenuBar.getComponentIndex(Component)
through queuepublic JMenu getHelpMenu()
JMenuBar.getHelpMenu()
through queuepublic Insets getMargin()
JMenuBar.getMargin()
through queuepublic JMenu getMenu(int i)
JMenuBar.getMenu(int)
through queuepublic int getMenuCount()
JMenuBar.getMenuCount()
through queuepublic SingleSelectionModel getSelectionModel()
JMenuBar.getSelectionModel()
through queuepublic MenuElement[] getSubElements()
JMenuBar.getSubElements()
through queuepublic MenuBarUI getUI()
JMenuBar.getUI()
through queuepublic boolean isBorderPainted()
JMenuBar.isBorderPainted()
through queuepublic boolean isSelected()
JMenuBar.isSelected()
through queuepublic void menuSelectionChanged(boolean b)
JMenuBar.menuSelectionChanged(boolean)
through queuepublic void processKeyEvent(KeyEvent keyEvent, MenuElement[] menuElement, MenuSelectionManager menuSelectionManager)
JMenuBar.processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager)
through queuepublic void processMouseEvent(MouseEvent mouseEvent, MenuElement[] menuElement, MenuSelectionManager menuSelectionManager)
JMenuBar.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager)
through queuepublic void setBorderPainted(boolean b)
JMenuBar.setBorderPainted(boolean)
through queuepublic void setHelpMenu(JMenu jMenu)
JMenuBar.setHelpMenu(JMenu)
through queuepublic void setMargin(Insets insets)
JMenuBar.setMargin(Insets)
through queuepublic void setSelected(Component component)
JMenuBar.setSelected(Component)
through queuepublic void setSelectionModel(SingleSelectionModel singleSelectionModel)
JMenuBar.setSelectionModel(SingleSelectionModel)
through queuepublic void setUI(MenuBarUI menuBarUI)
JMenuBar.setUI(MenuBarUI)
through queue