org.netbeans.jemmy.drivers.text
Class SwingTextAPIDriver

java.lang.Object
  extended by org.netbeans.jemmy.drivers.LightSupportiveDriver
      extended by org.netbeans.jemmy.drivers.text.TextAPIDriver
          extended by org.netbeans.jemmy.drivers.text.SwingTextAPIDriver
All Implemented Interfaces:
LightDriver, TextDriver

public class SwingTextAPIDriver
extends TextAPIDriver

TextDriver for swing component types. Uses API calls.

Author:
Alexandre Iline(alexandre.iline@sun.com)

Constructor Summary
SwingTextAPIDriver()
          Constructs a SwingTextAPIDriver.
 
Method Summary
 int getCaretPosition(ComponentOperator oper)
          Returns current caret position.
 int getSelectionEnd(ComponentOperator oper)
          Returns a caret position of selection end.
 int getSelectionStart(ComponentOperator oper)
          Returns a caret position of selection start.
 String getText(ComponentOperator oper)
          Returns operator's text.
 
Methods inherited from class org.netbeans.jemmy.drivers.text.TextAPIDriver
changeCaretPosition, changeText, clearText, enterText, selectText, typeText
 
Methods inherited from class org.netbeans.jemmy.drivers.LightSupportiveDriver
checkSupported, getSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingTextAPIDriver

public SwingTextAPIDriver()
Constructs a SwingTextAPIDriver.

Method Detail

getText

public String getText(ComponentOperator oper)
Description copied from class: TextAPIDriver
Returns operator's text.

Specified by:
getText in class TextAPIDriver
Parameters:
oper - an operator.
Returns:
string representing component text.

getCaretPosition

public int getCaretPosition(ComponentOperator oper)
Description copied from class: TextAPIDriver
Returns current caret position.

Specified by:
getCaretPosition in class TextAPIDriver
Parameters:
oper - an operator.
Returns:
int represnting current operator's caret position.

getSelectionStart

public int getSelectionStart(ComponentOperator oper)
Description copied from class: TextAPIDriver
Returns a caret position of selection start.

Specified by:
getSelectionStart in class TextAPIDriver
Parameters:
oper - an operator.
Returns:
int represnting index of operator's selection start.

getSelectionEnd

public int getSelectionEnd(ComponentOperator oper)
Description copied from class: TextAPIDriver
Returns a caret position of selection end.

Specified by:
getSelectionEnd in class TextAPIDriver
Parameters:
oper - an operator.
Returns:
int represnting index of operator's selection end.