01: // Copyright (c) 2002-2005 Canoo Engineering AG, Switzerland. All Rights Reserved.
02:
03: package com.canoo.webtest.extension.applet.jemmy;
04:
05: import org.netbeans.jemmy.ComponentChooser;
06:
07: import java.awt.Component;
08:
09: /**
10:
11: * Accepts any components.
12:
13: * This chooser is to be used to wait for components identified by their index:
14:
15: * <pre>
16:
17: * JTextFieldOperator.waitJTextField(secOper, <em>new AnyComponentChooser()</em>, index);
18:
19: * </pre>.
20:
21: */
22:
23: public class AnyComponentChooser implements ComponentChooser {
24:
25: public static final ComponentChooser ANY_COMPONENT_CHOOSER;
26:
27: static {
28:
29: ANY_COMPONENT_CHOOSER = new AnyComponentChooser();
30:
31: }
32:
33: public boolean checkComponent(Component component) {
34:
35: return true;
36:
37: }
38:
39: public String getDescription() {
40:
41: return "Accepts any components.";
42:
43: }
44:
45: }
|