abbot.finder
Interface Matcher
- All Known Subinterfaces:
- MultiMatcher
- All Known Implementing Classes:
- AbstractMatcher, ClassMatcher, ComponentTestFixture.ComponentMatcher, JMenuItemMatcher, JMenuMatcher, NameMatcher, WindowMatcher
public interface Matcher
Provides an indication whether a Component matches some desired
criteria. For use with implementations of ComponentFinder
.
You can conveniently inline a custom matcher like so:
ComponentFinder finder;
...
// Find a label with known text
JLabel label = (JLabel)finder.find(new Matcher() {
public boolean matches(Component c) {
return c instanceof JLabel
&& "expected text".equals(((JLabel)c).getText());
}
});
- See Also:
ComponentFinder
Method Summary |
boolean |
matches(Component c)
Return whether the given Component matches some lookup criteria. |
matches
boolean matches(Component c)
- Return whether the given Component matches some lookup criteria.
Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on