Package org.fest.swing.driver
Class JMenuItemMatcher
java.lang.Object
org.fest.swing.driver.JMenuItemMatcher
- All Implemented Interfaces:
ComponentMatcher
Matches a
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
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SEPARATOR
- See Also:
-
label
-
-
Constructor Details
-
JMenuItemMatcher
Creates a newJMenuItemMatcher
.- Parameters:
path
- the path of the menu to match.
-
-
Method Details
-
matches
Indicates whether the given component is a
whose text matches the path specified in this matcher.JMenuItem
Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Specified by:
matches
in interfaceComponentMatcher
- Parameters:
c
- the component to verify.- Returns:
true
if the component matches,false
otherwise.
-
pathOf
-
parentOrInvokerOf
-
toString
-