|
||||||||||
| 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.LabelMatcher
public class LabelMatcher
Understands matching by the text of the associated
Component and (optionally) by type.
JLabel
JLabel.getLabelFor(),
JLabel.setLabelFor(Component)| Constructor Summary | |
|---|---|
LabelMatcher(String label)
Creates a new . |
|
LabelMatcher(String label,
boolean requireShowing)
Creates a new . |
|
LabelMatcher(String label,
Class<? extends Component> type)
Creates a new . |
|
LabelMatcher(String label,
Class<? extends Component> type,
boolean requireShowing)
Creates a new . |
|
| Method Summary | |
|---|---|
boolean |
matches(Component c)
Indicates whether the given matches the criteria specified in this
matcher:
the text of the attached to the component to look for matches the text
specified in this matcher
the component to look for is of the type specified in this matcher (if specified)
visibility of the given matches the value specified in this matcher
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) |
String |
toString()
|
| 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, wait, wait, wait |
| Constructor Detail |
|---|
public LabelMatcher(String label)
LabelMatcher. The component to match does not have to be showing.
label - the text of the label associated to the component we are looking for.
NullPointerException - if the given label is null.
IllegalArgumentException - if the given label is empty.
public LabelMatcher(String label,
boolean requireShowing)
LabelMatcher.
label - the text of the label associated to the component we are looking for.requireShowing - indicates if the component to match should be showing or not.
NullPointerException - if the given label is null.
IllegalArgumentException - if the given label is empty.
public LabelMatcher(String label,
Class<? extends Component> type)
LabelMatcher. The component to match does not have to be showing.
label - the text of the label associated to the component we are looking for.type - the type of the component we are looking for.
NullPointerException - if the given label is null.
IllegalArgumentException - if the given label is empty.
NullPointerException - if the given type is null.
public LabelMatcher(String label,
Class<? extends Component> type,
boolean requireShowing)
LabelMatcher.
label - the text of the label associated to the component we are looking for.type - the type of the component we are looking for.requireShowing - indicates if the component to match should be showing or not.
NullPointerException - if the given label is null.
IllegalArgumentException - if the given label is empty.
NullPointerException - if the given type is null.| Method Detail |
|---|
@RunsInCurrentThread public boolean matches(Component c)
Component matches the criteria specified in this
matcher:
JLabelComponent matches the value specified in this matcher
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 name and visibility of the given Component matches the values
specified in this matcher, false otherwise.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||