Package org.netbeans.jemmy.drivers.text
Class SwingTextKeyboardDriver
- java.lang.Object
-
- org.netbeans.jemmy.drivers.LightSupportiveDriver
-
- org.netbeans.jemmy.drivers.text.TextKeyboardDriver
-
- org.netbeans.jemmy.drivers.text.SwingTextKeyboardDriver
-
- All Implemented Interfaces:
LightDriver
,TextDriver
public class SwingTextKeyboardDriver extends TextKeyboardDriver
TextDriver for swing text component types. Uses keyboard operations.- Author:
- Alexandre Iline(alexandre.iline@sun.com)
-
-
Constructor Summary
Constructors Constructor Description SwingTextKeyboardDriver()
Constructs a SwingTextKeyboardDriver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearText(ComponentOperator oper)
Clears component text.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.java.lang.String
getText(ComponentOperator oper)
Returns operator's text.-
Methods inherited from class org.netbeans.jemmy.drivers.text.TextKeyboardDriver
changeCaretPosition, changeCaretPosition, changeText, enterText, selectText, typeText
-
Methods inherited from class org.netbeans.jemmy.drivers.LightSupportiveDriver
checkSupported, getSupported
-
-
-
-
Method Detail
-
clearText
public void clearText(ComponentOperator oper)
Description copied from interface:TextDriver
Clears component text.- Specified by:
clearText
in interfaceTextDriver
- Overrides:
clearText
in classTextKeyboardDriver
- Parameters:
oper
- Text component operator.
-
getText
public java.lang.String getText(ComponentOperator oper)
Description copied from class:TextKeyboardDriver
Returns operator's text.- Specified by:
getText
in classTextKeyboardDriver
- 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 classTextKeyboardDriver
- 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 classTextKeyboardDriver
- 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 classTextKeyboardDriver
- 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 classTextKeyboardDriver
- 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 classTextKeyboardDriver
- Parameters:
oper
- an operator.- Returns:
- a Timeout instance.
-
-