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 booleanIndicates whether the component to match has to be showing.protected final voidrequireShowing(boolean shouldBeShowing) Updates the value of the flag that indicates if the component to match should be showing or not.protected final booleanIndicates if the value of the "showing" property of the given component matches the value specified in this matcher.voidreset(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, waitMethods 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:
trueif the component to find has to be showing,falseotherwise.
-
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:
trueif the value of the "isShowing" property of the given component matches the value specified in this matcher,falseotherwise.
-
reset
public void reset(boolean matchFound) Resets the internal state of this matcher.- Specified by:
resetin interfaceResettableComponentMatcher- Parameters:
matchFound- indicates whether a match has been found before resetting.- Since:
- 1.2
-