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
.TypeMatcher
TypeMatcher
(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 given
matches the value specified in this matcher.Component
Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
c
- theComponent
to verify.- Returns:
true
if the type and visibility of the givenComponent
matches the values specified in this matcher,false
otherwise.
-
toString
-