Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.jemmy.util
Class StringPropChooser

    java.lang.Object
      |
      +--org.netbeans.jemmy.util.PropChooser
            |
            +--org.netbeans.jemmy.util.StringPropChooser

All Implemented Interfaces:
  ComponentChooser, Outputable

public class StringPropChooser
extends PropChooser

Implementation of org.netbeans.jemmy.ComponentChooser interface. Class can be used to find component by its field/methods values converted to String.
Example:

    	    JLabel label = JLabelOperator.findJLabel(frm0, new StringPropChooser("getText=JLabel",
    										 false, true));

Author:
  Alexandre Iline (alexandre.iline@sun.com)

Fields inherited from class org.netbeans.jemmy.util.PropChooser
`classes, params, propNames, results`

Constructor Summary
`StringPropChooser(java.lang.String[] propNames, java.lang.Object[][] params, java.lang.Class[][] classes, java.lang.String[] results, boolean ce, boolean ccs)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String[] propNames, java.lang.Object[][] params, java.lang.Class[][] classes, java.lang.String[] results, Operator.StringComparator comparator)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String[] propNames, java.lang.String[] results, boolean ce, boolean ccs)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String[] propNames, java.lang.String[] results, Operator.StringComparator comparator)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String props, boolean ce, boolean ccs)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String props, java.lang.Object[][] params, java.lang.Class[][] classes, boolean ce, boolean ccs)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String props, java.lang.Object[][] params, java.lang.Class[][] classes, Operator.StringComparator comparator)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String props, Operator.StringComparator comparator)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String props, java.lang.String semicolonChar, java.lang.String equalChar, boolean ce, boolean ccs)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String props, java.lang.String semicolonChar, java.lang.String equalChar, java.lang.Object[][] params, java.lang.Class[][] classes, boolean ce, boolean ccs)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String props, java.lang.String semicolonChar, java.lang.String equalChar, java.lang.Object[][] params, java.lang.Class[][] classes, Operator.StringComparator comparator)` Constructs a StringPropChooser object.
`StringPropChooser(java.lang.String props, java.lang.String semicolonChar, java.lang.String equalChar, Operator.StringComparator comparator)` Constructs a StringPropChooser object.

Method Summary
`protected boolean` | `checkProperty(java.lang.Object value, java.lang.Object etalon)` Method to check property.
`java.lang.String` | `getDescription()` Returns searched component description.

Methods inherited from class org.netbeans.jemmy.util.PropChooser
`checkComponent, getOutput, setOutput`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StringPropChooser

    public StringPropChooser(java.lang.String[] propNames,
                             java.lang.Object[][] params,
                             java.lang.Class[][] classes,
                             java.lang.String[] results,
                             Operator.StringComparator comparator)

  Constructs a StringPropChooser object.
  Parameters:
    `propNames` - Names of methods/fields
    `params` - Parameters values for methods.
    `classes` - Parameters classes.
    `results` - Objects to compare converted to String method/field values to.
    `comparator` - Defines string comparision criteria.

### StringPropChooser

    public StringPropChooser(java.lang.String[] propNames,
                             java.lang.Object[][] params,
                             java.lang.Class[][] classes,
                             java.lang.String[] results,
                             boolean ce,
                             boolean ccs)

  Constructs a StringPropChooser object.
  Parameters:
    `propNames` - Names of methods/fields
    `params` - Parameters values for methods.
    `classes` - Parameters classes.
    `results` - Objects to compare converted to String method/field values to.
    `ce` - Compare exactly.
    If true, compare exactly (.toString().equals())
    If false, compare as substring (.toString().indexOf() != -1)
    `ccs` - Compare case sensitive.
    if false convert both .toString() and to uppercase before comparison.

### StringPropChooser

    public StringPropChooser(java.lang.String[] propNames,
                             java.lang.String[] results,
                             Operator.StringComparator comparator)

  Constructs a StringPropChooser object.
  Parameters:
    `propNames` - Names of methods/fields
    `results` - Objects to compare converted to String method/field values to.
    `comparator` - Defines string comparision criteria.

### StringPropChooser

    public StringPropChooser(java.lang.String[] propNames,
                             java.lang.String[] results,
                             boolean ce,
                             boolean ccs)

  Constructs a StringPropChooser object.
  Parameters:
    `propNames` - Names of methods/fields
    `results` - Objects to compare converted to String method/field values to.
    `ce` - Compare exactly.
    `ccs` - Compare case sensitive.
    `@deprecated` - Use constructors with `StringComparator` parameters.

### StringPropChooser

    public StringPropChooser(java.lang.String props,
                             java.lang.String semicolonChar,
                             java.lang.String equalChar,
                             java.lang.Object[][] params,
                             java.lang.Class[][] classes,
                             Operator.StringComparator comparator)

  Constructs a StringPropChooser object.
  Parameters:
    `props` - Method/field names && values
    Like "getText=button;isVisible=true"
    `semicolonChar` - Method(field) names separator.
    `equalChar` - Method(field) name - expected value separator.
    `params` - Parameters values for methods.
    `classes` - Parameters classes.
    `comparator` - Defines string comparision criteria.

### StringPropChooser

    public StringPropChooser(java.lang.String props,
                             java.lang.String semicolonChar,
                             java.lang.String equalChar,
                             java.lang.Object[][] params,
                             java.lang.Class[][] classes,
                             boolean ce,
                             boolean ccs)

  Constructs a StringPropChooser object.
  Parameters:
    `props` - Method/field names && values
    Like "getText=button;isVisible=true"
    `semicolonChar` - Method(field) names separator.
    `equalChar` - Method(field) name - expected value separator.
    `params` - Parameters values for methods.
    `classes` - Parameters classes.
    `ce` - Compare exactly.
    `ccs` - Compare case sensitive.
    `@deprecated` - Use constructors with `StringComparator` parameters.

### StringPropChooser

    public StringPropChooser(java.lang.String props,
                             java.lang.String semicolonChar,
                             java.lang.String equalChar,
                             Operator.StringComparator comparator)

  Constructs a StringPropChooser object.
  Parameters:
    `props` - Method/field names && values
    `semicolonChar` - Method(field) names separator.
    `equalChar` - Method(field) name - expected value separator.
    `comparator` - Defines string comparision criteria.

### StringPropChooser

    public StringPropChooser(java.lang.String props,
                             java.lang.String semicolonChar,
                             java.lang.String equalChar,
                             boolean ce,
                             boolean ccs)

  Constructs a StringPropChooser object.
  Parameters:
    `props` - Method/field names && values
    `semicolonChar` - Method(field) names separator.
    `equalChar` - Method(field) name - expected value separator.
    `ce` - Compare exactly.
    `ccs` - Compare case sensitive.
    `@deprecated` - Use constructors with `StringComparator` parameters.

### StringPropChooser

    public StringPropChooser(java.lang.String props,
                             java.lang.Object[][] params,
                             java.lang.Class[][] classes,
                             Operator.StringComparator comparator)

  Constructs a StringPropChooser object.
  Parameters:
    `props` - Method/field names && values
    ";" is used as a method(field) names separator.
    "=" is used as a method(field) name - expected value separator.
    `params` - Parameters values for methods.
    `classes` - Parameters classes.
    `comparator` - Defines string comparision criteria.

### StringPropChooser

    public StringPropChooser(java.lang.String props,
                             java.lang.Object[][] params,
                             java.lang.Class[][] classes,
                             boolean ce,
                             boolean ccs)

  Constructs a StringPropChooser object.
  Parameters:
    `props` - Method/field names && values
    ";" is used as a method(field) names separator.
    "=" is used as a method(field) name - expected value separator.
    `params` - Parameters values for methods.
    `classes` - Parameters classes.
    `ce` - Compare exactly.
    `ccs` - Compare case sensitive.
    `@deprecated` - Use constructors with `StringComparator` parameters.

### StringPropChooser

    public StringPropChooser(java.lang.String props,
                             Operator.StringComparator comparator)

  Constructs a StringPropChooser object.
  Parameters:
    `props` - Method/field names && values ";" is used as a method(field) names separator.
    "=" is used as a method(field) name - expected value separator.
    `comparator` - Defines string comparision criteria.

### StringPropChooser

    public StringPropChooser(java.lang.String props,
                             boolean ce,
                             boolean ccs)

  Constructs a StringPropChooser object.
  Parameters:
    `props` - Method/field names && values ";" is used as a method(field) names separator.
    "=" is used as a method(field) name - expected value separator.
    `ce` - Compare exactly.
    `ccs` - Compare case sensitive.
    `@deprecated` - Use constructors with `StringComparator` parameters.

Method Detail

### getDescription

    public java.lang.String getDescription()

  Description copied from interface: `ComponentChooser`
  Returns searched component description.
  Overrides:
    `getDescription` in class `PropChooser`
  See Also:
    `ComponentChooser`

### checkProperty

    protected boolean checkProperty(java.lang.Object value,
                                    java.lang.Object etalon)

  Method to check property. Compares "value".toString() to (String)etalon according ce and ccs constructor parameters.
  Overrides:
    `checkProperty` in class `PropChooser`
  Parameters:
    `value` - Method/field value
    `etalon` - Object to compare to.
  Returns:
    true if the value matches the etalon.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD