public class JMenuItemMatcher extends Object implements ComponentMatcher
JMenuItem given a simple label or a menu path of the format "menu|submenu|menuitem",
for example "File|Open|Can of worms". Adapted from Abbot's own JMenuItemMatcher.| Constructor and Description |
|---|
JMenuItemMatcher(String... path)
Creates a new
JMenuItemMatcher. |
public JMenuItemMatcher(String... path)
JMenuItemMatcher.path - the path of the menu to match.@RunsInCurrentThread public boolean matches(Component c)
JMenuItem whose text matches the path specified
in this matcher.
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
matches in interface ComponentMatcherc - the component to verify.true if the component matches, false otherwise.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.