org.netbeans.jemmy.drivers.text
Class AWTTextKeyboardDriver

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

public class AWTTextKeyboardDriver
extends TextKeyboardDriver

TextDriver for AWT text component types. Uses keyboard operations.

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

Constructor Summary
AWTTextKeyboardDriver()
          Constructs a AWTTextKeyboardDriver.
 
Method Summary
 Timeout getBetweenTimeout(ComponentOperator oper)
          Returns a timeout to sleep between text typing and caret operations.
 int getCaretPosition(ComponentOperator oper)
          Returns current caret position.
 org.netbeans.jemmy.drivers.text.NavigationKey[] getKeys(ComponentOperator oper)
          Returns an array of navigation keys.
 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.TextKeyboardDriver
changeCaretPosition, 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

AWTTextKeyboardDriver

public AWTTextKeyboardDriver()
Constructs a AWTTextKeyboardDriver.

Method Detail

getText

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

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

getCaretPosition

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

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

getSelectionStart

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

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

getSelectionEnd

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

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

getKeys

public org.netbeans.jemmy.drivers.text.NavigationKey[] getKeys(ComponentOperator oper)
Description copied from class: TextKeyboardDriver
Returns an array of navigation keys.

Specified by:
getKeys in class TextKeyboardDriver
Parameters:
oper - an operator.
Returns:
an array on NavigationKey instances.

getBetweenTimeout

public Timeout getBetweenTimeout(ComponentOperator oper)
Description copied from class: TextKeyboardDriver
Returns a timeout to sleep between text typing and caret operations.

Specified by:
getBetweenTimeout in class TextKeyboardDriver
Parameters:
oper - an operator.
Returns:
a Timeout instance.