|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.extensions.jfcunit.finder.Finder
junit.extensions.jfcunit.finder.NamedComponentFinder
This is a 'breakaway' from the ComponentFinder in which the component to be
tested is assumed to have a name and so the name passed in is compared to the comp.name
The pattern syntax can be found at the Jakarta RegExp API Documentation in RE
.
Field Summary | |
private boolean |
m_caseIndependent
A boolean specifying whether the filtration is case insensitive. |
private java.lang.Class |
m_compCls
The type of the component. |
private java.lang.String |
m_name
The pattern for the name of the component. |
Fields inherited from class junit.extensions.jfcunit.finder.Finder |
OP_CONTAINS, OP_ENDSWITH, OP_EQUALS, OP_MATCH, OP_STARTSWITH |
Constructor Summary | |
NamedComponentFinder(java.lang.Class cls,
java.lang.String name)
Constructor accepting all arguments needed to filter component. |
|
NamedComponentFinder(java.lang.Class cls,
java.lang.String name,
boolean caseIndependent)
Constructor accepting all arguments needed to filter component. |
Method Summary | |
java.lang.Class |
getComponentClass()
Get the component class to be found by the finder. |
java.lang.String |
getName()
Get the name of the component to be found. |
void |
setCaseIndependent(boolean ignoreCase)
Set the finder into a case independent mode. |
void |
setComponentClass(java.lang.Class cls)
Set the component class. |
void |
setName(java.lang.String name)
Set the name of the component to be found. |
boolean |
testComponent(java.awt.Component comp)
Method that returns true if the given component matches the search criteria. |
Methods inherited from class junit.extensions.jfcunit.finder.Finder |
createPatternMatcher, evaluate, find, find, find, find, findAll, findAll, findAll, findAll, findComponentList, getDebug, getDefaultWait, getOperation, getOperation, getOperationString, getShowDebug, getWait, isCaseIndependent, isValidForProcessing, matchPattern, matchPattern, matchPattern, pause, recreatePatternMatcher, setDebug, setDefaultWait, setIgnoreVisibility, setOperation, setShowDebug, setWait |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.Class m_compCls
private java.lang.String m_name
private boolean m_caseIndependent
Constructor Detail |
public NamedComponentFinder(java.lang.Class cls, java.lang.String name)
cls
- The desired type of the component.name
- The desired pattern for the name of the component.public NamedComponentFinder(java.lang.Class cls, java.lang.String name, boolean caseIndependent)
cls
- The desired type of the component.name
- The desired pattern for the name of the component.caseIndependent
- Whether the match should be case independent (true) or not (false)Method Detail |
public final void setComponentClass(java.lang.Class cls)
cls
- Class to be found by the finder.public final java.lang.Class getComponentClass()
public final void setName(java.lang.String name)
name
- String name of the component.public void setCaseIndependent(boolean ignoreCase)
setCaseIndependent
in class Finder
ignoreCase
- true if case should be ignored.public final java.lang.String getName()
public boolean testComponent(java.awt.Component comp)
testComponent
in class Finder
comp
- The component to test.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |