|
|||||||||||
| 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.JMenuItemFinder
A generic component finder which uses just the type (class) for filtering.
The pattern syntax can be found at the Jakarta RegExp API Documentation in RE.
This class delegates the matching of the Icon to an instance of IconMatcher
| Field Summary | |
private boolean |
m_caseIndependent
A boolean specifying whether the filtration is case insensitive. |
private IconMatcher |
m_iconMatcher
The matcher for the icon of the AbstractButton component. |
private java.lang.String |
m_text
The text of the component. |
| Fields inherited from class junit.extensions.jfcunit.finder.Finder |
OP_CONTAINS, OP_ENDSWITH, OP_EQUALS, OP_MATCH, OP_STARTSWITH |
| Constructor Summary | |
JMenuItemFinder(javax.swing.Icon icon)
Constructor accepting all arguments needed to filter the component. |
|
JMenuItemFinder(java.lang.String text)
Constructor accepting all arguments needed to filter the component. |
|
JMenuItemFinder(java.lang.String text,
boolean caseIndependent)
Constructor accepting all arguments needed to filter the component. |
|
JMenuItemFinder(java.lang.String text,
javax.swing.Icon icon)
Constructor accepting all arguments needed to filter the component. |
|
JMenuItemFinder(java.lang.String text,
javax.swing.Icon icon,
boolean caseIndependent)
Constructor accepting all arguments needed to filter the component. |
|
| Method Summary | |
javax.swing.Icon |
getIcon()
Get the icon to be matched. |
java.lang.String |
getText()
Get the text to be matched. |
void |
setCaseIndependent(boolean ignoreCase)
Set the finder into a case independent mode. |
void |
setIcon(javax.swing.Icon icon)
Set the icon to be matched. |
void |
setText(java.lang.String text)
Set the text to be matched. |
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 IconMatcher m_iconMatcher
AbstractButton component.
private java.lang.String m_text
private boolean m_caseIndependent
| Constructor Detail |
public JMenuItemFinder(java.lang.String text)
text - The desired pattern for the text of the component.
public JMenuItemFinder(java.lang.String text,
boolean caseIndependent)
text - The desired pattern for the text of the component.caseIndependent - Whether the match should be case independent (true) or not (false)public JMenuItemFinder(javax.swing.Icon icon)
icon - The desired pattern for the icon of the component.
public JMenuItemFinder(java.lang.String text,
javax.swing.Icon icon)
text - The desired pattern for the text of the component.icon - The desired pattern for the icon of the component.
public JMenuItemFinder(java.lang.String text,
javax.swing.Icon icon,
boolean caseIndependent)
text - The desired pattern for the text of the component.icon - The desired pattern for the icon of the component.caseIndependent - Whether the match should be case independent (true) or not (false)| Method Detail |
public void setCaseIndependent(boolean ignoreCase)
setCaseIndependent in class FinderignoreCase - true if case should be ignored.public final void setIcon(javax.swing.Icon icon)
icon - Icon to be matched.public final javax.swing.Icon getIcon()
public final void setText(java.lang.String text)
text - to be matched to the menu item.public final java.lang.String getText()
public boolean testComponent(java.awt.Component comp)
testComponent in class Findercomp - The component to test
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||