Package org.fest.swing.core
Class TypeMatcher
java.lang.Object
org.fest.swing.core.AbstractComponentMatcher
org.fest.swing.core.TypeMatcher
- All Implemented Interfaces:
ComponentMatcher,ResettableComponentMatcher
Understands
Component matching by type.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTypeMatcher(Class<? extends Component> type) Creates a new.TypeMatcherTypeMatcher(Class<? extends Component> type, boolean requireShowing) Creates a new.TypeMatcher -
Method Summary
Methods inherited from class org.fest.swing.core.AbstractComponentMatcher
requireShowing, requireShowing, requireShowingMatches, reset
-
Field Details
-
type
-
-
Constructor Details
-
TypeMatcher
Creates a new. The component to match does not have to be showing.TypeMatcher- Parameters:
type- the type of the component we are looking for.- Throws:
NullPointerException- if the given type isnull.
-
TypeMatcher
Creates a new.TypeMatcher- Parameters:
type- the type of the component we are looking for.requireShowing- indicates if the component to match should be showing or not.- Throws:
NullPointerException- if the given type isnull.
-
-
Method Details
-
matches
Indicates whether the type and visibility of the givenmatches the value specified in this matcher.ComponentNote: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
c- theComponentto verify.- Returns:
trueif the type and visibility of the givenComponentmatches the values specified in this matcher,falseotherwise.
-
toString
-