public class AWTTextComponent extends AWTComponent
Modifier | Constructor and Description |
---|---|
protected |
AWTTextComponent(JtfObjectHandle handle,
Desktop desktop)
Creates a new AWTTextComponent with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all the text from the text component.
|
int |
getCaretPosition()
Gets the position of the text insertion caret for the text component.
|
String |
getSelectedText()
Gets the current selected text.
|
int |
getSelectionEnd()
Gets the end position of the selected text.
|
int |
getSelectionStart()
Gets the start position of the selected text.
|
String |
getText()
Gets the text of the text area.
|
boolean |
isEditable()
Gets whether the text of the text component can be changed by the user.
|
void |
selectAll()
Selects all the text in the text component.
|
void |
setCaretPosition(int index)
Sets the position of the text insertion caret for this text component.
|
void |
setSelectionRange(int selectionStart,
int selectionEnd)
Selects the text within the specified range.
|
void |
setText(String text)
Sets the text of the text component to the specified text.
|
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAccessibleName, getAccessibleRole, getBackground, getCursor, getFont, getForeground, getHeight, getName, getNativeHandle, getWidth, isEnabled, isFocusable, isFocused, mouseMove, mouseMove, openContextMenu, openContextMenu, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, scrollIntoView, setFocus, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected AWTTextComponent(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the AWTTextComponentdesktop
- the desktop on which this object livespublic void clear()
public void selectAll()
public void setCaretPosition(int index)
index
- new position of the text insertion caret. The value is zero-based.public void setSelectionRange(int selectionStart, int selectionEnd)
selectionStart
- the start position of the selection. The value is zero-based.selectionEnd
- the end position of the selection. The value is zero-based.public void setText(String text)
text
- new text of the text componentpublic int getCaretPosition()
public boolean isEditable()
public String getSelectedText()
public int getSelectionEnd()
public int getSelectionStart()
public String getText()
getText
in class TestObject
Copyright 2009-2012 Micro Focus. All Rights Reserved.