* @return Component instance.
*/
public Component waitSubComponent(final ComponentChooser chooser, final int index) {
getOutput().printLine("Waiting for \"" + chooser.getDescription() +
"\" subcomponent");
final ComponentSearcher searcher = new ComponentSearcher((Container)getSource());
searcher.setOutput(getOutput().createErrorOutput());
Waiter waiter = new Waiter(new Waitable() {
public Object actionProduced(Object obj) {
return(searcher.findComponent(chooser, index));
}
public String getDescription() {
return("Wait for \"" + chooser.getDescription() +
"\" subcomponent to be displayed");
}