|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.ComponentOperator
org.netbeans.jemmy.operators.ContainerOperator
org.netbeans.jemmy.operators.JComponentOperator
org.netbeans.jemmy.operators.JMenuBarOperator
public class JMenuBarOperator
Timeouts used:
JMenuOperator.WaitBeforePopupTimeout - time to sleep before popup expanding
JMenuOperator.WaitPopupTimeout - time to wait popup displayed
ComponentOperator.WaitComponentTimeout - time to wait button displayed
.
Timeouts| Nested Class Summary | |
|---|---|
static class |
JMenuBarOperator.JMenuBarFinder
Checks 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.MapDoubleAction, Operator.MapFloatAction, Operator.MapCharacterAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator |
| Field Summary | |
|---|---|
static java.lang.String |
SUBMENU_PREFIX_DPROP
Identifier 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 | |
|---|---|
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(javax.swing.JMenuBar b)
Constructor. |
|
| Method Summary | |
|---|---|
javax.swing.JMenu |
add(javax.swing.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 javax.swing.JMenuBar |
findJMenuBar(java.awt.Container cont)
Waits JMenuBar in container. |
static javax.swing.JMenuBar |
findJMenuBar(javax.swing.JDialog dialog)
Searches JMenuBar in dialog. |
static javax.swing.JMenuBar |
findJMenuBar(javax.swing.JFrame frame)
Searches JMenuBar in frame. |
int |
getComponentIndex(java.awt.Component component)
Maps JMenuBar.getComponentIndex(Component) through queue |
java.util.Hashtable |
getDump()
Returns information about component. |
javax.swing.JMenu |
getHelpMenu()
Maps JMenuBar.getHelpMenu() through queue |
java.awt.Insets |
getMargin()
Maps JMenuBar.getMargin() through queue |
javax.swing.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. |
javax.swing.SingleSelectionModel |
getSelectionModel()
Maps JMenuBar.getSelectionModel() through queue |
javax.swing.MenuElement[] |
getSubElements()
Maps JMenuBar.getSubElements() through queue |
Timeouts |
getTimeouts()
Return current timeouts. |
javax.swing.plaf.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(java.awt.event.KeyEvent keyEvent,
javax.swing.MenuElement[] menuElement,
javax.swing.MenuSelectionManager menuSelectionManager)
Maps JMenuBar.processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager) through queue |
void |
processMouseEvent(java.awt.event.MouseEvent mouseEvent,
javax.swing.MenuElement[] menuElement,
javax.swing.MenuSelectionManager menuSelectionManager)
Maps JMenuBar.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) through queue |
javax.swing.JMenuItem |
pushMenu(ComponentChooser[] choosers)
Pushes menu. |
javax.swing.JMenuItem |
pushMenu(java.lang.String path)
Pushes menu. |
javax.swing.JMenuItem |
pushMenu(java.lang.String[] names)
Pushes menu. |
javax.swing.JMenuItem |
pushMenu(java.lang.String[] names,
boolean ce,
boolean ccs)
Deprecated. Use pushMenu(String[]) or pushMenu(String[], StringComparator) |
javax.swing.JMenuItem |
pushMenu(java.lang.String[] names,
Operator.StringComparator comparator)
Pushes menu. |
javax.swing.JMenuItem |
pushMenu(java.lang.String path,
Operator.StringComparator comparator)
Pushes menu. |
javax.swing.JMenuItem |
pushMenu(java.lang.String path,
java.lang.String delim)
Pushes menu. |
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) |
javax.swing.JMenuItem |
pushMenu(java.lang.String path,
java.lang.String delim,
Operator.StringComparator comparator)
Pushes menu. |
void |
pushMenuNoBlock(ComponentChooser[] choosers)
Executes pushMenu(choosers) in a separate thread. |
void |
pushMenuNoBlock(java.lang.String path)
Executes pushMenu(path) in a separate thread. |
void |
pushMenuNoBlock(java.lang.String[] names)
Executes pushMenu(names) in a separate thread. |
void |
pushMenuNoBlock(java.lang.String[] names,
boolean ce,
boolean ccs)
Deprecated. Use pushMenuNoBlock(String[]) or pushMenuNoBlock(String[], StringComparator) |
void |
pushMenuNoBlock(java.lang.String[] names,
Operator.StringComparator comparator)
Executes pushMenu(names, ce, ccs) in a separate thread. |
void |
pushMenuNoBlock(java.lang.String path,
Operator.StringComparator comparator)
Executes pushMenu(names, comparator) in a separate thread. |
void |
pushMenuNoBlock(java.lang.String path,
java.lang.String delim)
Executes pushMenu(path, delim) in a separate thread. |
void |
pushMenuNoBlock(java.lang.String path,
java.lang.String delim,
boolean ce,
boolean ccs)
Deprecated. Use pushMenuNoBlock(String, String) or pushMenuNoBlock(String, String, StringComparator) |
void |
pushMenuNoBlock(java.lang.String path,
java.lang.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(javax.swing.JMenu jMenu)
Maps JMenuBar.setHelpMenu(JMenu) through queue |
void |
setMargin(java.awt.Insets insets)
Maps JMenuBar.setMargin(Insets) through queue |
void |
setOutput(TestOut out)
Defines print output streams or writers. |
void |
setSelected(java.awt.Component component)
Maps JMenuBar.setSelected(Component) through queue |
void |
setSelectionModel(javax.swing.SingleSelectionModel singleSelectionModel)
Maps JMenuBar.setSelectionModel(SingleSelectionModel) through queue |
void |
setTimeouts(Timeouts times)
Defines current timeouts. |
void |
setUI(javax.swing.plaf.MenuBarUI menuBarUI)
Maps JMenuBar.setUI(MenuBarUI) through queue |
JMenuItemOperator |
showMenuItem(ComponentChooser[] choosers)
|
JMenuItemOperator |
showMenuItem(java.lang.String path)
Expands all menus to show menu item specified by a path parameter. |
JMenuItemOperator |
showMenuItem(java.lang.String[] path)
Expands all menus to show menu item specified by a path parameter. |
JMenuItemOperator |
showMenuItem(java.lang.String[] path,
Operator.StringComparator comparator)
Expends all menus to show menu item specified by a path parameter. |
JMenuItemOperator |
showMenuItem(java.lang.String path,
Operator.StringComparator comparator)
Expands all menus to show menu item specified by a path parameter. |
JMenuItemOperator |
showMenuItem(java.lang.String path,
java.lang.String delim)
Expands all menus to show menu item specified by a path parameter. |
JMenuItemOperator |
showMenuItem(java.lang.String path,
java.lang.String delim,
Operator.StringComparator comparator)
Expands all menus to show menu item specified by a path parameter. |
JMenuItemOperator[] |
showMenuItems(ComponentChooser[] choosers)
|
JMenuItemOperator[] |
showMenuItems(java.lang.String path)
Shows submenu of menu specified by a path parameter. |
JMenuItemOperator[] |
showMenuItems(java.lang.String[] path)
Shows submenu of menu specified by a path parameter. |
JMenuItemOperator[] |
showMenuItems(java.lang.String[] path,
Operator.StringComparator comparator)
Shows submenu of menu specified by a path parameter. |
JMenuItemOperator[] |
showMenuItems(java.lang.String path,
Operator.StringComparator comparator)
Shows submenu of menu specified by a path parameter. |
JMenuItemOperator[] |
showMenuItems(java.lang.String path,
java.lang.String delim)
Shows submenu of menu specified by a path parameter. |
JMenuItemOperator[] |
showMenuItems(java.lang.String path,
java.lang.String delim,
Operator.StringComparator comparator)
Shows submenu of menu specified by a path parameter. |
static javax.swing.JMenuBar |
waitJMenuBar(java.awt.Container cont)
Searches JMenuBar in container. |
static javax.swing.JMenuBar |
waitJMenuBar(javax.swing.JDialog dialog)
Waits JMenuBar in dialog. |
static javax.swing.JMenuBar |
waitJMenuBar(javax.swing.JFrame frame)
Waits JMenuBar in frame. |
| 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SUBMENU_PREFIX_DPROP
getDump(),
Constant Field Values| Constructor Detail |
|---|
public JMenuBarOperator(javax.swing.JMenuBar b)
b - a component
public 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| Method Detail |
|---|
public static javax.swing.JMenuBar findJMenuBar(javax.swing.JFrame frame)
frame - a container
public static javax.swing.JMenuBar findJMenuBar(javax.swing.JDialog dialog)
dialog - a container
public static javax.swing.JMenuBar waitJMenuBar(java.awt.Container cont)
cont - a container
TimeoutExpiredExceptionpublic static javax.swing.JMenuBar waitJMenuBar(javax.swing.JFrame frame)
frame - a container
TimeoutExpiredExceptionpublic static javax.swing.JMenuBar waitJMenuBar(javax.swing.JDialog dialog)
dialog - a container
TimeoutExpiredExceptionpublic static javax.swing.JMenuBar findJMenuBar(java.awt.Container cont)
cont - a container
public void setOutput(TestOut out)
Outputable
setOutput in interface OutputablesetOutput in class JComponentOperatorout - Identify the streams or writers used for print output.Outputable.getOutput()public TestOut getOutput()
Outputable
getOutput in interface OutputablegetOutput in class JComponentOperatorOutputable.setOutput(org.netbeans.jemmy.TestOut)public void setTimeouts(Timeouts times)
Timeoutable
setTimeouts in interface TimeoutablesetTimeouts in class JComponentOperatortimes - A collection of timeout assignments.Timeoutable.getTimeouts()public Timeouts getTimeouts()
Timeoutable
getTimeouts in interface TimeoutablegetTimeouts in class JComponentOperatorTimeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)public void copyEnvironment(Operator anotherOperator)
Operator
copyEnvironment in class ComponentOperatoranotherOperator - an operator to copy the environment to.public javax.swing.JMenuItem pushMenu(ComponentChooser[] choosers)
choosers - Array of choosers to find menuItems to push.
TimeoutExpiredExceptionpublic void pushMenuNoBlock(ComponentChooser[] choosers)
pushMenu(choosers) in a separate thread.
choosers - Array of choosers to find menuItems to push.pushMenu(ComponentChooser[])
public javax.swing.JMenuItem pushMenu(java.lang.String[] names,
Operator.StringComparator comparator)
names - an array of menu texts.comparator - a string comparision algorithm
TimeoutExpiredException
public javax.swing.JMenuItem pushMenu(java.lang.String[] names,
boolean ce,
boolean ccs)
names - Menu items texts.ce - Compare text exactly.ccs - Compare text case sensitively.
TimeoutExpiredExceptionOperator.isCaptionEqual(String, String, boolean, boolean)
public void pushMenuNoBlock(java.lang.String[] names,
Operator.StringComparator comparator)
pushMenu(names, ce, ccs) in a separate thread.
names - an array of menu texts.comparator - a string comparision algorithm
public void pushMenuNoBlock(java.lang.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 javax.swing.JMenuItem pushMenu(java.lang.String[] names)
names - Menu items texts.
TimeoutExpiredExceptionpublic void pushMenuNoBlock(java.lang.String[] names)
pushMenu(names) in a separate thread.
names - Menu items texts.pushMenu(String[])
public javax.swing.JMenuItem pushMenu(java.lang.String path,
java.lang.String delim,
Operator.StringComparator comparator)
path - a menu path.delim - a path delimiter.comparator - a string comparision algorithm
TimeoutExpiredException
public javax.swing.JMenuItem pushMenu(java.lang.String path,
Operator.StringComparator comparator)
path - a menu path.comparator - a string comparision algorithm
TimeoutExpiredException
public javax.swing.JMenuItem pushMenu(java.lang.String path,
java.lang.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.
TimeoutExpiredExceptionOperator.isCaptionEqual(String, String, boolean, boolean)
public void pushMenuNoBlock(java.lang.String path,
java.lang.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 algorithm
public void pushMenuNoBlock(java.lang.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 algorithm
public void pushMenuNoBlock(java.lang.String path,
java.lang.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 javax.swing.JMenuItem pushMenu(java.lang.String path,
java.lang.String delim)
path - String menupath representation ("File/New", for example).delim - String menupath divider ("/").
TimeoutExpiredExceptionpublic javax.swing.JMenuItem pushMenu(java.lang.String path)
path - String menupath representation ("File/New", for example).
TimeoutExpiredException
public void pushMenuNoBlock(java.lang.String path,
java.lang.String delim)
pushMenu(path, delim) in a separate thread.
path - String menupath representation ("File/New", for example).delim - String menupath divider ("/").public void pushMenuNoBlock(java.lang.String path)
pushMenu(path) in a separate thread.
path - String menupath representation ("File/New", for example).public JMenuItemOperator[] showMenuItems(ComponentChooser[] choosers)
public JMenuItemOperator[] showMenuItems(java.lang.String[] path,
Operator.StringComparator comparator)
path parameter.
path - an array of menu texts.comparator - a string comparision algorithm
TimeoutExpiredExceptionpublic JMenuItemOperator[] showMenuItems(java.lang.String[] path)
path parameter.
Uses StringComparator assigned to the operator.
path - an array of menu texts.
TimeoutExpiredException
public JMenuItemOperator[] showMenuItems(java.lang.String path,
java.lang.String delim,
Operator.StringComparator comparator)
path parameter.
path - a string identifying the menu path.delim - a path delimiter.comparator - a string comparision algorithm
TimeoutExpiredException
public JMenuItemOperator[] showMenuItems(java.lang.String path,
Operator.StringComparator comparator)
path parameter.
Uses PathParser assigned to this operator.
path - a string identifying the menu path.comparator - a string comparision algorithm
TimeoutExpiredException
public JMenuItemOperator[] showMenuItems(java.lang.String path,
java.lang.String delim)
path parameter.
Uses StringComparator assigned to the operator.
path - a string identifying the menu path.delim - a path delimiter.
TimeoutExpiredExceptionpublic JMenuItemOperator[] showMenuItems(java.lang.String path)
path parameter.
Uses PathParser assigned to this operator.
Uses StringComparator assigned to the operator.
path - a string identifying the menu path.
TimeoutExpiredExceptionpublic JMenuItemOperator showMenuItem(ComponentChooser[] choosers)
public JMenuItemOperator showMenuItem(java.lang.String[] path,
Operator.StringComparator comparator)
path parameter.
path - an array of menu texts.comparator - a string comparision algorithm
TimeoutExpiredExceptionpublic JMenuItemOperator showMenuItem(java.lang.String[] path)
path parameter.
path - an array of menu texts.
TimeoutExpiredException
public JMenuItemOperator showMenuItem(java.lang.String path,
java.lang.String delim,
Operator.StringComparator comparator)
path parameter.
path - a string identifying the menu path.delim - a path delimiter.comparator - a string comparision algorithm
TimeoutExpiredException
public JMenuItemOperator showMenuItem(java.lang.String path,
Operator.StringComparator comparator)
path parameter.
Uses PathParser assigned to this operator.
path - a string identifying the menu path.comparator - a string comparision algorithm
TimeoutExpiredException
public JMenuItemOperator showMenuItem(java.lang.String path,
java.lang.String delim)
path parameter.
Uses StringComparator assigned to the operator.
path - a string identifying the menu path.delim - a path delimiter.
TimeoutExpiredExceptionpublic JMenuItemOperator showMenuItem(java.lang.String path)
path parameter.
Uses PathParser assigned to this operator.
Uses StringComparator assigned to the operator.
path - a string identifying the menu path.
TimeoutExpiredExceptionpublic void closeSubmenus()
public java.util.Hashtable getDump()
ComponentOperator
getDump in class JComponentOperatorpublic javax.swing.JMenu add(javax.swing.JMenu jMenu)
JMenuBar.add(JMenu) through queue
public int getComponentIndex(java.awt.Component component)
JMenuBar.getComponentIndex(Component) through queue
public javax.swing.JMenu getHelpMenu()
JMenuBar.getHelpMenu() through queue
public java.awt.Insets getMargin()
JMenuBar.getMargin() through queue
public javax.swing.JMenu getMenu(int i)
JMenuBar.getMenu(int) through queue
public int getMenuCount()
JMenuBar.getMenuCount() through queue
public javax.swing.SingleSelectionModel getSelectionModel()
JMenuBar.getSelectionModel() through queue
public javax.swing.MenuElement[] getSubElements()
JMenuBar.getSubElements() through queue
public javax.swing.plaf.MenuBarUI getUI()
JMenuBar.getUI() through queue
public boolean isBorderPainted()
JMenuBar.isBorderPainted() through queue
public boolean isSelected()
JMenuBar.isSelected() through queue
public void menuSelectionChanged(boolean b)
JMenuBar.menuSelectionChanged(boolean) through queue
public void processKeyEvent(java.awt.event.KeyEvent keyEvent,
javax.swing.MenuElement[] menuElement,
javax.swing.MenuSelectionManager menuSelectionManager)
JMenuBar.processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager) through queue
public void processMouseEvent(java.awt.event.MouseEvent mouseEvent,
javax.swing.MenuElement[] menuElement,
javax.swing.MenuSelectionManager menuSelectionManager)
JMenuBar.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) through queue
public void setBorderPainted(boolean b)
JMenuBar.setBorderPainted(boolean) through queue
public void setHelpMenu(javax.swing.JMenu jMenu)
JMenuBar.setHelpMenu(JMenu) through queue
public void setMargin(java.awt.Insets insets)
JMenuBar.setMargin(Insets) through queue
public void setSelected(java.awt.Component component)
JMenuBar.setSelected(Component) through queue
public void setSelectionModel(javax.swing.SingleSelectionModel singleSelectionModel)
JMenuBar.setSelectionModel(SingleSelectionModel) through queue
public void setUI(javax.swing.plaf.MenuBarUI menuBarUI)
JMenuBar.setUI(MenuBarUI) through queue
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||