|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.jemmy.util.PropChooser
public class PropChooser
Implementation of org.netbeans.jemmy.ComponentChooser interface.
Class can be used to find component by its field/methods values.
Example:
String[] methods = {"getClientProperty"}; Object[][] params = {{"classname"}}; Class[][] classes = {{Object.class}}; Object[] results = {"javax.swing.JCheckBox"}; JCheckBox box = JCheckBoxOperator.findJCheckBox(frm0, new PropChooser(methods, params, classes, results));Or:
String[] methods = {"getText"}; Object[] results = {"Open"}; JButtonOperator box = new JButtonOperator(containerOperator, new PropChooser(fields, results));
Field Summary | |
---|---|
protected java.lang.Class[][] |
classes
Classes of parameters. |
protected java.lang.Object[][] |
params
Methods parameters. |
protected java.lang.String[] |
propNames
Names of methods to check. |
protected java.lang.Object[] |
results
Expected results of methods. |
Constructor Summary | |
---|---|
PropChooser(java.lang.String[] propNames,
java.lang.Object[] results)
Constructs a PropChooser object for checking of methods with no parameters. |
|
PropChooser(java.lang.String[] propNames,
java.lang.Object[][] params,
java.lang.Class[][] classes,
java.lang.Object[] results)
Constructs a PropChooser object. |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Returns searched component description. |
TestOut |
getOutput()
Returns print output streams or writers. |
boolean |
checkComponent(java.awt.Component comp)
Check if the component argument meets the search criteria. |
protected boolean |
checkProperty(java.lang.Object value,
java.lang.Object etalon)
Method to check one method result with an etalon. |
void |
setOutput(TestOut output)
Defines print output streams or writers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String[] propNames
protected java.lang.Object[][] params
protected java.lang.Class[][] classes
protected java.lang.Object[] results
Constructor Detail |
---|
public PropChooser(java.lang.String[] propNames, java.lang.Object[][] params, java.lang.Class[][] classes, java.lang.Object[] results)
propNames
- Names of methods/fieldsparams
- Parameters values for methods. classes
- Parameters classes.results
- Objects to compare method/field values to. public PropChooser(java.lang.String[] propNames, java.lang.Object[] results)
propNames
- Names of methods/fieldsresults
- Objects to compare method/field values to.Method Detail |
---|
public void setOutput(TestOut output)
Outputable
setOutput
in interface Outputable
output
- Identify the streams or writers used for print output.Outputable.getOutput()
public TestOut getOutput()
Outputable
getOutput
in interface Outputable
Outputable.setOutput(org.netbeans.jemmy.TestOut)
public boolean checkComponent(java.awt.Component comp)
ComponentChooser
checkComponent
in interface ComponentChooser
comp
- Component to check.
true
when the component conforms to
the search criteria; false
otherwise.public java.lang.String getDescription()
ComponentChooser
getDescription
in interface ComponentChooser
protected boolean checkProperty(java.lang.Object value, java.lang.Object etalon)
value
- Method/field valueetalon
- Object to compare to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |