|
|||||||||
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 Class[][] |
classes
Classes of parameters. |
protected Object[][] |
params
Methods parameters. |
protected String[] |
propNames
Names of methods to check. |
protected Object[] |
results
Expected results of methods. |
Constructor Summary | |
---|---|
PropChooser(String[] propNames,
Object[] results)
Constructs a PropChooser object for checking of methods with no parameters. |
|
PropChooser(String[] propNames,
Object[][] params,
Class[][] classes,
Object[] results)
Constructs a PropChooser object. |
Method Summary | |
---|---|
boolean |
checkComponent(Component comp)
Check if the component argument meets the search criteria. |
protected boolean |
checkProperty(Object value,
Object etalon)
Method to check one method result with an etalon. |
String |
getDescription()
Returns searched component description. |
TestOut |
getOutput()
Returns print output streams or writers. |
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 String[] propNames
protected Object[][] params
protected Class[][] classes
protected Object[] results
Constructor Detail |
---|
public PropChooser(String[] propNames, Object[][] params, Class[][] classes, Object[] results)
propNames
- Names of methods/fieldsparams
- Parameters values for methods. classes
- Parameters classes.results
- Objects to compare method/field values to. public PropChooser(String[] propNames, 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(Component comp)
ComponentChooser
checkComponent
in interface ComponentChooser
comp
- Component to check.
true
when the component conforms to
the search criteria; false
otherwise.public String getDescription()
ComponentChooser
getDescription
in interface ComponentChooser
protected boolean checkProperty(Object value, 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 |