public class SLAutoCompleteBox extends SLBase
Modifier | Constructor and Description |
---|---|
protected |
SLAutoCompleteBox(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 SLAutoCompleteBox。
|
Modifier and Type | Method and Description |
---|---|
void |
close()
关闭包含匹配项的下拉列表(如果当前打开)。
|
double |
getHorizontalScrollPercent()
获取 当前水平滚动位置,如果无有效的滚动位置,则为负值 (-1)。
|
List<SLComboBoxItem> |
getItems()
获取 包含当前匹配项的项目的列表。
|
List<String> |
getItemTexts()
获取 包含当前匹配项的文本的列表。
|
double |
getVerticalScrollPercent()
获取 当前垂直滚动位置,如果无有效的滚动位置,则为负值 (-1)。
|
boolean |
isHorizontallyScrollable()
获取 表示组合框是否可水平滚动的值。
|
boolean |
isOpen()
获取 表示自动完成框是否已打开的值。
|
boolean |
isVerticallyScrollable()
获取 表示组合框是否可垂直滚动的值。
|
void |
scrollHorizontal(ScrollAmount scrollAmount)
将内容区域的当前可见区域水平滚动指定 ScrollAmount。
|
void |
scrollVertical(ScrollAmount scrollAmount)
将内容区域的当前可见区域垂直滚动指定 ScrollAmount。
|
void |
select(String text)
将指定文本键入至自动完成框并选择匹配项。
|
void |
select(String text,
int matchIndex)
将指定文本键入至自动完成框并选择匹配项。
|
void |
setHorizontalScrollPercent(double percent)
设置水平滚动位置占组合框内全部内容区域的百分比。
|
void |
setVerticalScrollPercent(double percent)
设置垂直滚动位置占组合框内全部内容区域的百分比。
|
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, getText, 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 SLAutoCompleteBox(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 SLAutoCompleteBox 的句柄desktop
- 此对象所在的桌面public void close()
public void scrollHorizontal(ScrollAmount scrollAmount)
scrollAmount
- 可滚动的方向和距离public void scrollVertical(ScrollAmount scrollAmount)
scrollAmount
- 可滚动的方向和距离public void select(String text)
如果在输入文本后无任何匹配项,则系统将抛出异常。如果参数 matchIndex
值小于 0 或大于匹配项数量,则系统也会抛出异常。
示例使用情况要选择以文本“Apple”类型开始的第一个匹配项:
autoCompletBox.select("Apple");要选择以文本“A”类型开始的第三个匹配项:
autoCompletBox.select("A", 2);
text
- 键入到文本框中的文本public void select(String text, int matchIndex)
如果在输入文本后无任何匹配项,则系统将抛出异常。如果参数 matchIndex
值小于 0 或大于匹配项数量,则系统也会抛出异常。
示例使用情况要选择以文本“Apple”类型开始的第一个匹配项:
autoCompletBox.select("Apple");要选择以文本“A”类型开始的第三个匹配项:
autoCompletBox.select("A", 2);
text
- 键入到文本框中的文本matchIndex
- 可选择的匹配项索引。. The value is zero-based.public void setHorizontalScrollPercent(double percent)
percent
- 全部水平内容区域的百分比public void setVerticalScrollPercent(double percent)
percent
- 全部垂直内容区域的百分比public boolean isHorizontallyScrollable()
public double getHorizontalScrollPercent()
public boolean isOpen()
public List<SLComboBoxItem> getItems()
public boolean isVerticallyScrollable()
public double getVerticalScrollPercent()
Copyright 2009-2012 Micro Focus. All Rights Reserved.