< prev index next >
core/JemmyCore/src/org/jemmy/input/SelectionText.java
Print this page
*** 33,71 ****
*
* @author shura
*/
public abstract class SelectionText extends CaretText implements IntervalSelectable {
- /**
- *
- * @param wrap
- */
public SelectionText(Wrap<?> wrap) {
super(wrap);
}
/**
* Selects <code>index</code>'th occurance of the regex.
! * @param regex
! * @param index
*/
public void select(String regex, int index) {
to(regex, true, index);
caret().selectTo(new RegexCaretDirection(this, this, regex, getFlags(), false, index));
}
/**
* Selects first occurance of the regex.
! * @param regex
*/
public void select(String regex) {
select(regex, 0);
}
/**
! * Retuns the selection portion of the text.
! * @return
*/
public String selection() {
int a = (int) anchor(); int p = (int) position();
int start = (a < p) ? a : p;
int end = (a < p) ? p : a;
--- 33,68 ----
*
* @author shura
*/
public abstract class SelectionText extends CaretText implements IntervalSelectable {
public SelectionText(Wrap<?> wrap) {
super(wrap);
}
/**
* Selects <code>index</code>'th occurance of the regex.
! *
! * @param regex the regular expression to select
! * @param index the occurance index
*/
public void select(String regex, int index) {
to(regex, true, index);
caret().selectTo(new RegexCaretDirection(this, this, regex, getFlags(), false, index));
}
/**
* Selects first occurance of the regex.
! *
! * @param regex the regular expression to select
*/
public void select(String regex) {
select(regex, 0);
}
/**
! * @return the selection portion of the text.
*/
public String selection() {
int a = (int) anchor(); int p = (int) position();
int start = (a < p) ? a : p;
int end = (a < p) ? p : a;
< prev index next >