Package org.netbeans.jemmy.operators
Class JMenuBarOperator
- java.lang.Object
-
- org.netbeans.jemmy.operators.Operator
-
- org.netbeans.jemmy.operators.ComponentOperator
-
- org.netbeans.jemmy.operators.ContainerOperator
-
- org.netbeans.jemmy.operators.JComponentOperator
-
- org.netbeans.jemmy.operators.JMenuBarOperator
-
- All Implemented Interfaces:
Outputable,Timeoutable
public class JMenuBarOperator extends JComponentOperator implements Outputable, Timeoutable
Timeouts used:
JMenuOperator.WaitBeforePopupTimeout - time to sleep before popup expanding
JMenuOperator.WaitPopupTimeout - time to wait popup displayed
ComponentOperator.WaitComponentTimeout - time to wait button displayed
.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJMenuBarOperator.JMenuBarFinderChecks component type.-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder
-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator
ContainerOperator.ContainerFinder
-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator
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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSUBMENU_PREFIX_DPROPIdentifier for a "submenu" properties.-
Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP
-
Fields inherited from class org.netbeans.jemmy.operators.ComponentOperator
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP
-
Fields inherited from class org.netbeans.jemmy.operators.Operator
CLASS_DPROP, TO_STRING_DPROP
-
-
Constructor Summary
Constructors Constructor Description JMenuBarOperator(javax.swing.JMenuBar b)Constructor.JMenuBarOperator(ContainerOperator cont)Constructor.JMenuBarOperator(ContainerOperator cont, ComponentChooser chooser)Constructs a JMenuBarOperator object.JMenuBarOperator(ContainerOperator cont, ComponentChooser chooser, int index)Constructs a JMenuBarOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.swing.JMenuadd(javax.swing.JMenu jMenu)MapsJMenuBar.add(JMenu)through queuevoidcloseSubmenus()Closes all expanded submenus.voidcopyEnvironment(Operator anotherOperator)Copies all environment (output, timeouts, visualizer) from another operator.static javax.swing.JMenuBarfindJMenuBar(java.awt.Container cont)Waits JMenuBar in container.static javax.swing.JMenuBarfindJMenuBar(javax.swing.JDialog dialog)Searches JMenuBar in dialog.static javax.swing.JMenuBarfindJMenuBar(javax.swing.JFrame frame)Searches JMenuBar in frame.intgetComponentIndex(java.awt.Component component)MapsJMenuBar.getComponentIndex(Component)through queuejava.util.HashtablegetDump()Returns information about component.javax.swing.JMenugetHelpMenu()MapsJMenuBar.getHelpMenu()through queuejava.awt.InsetsgetMargin()MapsJMenuBar.getMargin()through queuejavax.swing.JMenugetMenu(int i)MapsJMenuBar.getMenu(int)through queueintgetMenuCount()MapsJMenuBar.getMenuCount()through queueTestOutgetOutput()Returns print output streams or writers.javax.swing.SingleSelectionModelgetSelectionModel()MapsJMenuBar.getSelectionModel()through queuejavax.swing.MenuElement[]getSubElements()MapsJMenuBar.getSubElements()through queueTimeoutsgetTimeouts()Return current timeouts.javax.swing.plaf.MenuBarUIgetUI()MapsJMenuBar.getUI()through queuebooleanisBorderPainted()MapsJMenuBar.isBorderPainted()through queuebooleanisSelected()MapsJMenuBar.isSelected()through queuevoidmenuSelectionChanged(boolean b)MapsJMenuBar.menuSelectionChanged(boolean)through queuevoidprocessKeyEvent(java.awt.event.KeyEvent keyEvent, javax.swing.MenuElement[] menuElement, javax.swing.MenuSelectionManager menuSelectionManager)MapsJMenuBar.processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager)through queuevoidprocessMouseEvent(java.awt.event.MouseEvent mouseEvent, javax.swing.MenuElement[] menuElement, javax.swing.MenuSelectionManager menuSelectionManager)MapsJMenuBar.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager)through queuejavax.swing.JMenuItempushMenu(java.lang.String path)Pushes menu.javax.swing.JMenuItempushMenu(java.lang.String[] names)Pushes menu.javax.swing.JMenuItempushMenu(java.lang.String[] names, boolean ce, boolean ccs)Deprecated.Use pushMenu(String[]) or pushMenu(String[], StringComparator)javax.swing.JMenuItempushMenu(java.lang.String[] names, Operator.StringComparator comparator)Pushes menu.javax.swing.JMenuItempushMenu(java.lang.String path, java.lang.String delim)Pushes menu.javax.swing.JMenuItempushMenu(java.lang.String path, java.lang.String delim, boolean ce, boolean ccs)Deprecated.Use pushMenu(String, String) or pushMenu(String, String, StringComparator)javax.swing.JMenuItempushMenu(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)Pushes menu.javax.swing.JMenuItempushMenu(java.lang.String path, Operator.StringComparator comparator)Pushes menu.javax.swing.JMenuItempushMenu(ComponentChooser[] choosers)Pushes menu.voidpushMenuNoBlock(java.lang.String path)ExecutespushMenu(path)in a separate thread.voidpushMenuNoBlock(java.lang.String[] names)ExecutespushMenu(names)in a separate thread.voidpushMenuNoBlock(java.lang.String[] names, boolean ce, boolean ccs)Deprecated.Use pushMenuNoBlock(String[]) or pushMenuNoBlock(String[], StringComparator)voidpushMenuNoBlock(java.lang.String[] names, Operator.StringComparator comparator)ExecutespushMenu(names, ce, ccs)in a separate thread.voidpushMenuNoBlock(java.lang.String path, java.lang.String delim)ExecutespushMenu(path, delim)in a separate thread.voidpushMenuNoBlock(java.lang.String path, java.lang.String delim, boolean ce, boolean ccs)Deprecated.Use pushMenuNoBlock(String, String) or pushMenuNoBlock(String, String, StringComparator)voidpushMenuNoBlock(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)ExecutespushMenu(names, delim, comparator)in a separate thread.voidpushMenuNoBlock(java.lang.String path, Operator.StringComparator comparator)ExecutespushMenu(names, comparator)in a separate thread.voidpushMenuNoBlock(ComponentChooser[] choosers)ExecutespushMenu(choosers)in a separate thread.voidsetBorderPainted(boolean b)MapsJMenuBar.setBorderPainted(boolean)through queuevoidsetHelpMenu(javax.swing.JMenu jMenu)MapsJMenuBar.setHelpMenu(JMenu)through queuevoidsetMargin(java.awt.Insets insets)MapsJMenuBar.setMargin(Insets)through queuevoidsetOutput(TestOut out)Defines print output streams or writers.voidsetSelected(java.awt.Component component)MapsJMenuBar.setSelected(Component)through queuevoidsetSelectionModel(javax.swing.SingleSelectionModel singleSelectionModel)MapsJMenuBar.setSelectionModel(SingleSelectionModel)through queuevoidsetTimeouts(Timeouts times)Defines current timeouts.voidsetUI(javax.swing.plaf.MenuBarUI menuBarUI)MapsJMenuBar.setUI(MenuBarUI)through queueJMenuItemOperatorshowMenuItem(java.lang.String path)Expands all menus to show menu item specified by apathparameter.JMenuItemOperatorshowMenuItem(java.lang.String[] path)Expands all menus to show menu item specified by apathparameter.JMenuItemOperatorshowMenuItem(java.lang.String[] path, Operator.StringComparator comparator)Expends all menus to show menu item specified by apathparameter.JMenuItemOperatorshowMenuItem(java.lang.String path, java.lang.String delim)Expands all menus to show menu item specified by apathparameter.JMenuItemOperatorshowMenuItem(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)Expands all menus to show menu item specified by apathparameter.JMenuItemOperatorshowMenuItem(java.lang.String path, Operator.StringComparator comparator)Expands all menus to show menu item specified by apathparameter.JMenuItemOperatorshowMenuItem(ComponentChooser[] choosers)JMenuItemOperator[]showMenuItems(java.lang.String path)Shows submenu of menu specified by apathparameter.JMenuItemOperator[]showMenuItems(java.lang.String[] path)Shows submenu of menu specified by apathparameter.JMenuItemOperator[]showMenuItems(java.lang.String[] path, Operator.StringComparator comparator)Shows submenu of menu specified by apathparameter.JMenuItemOperator[]showMenuItems(java.lang.String path, java.lang.String delim)Shows submenu of menu specified by apathparameter.JMenuItemOperator[]showMenuItems(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)Shows submenu of menu specified by apathparameter.JMenuItemOperator[]showMenuItems(java.lang.String path, Operator.StringComparator comparator)Shows submenu of menu specified by apathparameter.JMenuItemOperator[]showMenuItems(ComponentChooser[] choosers)static javax.swing.JMenuBarwaitJMenuBar(java.awt.Container cont)Searches JMenuBar in container.static javax.swing.JMenuBarwaitJMenuBar(javax.swing.JDialog dialog)Waits JMenuBar in dialog.static javax.swing.JMenuBarwaitJMenuBar(javax.swing.JFrame frame)Waits JMenuBar in frame.-
Methods inherited from class org.netbeans.jemmy.operators.JComponentOperator
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
-
Methods inherited from class org.netbeans.jemmy.operators.ContainerOperator
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
-
Methods inherited from class org.netbeans.jemmy.operators.ComponentOperator
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
-
Methods inherited from class org.netbeans.jemmy.operators.Operator
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
-
-
-
-
Field Detail
-
SUBMENU_PREFIX_DPROP
public static final java.lang.String SUBMENU_PREFIX_DPROP
Identifier for a "submenu" properties.- See Also:
getDump(), Constant Field Values
-
-
Constructor Detail
-
JMenuBarOperator
public JMenuBarOperator(javax.swing.JMenuBar b)
Constructor.- Parameters:
b- a component
-
JMenuBarOperator
public JMenuBarOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a JMenuBarOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
JMenuBarOperator
public JMenuBarOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a JMenuBarOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.
-
JMenuBarOperator
public JMenuBarOperator(ContainerOperator cont)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- Operator pointing a container to search component in.- Throws:
TimeoutExpiredException
-
-
Method Detail
-
findJMenuBar
public static javax.swing.JMenuBar findJMenuBar(javax.swing.JFrame frame)
Searches JMenuBar in frame.- Parameters:
frame- a container- Returns:
- found JMenuBar
-
findJMenuBar
public static javax.swing.JMenuBar findJMenuBar(javax.swing.JDialog dialog)
Searches JMenuBar in dialog.- Parameters:
dialog- a container- Returns:
- found JMenuBar
-
waitJMenuBar
public static javax.swing.JMenuBar waitJMenuBar(java.awt.Container cont)
Searches JMenuBar in container.- Parameters:
cont- a container- Returns:
- found JMenuBar
- Throws:
TimeoutExpiredException
-
waitJMenuBar
public static javax.swing.JMenuBar waitJMenuBar(javax.swing.JFrame frame)
Waits JMenuBar in frame.- Parameters:
frame- a container- Returns:
- found JMenuBar
- Throws:
TimeoutExpiredException
-
waitJMenuBar
public static javax.swing.JMenuBar waitJMenuBar(javax.swing.JDialog dialog)
Waits JMenuBar in dialog.- Parameters:
dialog- a container- Returns:
- found JMenuBar
- Throws:
TimeoutExpiredException
-
findJMenuBar
public static javax.swing.JMenuBar findJMenuBar(java.awt.Container cont)
Waits JMenuBar in container.- Parameters:
cont- a container- Returns:
- found JMenuBar
-
setOutput
public void setOutput(TestOut out)
Description copied from interface:OutputableDefines print output streams or writers.- Specified by:
setOutputin interfaceOutputable- Overrides:
setOutputin classJComponentOperator- Parameters:
out- Identify the streams or writers used for print output.- See Also:
Outputable.getOutput()
-
getOutput
public TestOut getOutput()
Description copied from interface:OutputableReturns print output streams or writers.- Specified by:
getOutputin interfaceOutputable- Overrides:
getOutputin classJComponentOperator- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
Outputable.setOutput(org.netbeans.jemmy.TestOut)
-
setTimeouts
public void setTimeouts(Timeouts times)
Description copied from interface:TimeoutableDefines current timeouts.- Specified by:
setTimeoutsin interfaceTimeoutable- Overrides:
setTimeoutsin classJComponentOperator- Parameters:
times- A collection of timeout assignments.- See Also:
Timeoutable.getTimeouts()
-
getTimeouts
public Timeouts getTimeouts()
Description copied from interface:TimeoutableReturn current timeouts.- Specified by:
getTimeoutsin interfaceTimeoutable- Overrides:
getTimeoutsin classJComponentOperator- Returns:
- the collection of current timeout assignments.
- See Also:
Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)
-
copyEnvironment
public void copyEnvironment(Operator anotherOperator)
Description copied from class:OperatorCopies all environment (output, timeouts, visualizer) from another operator.- Overrides:
copyEnvironmentin classComponentOperator- Parameters:
anotherOperator- an operator to copy the environment to.
-
pushMenu
public javax.swing.JMenuItem pushMenu(ComponentChooser[] choosers)
Pushes menu.- Parameters:
choosers- Array of choosers to find menuItems to push.- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException
-
pushMenuNoBlock
public void pushMenuNoBlock(ComponentChooser[] choosers)
ExecutespushMenu(choosers)in a separate thread.- Parameters:
choosers- Array of choosers to find menuItems to push.- See Also:
pushMenu(ComponentChooser[])
-
pushMenu
public javax.swing.JMenuItem pushMenu(java.lang.String[] names, Operator.StringComparator comparator)Pushes menu.- Parameters:
names- an array of menu texts.comparator- a string comparision algorithm- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException
-
pushMenu
public javax.swing.JMenuItem pushMenu(java.lang.String[] names, boolean ce, boolean ccs)Deprecated.Use pushMenu(String[]) or pushMenu(String[], StringComparator)Pushes menu.- Parameters:
names- Menu items texts.ce- Compare text exactly.ccs- Compare text case sensitively.- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
pushMenuNoBlock
public void pushMenuNoBlock(java.lang.String[] names, Operator.StringComparator comparator)ExecutespushMenu(names, ce, ccs)in a separate thread.- Parameters:
names- an array of menu texts.comparator- a string comparision algorithm
-
pushMenuNoBlock
public void pushMenuNoBlock(java.lang.String[] names, boolean ce, boolean ccs)Deprecated.Use pushMenuNoBlock(String[]) or pushMenuNoBlock(String[], StringComparator)ExecutespushMenu(names, ce, ccs)in a separate thread.- Parameters:
names- Menu items texts.ce- Compare text exactly.ccs- Compare text case sensitively.- See Also:
pushMenu(String[], boolean,boolean)
-
pushMenu
public javax.swing.JMenuItem pushMenu(java.lang.String[] names)
Pushes menu.- Parameters:
names- Menu items texts.- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException
-
pushMenuNoBlock
public void pushMenuNoBlock(java.lang.String[] names)
ExecutespushMenu(names)in a separate thread.- Parameters:
names- Menu items texts.- See Also:
pushMenu(String[])
-
pushMenu
public javax.swing.JMenuItem pushMenu(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)Pushes menu.- Parameters:
path- a menu path.delim- a path delimiter.comparator- a string comparision algorithm- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException
-
pushMenu
public javax.swing.JMenuItem pushMenu(java.lang.String path, Operator.StringComparator comparator)Pushes menu. Uses PathParser assigned to this operator.- Parameters:
path- a menu path.comparator- a string comparision algorithm- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException
-
pushMenu
public javax.swing.JMenuItem pushMenu(java.lang.String path, java.lang.String delim, boolean ce, boolean ccs)Deprecated.Use pushMenu(String, String) or pushMenu(String, String, StringComparator)Pushes menu.- Parameters:
path- String menupath representation ("File/New", for example).delim- String menupath divider ("/").ce- Compare text exactly.ccs- Compare text case sensitively.- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
pushMenuNoBlock
public void pushMenuNoBlock(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)ExecutespushMenu(names, delim, comparator)in a separate thread.- Parameters:
path- a menu path.delim- a path delimiter.comparator- a string comparision algorithm
-
pushMenuNoBlock
public void pushMenuNoBlock(java.lang.String path, Operator.StringComparator comparator)ExecutespushMenu(names, comparator)in a separate thread. Uses PathParser assigned to this operator.- Parameters:
path- a menu path.comparator- a string comparision algorithm
-
pushMenuNoBlock
public void pushMenuNoBlock(java.lang.String path, java.lang.String delim, boolean ce, boolean ccs)Deprecated.Use pushMenuNoBlock(String, String) or pushMenuNoBlock(String, String, StringComparator)ExecutespushMenu(path, delim, ce, ccs)in a separate thread.- Parameters:
path- String menupath representation ("File/New", for example).delim- String menupath divider ("/").ce- Compare text exactly.ccs- Compare text case sensitively.- See Also:
pushMenu(org.netbeans.jemmy.ComponentChooser[])
-
pushMenu
public javax.swing.JMenuItem pushMenu(java.lang.String path, java.lang.String delim)Pushes menu.- Parameters:
path- String menupath representation ("File/New", for example).delim- String menupath divider ("/").- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException
-
pushMenu
public javax.swing.JMenuItem pushMenu(java.lang.String path)
Pushes menu. Uses PathParser assigned to this operator.- Parameters:
path- String menupath representation ("File/New", for example).- Returns:
- Last pushed JMenuItem.
- Throws:
TimeoutExpiredException
-
pushMenuNoBlock
public void pushMenuNoBlock(java.lang.String path, java.lang.String delim)ExecutespushMenu(path, delim)in a separate thread.- Parameters:
path- String menupath representation ("File/New", for example).delim- String menupath divider ("/").
-
pushMenuNoBlock
public void pushMenuNoBlock(java.lang.String path)
ExecutespushMenu(path)in a separate thread.- Parameters:
path- String menupath representation ("File/New", for example).
-
showMenuItems
public JMenuItemOperator[] showMenuItems(ComponentChooser[] choosers)
-
showMenuItems
public JMenuItemOperator[] showMenuItems(java.lang.String[] path, Operator.StringComparator comparator)
Shows submenu of menu specified by apathparameter.- Parameters:
path- an array of menu texts.comparator- a string comparision algorithm- Returns:
- an array of operators created tor items from the submenu.
- Throws:
TimeoutExpiredException
-
showMenuItems
public JMenuItemOperator[] showMenuItems(java.lang.String[] path)
Shows submenu of menu specified by apathparameter. Uses StringComparator assigned to the operator.- Parameters:
path- an array of menu texts.- Returns:
- an array of operators created tor items from the submenu.
- Throws:
TimeoutExpiredException
-
showMenuItems
public JMenuItemOperator[] showMenuItems(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)
Shows submenu of menu specified by apathparameter.- Parameters:
path- a string identifying the menu path.delim- a path delimiter.comparator- a string comparision algorithm- Returns:
- an array of operators created tor items from the submenu.
- Throws:
TimeoutExpiredException
-
showMenuItems
public JMenuItemOperator[] showMenuItems(java.lang.String path, Operator.StringComparator comparator)
Shows submenu of menu specified by apathparameter. Uses PathParser assigned to this operator.- Parameters:
path- a string identifying the menu path.comparator- a string comparision algorithm- Returns:
- an array of operators created tor items from the submenu.
- Throws:
TimeoutExpiredException
-
showMenuItems
public JMenuItemOperator[] showMenuItems(java.lang.String path, java.lang.String delim)
Shows submenu of menu specified by apathparameter. Uses StringComparator assigned to the operator.- Parameters:
path- a string identifying the menu path.delim- a path delimiter.- Returns:
- an array of operators created tor items from the submenu.
- Throws:
TimeoutExpiredException
-
showMenuItems
public JMenuItemOperator[] showMenuItems(java.lang.String path)
Shows submenu of menu specified by apathparameter. Uses PathParser assigned to this operator. Uses StringComparator assigned to the operator.- Parameters:
path- a string identifying the menu path.- Returns:
- an array of operators created tor items from the submenu.
- Throws:
TimeoutExpiredException
-
showMenuItem
public JMenuItemOperator showMenuItem(ComponentChooser[] choosers)
-
showMenuItem
public JMenuItemOperator showMenuItem(java.lang.String[] path, Operator.StringComparator comparator)
Expends all menus to show menu item specified by apathparameter.- Parameters:
path- an array of menu texts.comparator- a string comparision algorithm- Returns:
- an operator for the last menu item in path.
- Throws:
TimeoutExpiredException
-
showMenuItem
public JMenuItemOperator showMenuItem(java.lang.String[] path)
Expands all menus to show menu item specified by apathparameter.- Parameters:
path- an array of menu texts.- Returns:
- an operator for the last menu item in path.
- Throws:
TimeoutExpiredException
-
showMenuItem
public JMenuItemOperator showMenuItem(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)
Expands all menus to show menu item specified by apathparameter.- Parameters:
path- a string identifying the menu path.delim- a path delimiter.comparator- a string comparision algorithm- Returns:
- an operator for the last menu item in path.
- Throws:
TimeoutExpiredException
-
showMenuItem
public JMenuItemOperator showMenuItem(java.lang.String path, Operator.StringComparator comparator)
Expands all menus to show menu item specified by apathparameter. Uses PathParser assigned to this operator.- Parameters:
path- a string identifying the menu path.comparator- a string comparision algorithm- Returns:
- an operator for the last menu item in path.
- Throws:
TimeoutExpiredException
-
showMenuItem
public JMenuItemOperator showMenuItem(java.lang.String path, java.lang.String delim)
Expands all menus to show menu item specified by apathparameter. Uses StringComparator assigned to the operator.- Parameters:
path- a string identifying the menu path.delim- a path delimiter.- Returns:
- an operator for the last menu item in path.
- Throws:
TimeoutExpiredException
-
showMenuItem
public JMenuItemOperator showMenuItem(java.lang.String path)
Expands all menus to show menu item specified by apathparameter. Uses PathParser assigned to this operator. Uses StringComparator assigned to the operator.- Parameters:
path- a string identifying the menu path.- Returns:
- an array of operators created tor items from the submenu.
- Throws:
TimeoutExpiredException
-
closeSubmenus
public void closeSubmenus()
Closes all expanded submenus.
-
getDump
public java.util.Hashtable getDump()
Description copied from class:ComponentOperatorReturns information about component.- Overrides:
getDumpin classJComponentOperator- Returns:
- a Hashtable containing name-value pairs.
-
add
public javax.swing.JMenu add(javax.swing.JMenu jMenu)
MapsJMenuBar.add(JMenu)through queue
-
getComponentIndex
public int getComponentIndex(java.awt.Component component)
MapsJMenuBar.getComponentIndex(Component)through queue
-
getHelpMenu
public javax.swing.JMenu getHelpMenu()
MapsJMenuBar.getHelpMenu()through queue
-
getMargin
public java.awt.Insets getMargin()
MapsJMenuBar.getMargin()through queue
-
getMenu
public javax.swing.JMenu getMenu(int i)
MapsJMenuBar.getMenu(int)through queue
-
getMenuCount
public int getMenuCount()
MapsJMenuBar.getMenuCount()through queue
-
getSelectionModel
public javax.swing.SingleSelectionModel getSelectionModel()
MapsJMenuBar.getSelectionModel()through queue
-
getSubElements
public javax.swing.MenuElement[] getSubElements()
MapsJMenuBar.getSubElements()through queue
-
getUI
public javax.swing.plaf.MenuBarUI getUI()
MapsJMenuBar.getUI()through queue
-
isBorderPainted
public boolean isBorderPainted()
MapsJMenuBar.isBorderPainted()through queue
-
isSelected
public boolean isSelected()
MapsJMenuBar.isSelected()through queue
-
menuSelectionChanged
public void menuSelectionChanged(boolean b)
MapsJMenuBar.menuSelectionChanged(boolean)through queue
-
processKeyEvent
public void processKeyEvent(java.awt.event.KeyEvent keyEvent, javax.swing.MenuElement[] menuElement, javax.swing.MenuSelectionManager menuSelectionManager)MapsJMenuBar.processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager)through queue
-
processMouseEvent
public void processMouseEvent(java.awt.event.MouseEvent mouseEvent, javax.swing.MenuElement[] menuElement, javax.swing.MenuSelectionManager menuSelectionManager)MapsJMenuBar.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager)through queue
-
setBorderPainted
public void setBorderPainted(boolean b)
MapsJMenuBar.setBorderPainted(boolean)through queue
-
setHelpMenu
public void setHelpMenu(javax.swing.JMenu jMenu)
MapsJMenuBar.setHelpMenu(JMenu)through queue
-
setMargin
public void setMargin(java.awt.Insets insets)
MapsJMenuBar.setMargin(Insets)through queue
-
setSelected
public void setSelected(java.awt.Component component)
MapsJMenuBar.setSelected(Component)through queue
-
setSelectionModel
public void setSelectionModel(javax.swing.SingleSelectionModel singleSelectionModel)
MapsJMenuBar.setSelectionModel(SingleSelectionModel)through queue
-
setUI
public void setUI(javax.swing.plaf.MenuBarUI menuBarUI)
MapsJMenuBar.setUI(MenuBarUI)through queue
-
-