org.netbeans.jemmy.operators
Class JMenuOperator.JMenuByLabelFinder

java.lang.Object
  extended by org.netbeans.jemmy.operators.JMenuOperator.JMenuByLabelFinder
All Implemented Interfaces:
ComponentChooser
Enclosing class:
JMenuOperator

public static class JMenuOperator.JMenuByLabelFinder
extends Object
implements ComponentChooser

Allows to find component by text.


Constructor Summary
JMenuOperator.JMenuByLabelFinder(String lb)
          Constructs JMenuByLabelFinder.
JMenuOperator.JMenuByLabelFinder(String lb, Operator.StringComparator comparator)
          Constructs JMenuByLabelFinder.
 
Method Summary
 boolean checkComponent(Component comp)
          Check if the component argument meets the search criteria.
 String getDescription()
          Returns searched component description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMenuOperator.JMenuByLabelFinder

public JMenuOperator.JMenuByLabelFinder(String lb,
                                        Operator.StringComparator comparator)
Constructs JMenuByLabelFinder.

Parameters:
lb - a text pattern
comparator - specifies string comparision algorithm.

JMenuOperator.JMenuByLabelFinder

public JMenuOperator.JMenuByLabelFinder(String lb)
Constructs JMenuByLabelFinder.

Parameters:
lb - a text pattern
Method Detail

checkComponent

public boolean checkComponent(Component comp)
Description copied from interface: ComponentChooser
Check if the component argument meets the search criteria.

Specified by:
checkComponent in interface ComponentChooser
Parameters:
comp - Component to check.
Returns:
true when the component conforms to the search criteria; false otherwise.

getDescription

public String getDescription()
Description copied from interface: ComponentChooser
Returns searched component description.

Specified by:
getDescription in interface ComponentChooser
Returns:
a String representing the description value