Package org.fest.swing.core
Class AbstractComponentMatcher
java.lang.Object
org.fest.swing.core.AbstractComponentMatcher
- All Implemented Interfaces:
ComponentMatcher
,ResettableComponentMatcher
- Direct Known Subclasses:
GenericTypeMatcher
,LabelMatcher
,NameMatcher
,TypeMatcher
Understands a base class for implementations of
ResettableComponentMatcher
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newAbstractComponentMatcher
.AbstractComponentMatcher
(boolean requireShowing) Creates a newAbstractComponentMatcher
. -
Method Summary
Modifier and TypeMethodDescriptionprotected final boolean
Indicates whether the component to match has to be showing.protected final void
requireShowing
(boolean shouldBeShowing) Updates the value of the flag that indicates if the component to match should be showing or not.protected final boolean
Indicates if the value of the "showing" property of the given component matches the value specified in this matcher.void
reset
(boolean matchFound) Resets the internal state of this matcher.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.fest.swing.core.ComponentMatcher
matches
-
Field Details
-
requireShowing
private boolean requireShowing
-
-
Constructor Details
-
AbstractComponentMatcher
public AbstractComponentMatcher()Creates a newAbstractComponentMatcher
. -
AbstractComponentMatcher
public AbstractComponentMatcher(boolean requireShowing) Creates a newAbstractComponentMatcher
.- Parameters:
requireShowing
- indicates if the component to match should be showing or not.
-
-
Method Details
-
requireShowing
protected final boolean requireShowing()Indicates whether the component to match has to be showing.- Returns:
true
if the component to find has to be showing,false
otherwise.
-
requireShowing
protected final void requireShowing(boolean shouldBeShowing) Updates the value of the flag that indicates if the component to match should be showing or not.- Parameters:
shouldBeShowing
- the new value to set.
-
requireShowingMatches
Indicates if the value of the "showing" property of the given component matches the value specified in this matcher.Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
c
- the component to verify.- Returns:
true
if the value of the "isShowing" property of the given component matches the value specified in this matcher,false
otherwise.
-
reset
public void reset(boolean matchFound) Resets the internal state of this matcher.- Specified by:
reset
in interfaceResettableComponentMatcher
- Parameters:
matchFound
- indicates whether a match has been found before resetting.- Since:
- 1.2
-