startEditingAndReturnEditor(oper, index, waitEditorTime);
}
private JTextComponentOperator startEditingAndReturnEditor(ComponentOperator oper, final int index, Timeout waitEditorTime) {
checkSupported(oper);
final JTreeOperator toper = (JTreeOperator)oper;
final MouseDriver mdriver = DriverManager.getMouseDriver(oper);
queueTool.invokeSmoothly(new QueueTool.QueueAction("Path selecting") {
public Object launch() {
Point p = toper.getPointToClick(index);
mdriver.clickMouse(toper, p.x, p.y, 1, Operator.getDefaultMouseButton(),
0, toper.getTimeouts().
create("ComponentOperator.MouseClickTimeout"));
return(null);
}
});
oper.getTimeouts().sleep("JTreeOperator.BeforeEditTimeout");
queueTool.invokeSmoothly(new QueueTool.QueueAction("Path selecting") {
public Object launch() {
Point p = toper.getPointToClick(index);
mdriver.clickMouse(toper, p.x, p.y, 1, Operator.getDefaultMouseButton(),
0, toper.getTimeouts().
create("ComponentOperator.MouseClickTimeout"));
return(null);
}
});
toper.getTimeouts().
setTimeout("ComponentOperator.WaitComponentTimeout", waitEditorTime.getValue());
return(new JTextComponentOperator((JTextComponent)toper.
waitSubComponent(new JTextComponentOperator.
JTextComponentFinder())));
}