public void selectText(ComponentOperator oper, int startPosition, int finalPosition) {
checkSupported(oper);
int start = (startPosition < finalPosition) ? startPosition : finalPosition;
int end = (startPosition > finalPosition) ? startPosition : finalPosition;
if(oper instanceof TextComponentOperator) {
TextComponentOperator toper = ((TextComponentOperator)oper);
toper.setSelectionStart(start);
toper.setSelectionEnd(end);
} else {
JTextComponentOperator toper = ((JTextComponentOperator)oper);
toper.setSelectionStart(start);
toper.setSelectionEnd(end);
}
}