public class TextField extends Control
Modifier | Constructor and Description |
---|---|
protected |
TextField(JtfObjectHandle handle,
Desktop desktop)
Creates a new TextField with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
clearText()
Removes all text from the text field.
|
List<String> |
getMultiText()
Returns the specified lines of text in the multi-line text field.
|
List<String> |
getMultiText(int startLine)
Returns the specified lines of text in the multi-line text field.
|
List<String> |
getMultiText(int startLine,
int numberOfLines)
Returns the specified lines of text in the multi-line text field.
|
TextPosition |
getPosition()
Gets the position of the caret within the text field.
|
TextRange |
getSelectedRange()
Gets the selected range within the text field.
|
String |
getSelectedText()
Gets the selected text within the text field.
|
boolean |
isMultiLine()
Gets whether the control is multiline.
|
boolean |
isPassword()
Gets whether the control is a password text field.
|
void |
setMultiText(List<String> text)
Substitutes all or part of the lines in the multi-line text field.
|
void |
setMultiText(List<String> text,
int startLine)
Substitutes all or part of the lines in the multi-line text field.
|
void |
setMultiText(List<String> text,
int startLine,
int numberOfLines)
Substitutes all or part of the lines in the multi-line text field.
|
void |
setPosition(TextPosition position)
Sets the insertion point in the text field.
|
void |
setSelectedRange(TextRange selectedRange)
Sets the selected range within the text field.
|
void |
setSelectionRange(TextRange selectionRange)
Selects the specified range of the single-line or multi-line text field.
|
void |
setText(String text)
Substitutes new text for all or part of the text in the text field.
|
getHorizontalBar, getVerticalBar, openContextMenu, openContextMenu
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getBackground, getFont, getForeground, getNativeHandle, isEnabled, isFocused, isVisible, mouseMove, mouseMove, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, setBackground, setEnabled, setFocus, setFont, setForeground, setVisible, 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 TextField(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the TextFielddesktop
- the desktop on which this object livespublic void clearText()
public List<String> getMultiText()
public List<String> getMultiText(int startLine)
startLine
- the number of the first line to return. The value is zero-based.public List<String> getMultiText(int startLine, int numberOfLines)
startLine
- the number of the first line to return. The value is zero-based.numberOfLines
- the number of lines to returnpublic void setMultiText(List<String> text)
text
- the text to substitutepublic void setMultiText(List<String> text, int startLine)
text
- the text to substitutestartLine
- the line in the text field (starting from 0) to begin the substitution. The value is zero-based.public void setMultiText(List<String> text, int startLine, int numberOfLines)
text
- the text to substitutestartLine
- the line in the text field (starting from 0) to begin the substitution. The value is zero-based.numberOfLines
- the number of lines to substitutepublic void setPosition(TextPosition position)
position
- the position of the caret within the text fieldpublic void setSelectionRange(TextRange selectionRange)
selectionRange
- the selected range within the text fieldpublic void setText(String text)
text
- the text to substitutepublic boolean isPassword()
public boolean isMultiLine()
public TextPosition getPosition()
public TextRange getSelectedRange()
public void setSelectedRange(TextRange selectedRange)
selectedRange
- the selected range within the text fieldpublic String getSelectedText()
Copyright 2009-2012 Micro Focus. All Rights Reserved.