org.eclipse.swtbot.swt.finder.matchers
Class WithStyle<T extends Widget>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher<T>
org.eclipse.swtbot.swt.finder.matchers.WithStyle<T>
- All Implemented Interfaces:
- Matcher<T>, SelfDescribing
public class WithStyle<T extends Widget>
- extends AbstractMatcher<T>
Matches if the widget has the specified style bits set.
- Since:
- 2.0
- Version:
- $Id$
- Author:
- Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>
- See Also:
Widget.getStyle()
Method Summary |
void |
describeTo(Description description)
|
protected boolean |
doMatch(Object obj)
Subclasses must override, this is the actual method that does the matching |
static
|
withStyle(int style,
String styleDescription)
Matches a widget that has the specified style bit set. |
doMatch
protected boolean doMatch(Object obj)
- Description copied from class:
AbstractMatcher
- Subclasses must override, this is the actual method that does the matching
- Specified by:
doMatch
in class AbstractMatcher<T extends Widget>
- Parameters:
obj
- the item to match.
- Returns:
true
if the item matches, false
otherwise.
describeTo
public void describeTo(Description description)
withStyle
public static <T extends Widget> Matcher<T> withStyle(int style,
String styleDescription)
- Matches a widget that has the specified style bit set.
- Parameters:
style
- the style bits.styleDescription
- the description of the style bits.
- Returns:
- a matcher.
- Since:
- 2.0