public final class TypeMatcher extends AbstractComponentMatcher
Component matching by type.| Constructor and Description |
|---|
TypeMatcher(Class<? extends Component> type)
Creates a new
. |
TypeMatcher(Class<? extends Component> type,
boolean requireShowing)
Creates a new
. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(Component c)
Indicates whether the type and visibility of the given
matches the value
specified in this matcher. |
String |
toString() |
requireShowing, requireShowing, requireShowingMatches, resetpublic TypeMatcher(Class<? extends Component> type)
TypeMatcher. The component to match does not have to be showing.type - the type of the component we are looking for.NullPointerException - if the given type is null.public TypeMatcher(Class<? extends Component> type, boolean requireShowing)
TypeMatcher.type - the type of the component we are looking for.requireShowing - indicates if the component to match should be showing or not.NullPointerException - if the given type is null.@RunsInCurrentThread public boolean matches(Component c)
Component matches the value
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.
c - the Component to verify.true if the type and visibility of the given Component matches the values
specified in this matcher, false otherwise.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.