Package org.netbeans.jemmy.util
Class NameComponentChooser
- java.lang.Object
-
- org.netbeans.jemmy.util.NameComponentChooser
-
- All Implemented Interfaces:
ComponentChooser
public class NameComponentChooser extends Object implements ComponentChooser
Specifies criteria for component lookup basing on component name. By default uses new Operator.DefaultStringComparator(true, true) compa- Author:
- Nathan Paris (Nathan_Paris@adp.com), Alexandre Iline (alexandre.iline@sun.com)
-
-
Constructor Summary
Constructors Constructor Description NameComponentChooser(String name)Creates an instance to search for a component by name using exact comparision.NameComponentChooser(String name, Operator.StringComparator comparator)Creates an instance to search for a component by name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckComponent(Component component)Check if the component argument meets the search criteria.StringgetDescription()Returns searched component description.
-
-
-
Constructor Detail
-
NameComponentChooser
public NameComponentChooser(String name, Operator.StringComparator comparator)
Creates an instance to search for a component by name.- Parameters:
name- Expecten component name pattern.comparator- Comparator for a comparision of a component name with a pattern.
-
NameComponentChooser
public NameComponentChooser(String name)
Creates an instance to search for a component by name using exact comparision.- Parameters:
name- Expecten component name pattern.
-
-
Method Detail
-
checkComponent
public boolean checkComponent(Component component)
Description copied from interface:ComponentChooserCheck if the component argument meets the search criteria.- Specified by:
checkComponentin interfaceComponentChooser- Parameters:
component- Component to check.- Returns:
truewhen the component conforms to the search criteria;falseotherwise.
-
getDescription
public String getDescription()
Description copied from interface:ComponentChooserReturns searched component description.- Specified by:
getDescriptionin interfaceComponentChooser- Returns:
- a String representing the description value
-
-