public class SLComboBox extends SLBase
Combo boxes in Silverlight require to be opened once before information about their items can be retrieved.
Modifier | Constructor and Description |
---|---|
protected |
SLComboBox(JtfObjectHandle handle,
Desktop desktop)
Creates a new SLComboBox with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the combo box.
|
double |
getHorizontalScrollPercent()
Gets the current horizontal scroll position or negative one (-1) if there is no valid scroll position.
|
List<SLComboBoxItem> |
getItems()
Gets a complete list of items.
|
List<String> |
getItemTexts()
Gets a complete list of item texts.
|
int |
getSelectedIndex()
Gets the index of the selected item or negative one (-1) if the selection is empty.
|
SLComboBoxItem |
getSelectedItem()
Gets the selected item or null if the selection is empty.
|
String |
getSelectedItemText()
Gets the text of the selected item or an empty string if the selection is empty.
|
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 combo box is open.
|
boolean |
isVerticallyScrollable()
Gets a value that indicates whether the combo box can scroll vertically.
|
void |
open()
Opens the combo box.
|
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(int itemIndex)
Selects an item in the combo box.
|
void |
select(ItemIdentifier item)
Selects an item in the combo box.
|
void |
select(String itemText)
Selects an item in the combo box.
|
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 SLComboBox(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the SLComboBoxdesktop
- the desktop on which this object livespublic void close()
public void open()
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(ItemIdentifier item)
Sample Usage In order to select the item with the text "item 1" from a combo box type:
comboBox.select("item 1");In order to select the third item from a combo box type:
comboBox.select(3);
item
- the item to selectpublic void select(String itemText)
Sample Usage In order to select the item with the text "item 1" from a combo box type:
comboBox.select("item 1");In order to select the third item from a combo box type:
comboBox.select(3);
itemText
- the item to selectpublic void select(int itemIndex)
Sample Usage In order to select the item with the text "item 1" from a combo box type:
comboBox.select("item 1");In order to select the third item from a combo box type:
comboBox.select(3);
itemIndex
- the item to selectpublic 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()
Sample Usage
comboBox.open(); Listitems = comboBox.getItemTexts(); comboBox.close();
public int getSelectedIndex()
public SLComboBoxItem getSelectedItem()
public String getSelectedItemText()
public boolean isVerticallyScrollable()
public double getVerticalScrollPercent()
Copyright 2009-2012 Micro Focus. All Rights Reserved.