public class SLTextBox extends SLBase
使用例
textBox.setText("some text"); textBox.setSelection(0, 4); // 最初の文字から 4 文字を選択 textBox.typeKeys("<Ctrl+C>"); // 選択したテキストをクリップボードにコピー String selectedText = desktop.getClipboardText(); // クリップボードからテキストを取得
修飾子 | コンストラクタと説明 |
---|---|
protected |
SLTextBox(JtfObjectHandle handle,
Desktop desktop)
JtfObjectHandle を持つ新しい SLTextBox を作成します。
|
修飾子とタイプ | メソッドと説明 |
---|---|
void |
clear()
すべてのテキストをテキスト フィールドから削除します。
|
String |
getText()
[読み取り専用] テキスト ボックスに表示されるテキスト。
|
boolean |
isReadOnly()
[読み取り専用] テキスト ボックスが読み取り専用かどうか。
|
void |
setPosition(int position)
テキスト フィールド内の挿入位置を設定します。
|
void |
setSelection(int startPosition,
int length)
テキスト ボックス内のテキストの範囲を選択します。
|
void |
setText(String text)
テキスト フィールド内のテキストを指定したテキストで置換します。
|
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAutomationId, getClassName, getName, getRawChildren, getRawChildren, isEnabled, isFocused, mouseMove, mouseMove, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, 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 SLTextBox(JtfObjectHandle handle, Desktop desktop)
handle
- SLTextBox を識別するハンドルdesktop
- このオブジェクトが存在するデスクトップpublic void clear()
public void setPosition(int position)
position
- テキスト フィールド内のキャレットの位置。. The value is zero-based.public void setSelection(int startPosition, int length)
startPosition
- 選択範囲の開始インデックス. The value is zero-based.length
- 開始位置から選択する文字数public void setText(String text)
text
- 新しいテキストpublic boolean isReadOnly()
public String getText()
getText
クラス内 TestObject
Copyright 2009-2012 Micro Focus. All Rights Reserved.