public abstract class AbstractComponentMatcher extends Object implements ResettableComponentMatcher
ResettableComponentMatcher
.Constructor and Description |
---|
AbstractComponentMatcher()
Creates a new
AbstractComponentMatcher . |
AbstractComponentMatcher(boolean requireShowing)
Creates a new
AbstractComponentMatcher . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
requireShowing()
Indicates whether the AWT or Swing
Component to match has to be showing. |
protected void |
requireShowing(boolean shouldBeShowing)
Updates the value of the flag that indicates if the AWT or Swing
Component to match should be showing or
not. |
protected boolean |
requireShowingMatches(Component c)
Indicates if the value of the "showing" property of the given AWT or Swing
Component matches the value
specified in this matcher. |
void |
reset(boolean matchFound)
Resets the internal state of this matcher.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
matches
public AbstractComponentMatcher()
AbstractComponentMatcher
. The created matcher does not require the AWT or Swing
Component
to match to be showing.public AbstractComponentMatcher(boolean requireShowing)
AbstractComponentMatcher
.requireShowing
- indicates whether the AWT or Swing Component
to match should be showing or not.protected final boolean requireShowing()
Component
to match has to be showing.true
if the Component
to find has to be showing, false
otherwise.protected final void requireShowing(boolean shouldBeShowing)
Component
to match should be showing or
not.shouldBeShowing
- the new value to set.@RunsInCurrentThread protected final boolean requireShowingMatches(@Nonnull Component c)
Indicates if the value of the "showing" property of the given AWT or Swing Component
matches the value
specified in this matcher.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT). Client code must call this method from the EDT.
c
- the component to verify.true
if the value of the "isShowing" property of the given component matches the value specified in
this matcher, false
otherwise.public void reset(boolean matchFound)
reset
in interface ResettableComponentMatcher
matchFound
- indicates whether a match has been found before resetting.Copyright © 2014–2019 AssertJ. All rights reserved.