public class SLAutoCompleteBox extends SLBase
Modifier | Constructor and Description |
---|---|
protected |
SLAutoCompleteBox(JtfObjectHandle handle,
Desktop desktop)
Creates a new SLAutoCompleteBox with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the drop-down list that contains the matches if it is currently open.
|
double |
getHorizontalScrollPercent()
Gets the current horizontal scroll position or negative one (-1) if there is no valid scroll position.
|
List<SLComboBoxItem> |
getItems()
Gets a list containing items of the current matches.
|
List<String> |
getItemTexts()
Gets a list containing the texts of the current matches.
|
double |
getVerticalScrollPercent()
Gets the current vertical scroll position or negative one (-1) if there is no valid scroll position.
|
boolean |
isHorizontallyScrollable()
Gets a value that indicates whether the combo box can scroll horizontally.
|
boolean |
isOpen()
Gets a value that indicates whether the auto complete box is open.
|
boolean |
isVerticallyScrollable()
Gets a value that indicates whether the combo box can scroll vertically.
|
void |
scrollHorizontal(ScrollAmount scrollAmount)
Scrolls the currently visible region of the content area, horizontally, the specified ScrollAmount.
|
void |
scrollVertical(ScrollAmount scrollAmount)
Scrolls the currently visible region of the content area, vertically, the specified ScrollAmount.
|
void |
select(String text)
Types the given text into the auto box complete box and selects a match.
|
void |
select(String text,
int matchIndex)
Types the given text into the auto box complete box and selects a match.
|
void |
setHorizontalScrollPercent(double percent)
Sets the horizontal scroll position as a percentage of the total content area within the combo box.
|
void |
setVerticalScrollPercent(double percent)
Sets the vertical scroll position as a percentage of the total content area within the combo box.
|
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
- the handle that identifies the SLAutoCompleteBoxdesktop
- the desktop on which this object livespublic void close()
public void scrollHorizontal(ScrollAmount scrollAmount)
scrollAmount
- the direction and distance to scrollpublic void scrollVertical(ScrollAmount scrollAmount)
scrollAmount
- the direction and distance to scrollpublic void select(String text)
If there is no match after entering the text an exception is thrown. If value of the parameter matchIndex
is less than 0 or greater than the number of matches an exception is thrown as well.
Sample Usage In order to select the first match starting with the text "Apple" type:
autoCompletBox.select("Apple");In order to select the third match starting with the text "A" type:
autoCompletBox.select("A", 2);
text
- the text to type into the text boxpublic void select(String text, int matchIndex)
If there is no match after entering the text an exception is thrown. If value of the parameter matchIndex
is less than 0 or greater than the number of matches an exception is thrown as well.
Sample Usage In order to select the first match starting with the text "Apple" type:
autoCompletBox.select("Apple");In order to select the third match starting with the text "A" type:
autoCompletBox.select("A", 2);
text
- the text to type into the text boxmatchIndex
- the index of the match to select. The value is zero-based.public void setHorizontalScrollPercent(double percent)
percent
- the percentage of the total horizontal content areapublic void setVerticalScrollPercent(double percent)
percent
- the percentage of the total vertical content areapublic boolean isHorizontallyScrollable()
public double getHorizontalScrollPercent()
public boolean isOpen()
public List<SLComboBoxItem> getItems()
public List<String> getItemTexts()
public boolean isVerticallyScrollable()
public double getVerticalScrollPercent()
Copyright 2009-2012 Micro Focus. All Rights Reserved.