|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.swing.core.AbstractComponentMatcher
org.fest.swing.core.GenericTypeMatcher<T>
T
- the type of Component
supported by this matcher.public abstract class GenericTypeMatcher<T extends Component>
Understands a
that matches a ComponentMatcher
by type and some
custom search criteria.
Component
Constructor Summary | |
---|---|
GenericTypeMatcher(Class<T> supportedType)
Creates a new GenericTypeMatcher . |
|
GenericTypeMatcher(Class<T> supportedType,
boolean requireShowing)
Creates a new GenericTypeMatcher . |
Method Summary | |
---|---|
protected abstract boolean |
isMatching(T component)
Verifies that the given component matches some search criteria. |
boolean |
matches(Component c)
Verifies that the given :
Is an instance of the generic type specified in this
Matches some search criteria
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) |
Class<T> |
supportedType()
Returns the supported type of this matcher. |
Methods inherited from class org.fest.swing.core.AbstractComponentMatcher |
---|
requireShowing, requireShowing, requireShowingMatches, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericTypeMatcher(Class<T> supportedType)
GenericTypeMatcher
. The component to match does not have to be showing.
supportedType
- the type supported by this matcher.
NullPointerException
- if the given type is null
.public GenericTypeMatcher(Class<T> supportedType, boolean requireShowing)
GenericTypeMatcher
.
supportedType
- the type supported by this matcher.requireShowing
- indicates if the component to match should be showing or not.
NullPointerException
- if the given type is null
.Method Detail |
---|
@RunsInCurrentThread public final boolean matches(Component c)
Component
:
ComponentMatcher
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 given Component
is an instance of the generic type of this matcher
and matches some search criteria. Otherwise, false
.public final Class<T> supportedType()
@RunsInCurrentThread protected abstract boolean isMatching(T component)
Note: Implementations of this method may not be guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
component
- the Component
to verify.
true
if the given component matches the defined search criteria; otherwise, false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |