public class SLDataGrid extends SLBase
If the data grid has a vertical scroll bar, rows which are not in the visible area of the data grid do not expose any information (e.g. text, caption). In order to interact with such a row or retrieve information about the row it needs to be scrolled into view first.
| Modifier | Constructor and Description |
|---|---|
protected |
SLDataGrid(JtfObjectHandle handle,
Desktop desktop)
Creates a new SLDataGrid with a JtfObjectHandle.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSelectMultiple()
Gets whether the data grid allows more than one row to be selected concurrently.
|
int |
getColumnCount()
Gets the number of columns in the data grid.
|
List<SLHeaderItem> |
getColumnHeaders()
Gets a list containing the header item for every column.
|
List<String> |
getColumnHeaderTexts()
Gets a list containing the text of the header item for every column.
|
double |
getHorizontalScrollPercent()
Gets the current horizontal scroll position or negative one (-1) if there is no valid scroll position.
|
int |
getRowCount()
Gets the number of rows in the data grid.
|
List<SLDataGridRow> |
getRows()
Gets a list of rows in the data grid.
|
List<String> |
getRowTexts()
Gets a list of row texts in the data grid.
|
SLDataGridCell |
getSelectedCell()
Gets the currently selected cell or
null if no cell is selected. |
String |
getSelectedCellText()
Gets the text of the currently selected cell or an empty string if no cell is selected.
|
SLDataGridRow |
getSelectedRow()
Gets the currently selected row or
null if no row is selected. |
List<SLDataGridRow> |
getSelectedRows()
Gets a list of currently selected rows or an empty list if no row is selected.
|
String |
getSelectedRowText()
Gets the text of the currently selected row or an empty string if no row is selected.
|
List<String> |
getSelectedRowTexts()
Gets the text of the currently selected rows or an empty list if no row is selected.
|
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 data grid can scroll horizontally.
|
boolean |
isVerticallyScrollable()
Gets a value that indicates whether the data grid can scroll vertically.
|
void |
scrollHorizontal(ScrollAmount scrollAmount)
Scrolls the currently visible region of the content area, horizontally, the specified ScrollAmount.
|
void |
scrollIntoView(int rowIndex)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(int rowIndex,
int columnIndex)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(int rowIndex,
ItemIdentifier column)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(int rowIndex,
String columnText)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(ItemIdentifier row)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(ItemIdentifier row,
int columnIndex)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(ItemIdentifier row,
ItemIdentifier column)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(ItemIdentifier row,
String columnText)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(String rowText)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(String rowText,
int columnIndex)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(String rowText,
ItemIdentifier column)
Scrolls the specified row or cell into view.
|
void |
scrollIntoView(String rowText,
String columnText)
Scrolls the specified row or cell into view.
|
void |
scrollVertical(ScrollAmount scrollAmount)
Scrolls the currently visible region of the content area, vertically, the specified ScrollAmount.
|
void |
select(int itemIndex)
Selects the specified row.
|
void |
select(int itemIndex,
ModifierKey modifiers)
Selects the specified row.
|
void |
select(ItemIdentifier item)
Selects the specified row.
|
void |
select(ItemIdentifier item,
ModifierKey modifiers)
Selects the specified row.
|
void |
select(String itemText)
Selects the specified row.
|
void |
select(String itemText,
ModifierKey modifiers)
Selects the specified row.
|
void |
selectCell(int rowIndex,
int columnIndex)
Selects the specified cell.
|
void |
selectCell(int rowIndex,
int columnIndex,
ModifierKey modifiers)
Selects the specified cell.
|
void |
selectCell(int rowIndex,
ItemIdentifier column)
Selects the specified cell.
|
void |
selectCell(int rowIndex,
ItemIdentifier column,
ModifierKey modifiers)
Selects the specified cell.
|
void |
selectCell(int rowIndex,
String columnText)
Selects the specified cell.
|
void |
selectCell(int rowIndex,
String columnText,
ModifierKey modifiers)
Selects the specified cell.
|
void |
selectCell(ItemIdentifier row,
int columnIndex)
Selects the specified cell.
|
void |
selectCell(ItemIdentifier row,
int columnIndex,
ModifierKey modifiers)
Selects the specified cell.
|
void |
selectCell(ItemIdentifier row,
ItemIdentifier column)
Selects the specified cell.
|
void |
selectCell(ItemIdentifier row,
ItemIdentifier column,
ModifierKey modifiers)
Selects the specified cell.
|
void |
selectCell(ItemIdentifier row,
String columnText)
Selects the specified cell.
|
void |
selectCell(ItemIdentifier row,
String columnText,
ModifierKey modifiers)
Selects the specified cell.
|
void |
selectCell(String rowText,
int columnIndex)
Selects the specified cell.
|
void |
selectCell(String rowText,
int columnIndex,
ModifierKey modifiers)
Selects the specified cell.
|
void |
selectCell(String rowText,
ItemIdentifier column)
Selects the specified cell.
|
void |
selectCell(String rowText,
ItemIdentifier column,
ModifierKey modifiers)
Selects the specified cell.
|
void |
selectCell(String rowText,
String columnText)
Selects the specified cell.
|
void |
selectCell(String rowText,
String columnText,
ModifierKey modifiers)
Selects the specified cell.
|
void |
setHorizontalScrollPercent(double percent)
Sets the horizontal scroll position as a percentage of the total content area within the data grid.
|
void |
setVerticalScrollPercent(double percent)
Sets the vertical scroll position as a percentage of the total content area within the data grid.
|
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, typePasswordKeyscaptureBitmap, 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, waitForPropertyequals, 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, toStringprotected SLDataGrid(JtfObjectHandle handle, Desktop desktop)
handle - the handle that identifies the SLDataGriddesktop - the desktop on which this object livespublic void scrollHorizontal(ScrollAmount scrollAmount)
scrollAmount - the direction and distance to scrollpublic void scrollIntoView(ItemIdentifier row)
row - the row where to scroll topublic void scrollIntoView(ItemIdentifier row, ItemIdentifier column)
row - the row where to scroll tocolumn - the column where to scroll topublic void scrollIntoView(ItemIdentifier row, String columnText)
row - the row where to scroll tocolumnText - the column where to scroll topublic void scrollIntoView(ItemIdentifier row, int columnIndex)
row - the row where to scroll tocolumnIndex - the column where to scroll topublic void scrollIntoView(String rowText)
rowText - the row where to scroll topublic void scrollIntoView(String rowText, ItemIdentifier column)
rowText - the row where to scroll tocolumn - the column where to scroll topublic void scrollIntoView(String rowText, String columnText)
rowText - the row where to scroll tocolumnText - the column where to scroll topublic void scrollIntoView(String rowText, int columnIndex)
rowText - the row where to scroll tocolumnIndex - the column where to scroll topublic void scrollIntoView(int rowIndex)
rowIndex - the row where to scroll topublic void scrollIntoView(int rowIndex,
ItemIdentifier column)
rowIndex - the row where to scroll tocolumn - the column where to scroll topublic void scrollIntoView(int rowIndex,
String columnText)
rowIndex - the row where to scroll tocolumnText - the column where to scroll topublic void scrollIntoView(int rowIndex,
int columnIndex)
rowIndex - the row where to scroll tocolumnIndex - the column where to scroll topublic void scrollVertical(ScrollAmount scrollAmount)
scrollAmount - the direction and distance to scrollpublic void select(ItemIdentifier item)
Sample Usage In order to select the row that contains two cells with the text "cell 1" and "cell 2" type:
dataGrid.select("cell 1 cell 2");
or
dataGrid.select("*cell 1*");
In order to select the third row from a data grid type:
dataGrid.select(2);In order to select multiple rows in a data grid use modifier keys (such as Ctrl or Shift). For selecting the fist and the third row in a data grid that supports multiple selections, type the following:
dataGrid.select(0); dataGrid.select(2, ModifierKey.Control);
item - the row to selectpublic void select(ItemIdentifier item, ModifierKey modifiers)
Sample Usage In order to select the row that contains two cells with the text "cell 1" and "cell 2" type:
dataGrid.select("cell 1 cell 2");
or
dataGrid.select("*cell 1*");
In order to select the third row from a data grid type:
dataGrid.select(2);In order to select multiple rows in a data grid use modifier keys (such as Ctrl or Shift). For selecting the fist and the third row in a data grid that supports multiple selections, type the following:
dataGrid.select(0); dataGrid.select(2, ModifierKey.Control);
item - the row to selectmodifiers - the modifier keys to press while selecting the row. Use a modifier to select multiple rows.public void select(String itemText)
Sample Usage In order to select the row that contains two cells with the text "cell 1" and "cell 2" type:
dataGrid.select("cell 1 cell 2");
or
dataGrid.select("*cell 1*");
In order to select the third row from a data grid type:
dataGrid.select(2);In order to select multiple rows in a data grid use modifier keys (such as Ctrl or Shift). For selecting the fist and the third row in a data grid that supports multiple selections, type the following:
dataGrid.select(0); dataGrid.select(2, ModifierKey.Control);
itemText - the row to selectpublic void select(String itemText, ModifierKey modifiers)
Sample Usage In order to select the row that contains two cells with the text "cell 1" and "cell 2" type:
dataGrid.select("cell 1 cell 2");
or
dataGrid.select("*cell 1*");
In order to select the third row from a data grid type:
dataGrid.select(2);In order to select multiple rows in a data grid use modifier keys (such as Ctrl or Shift). For selecting the fist and the third row in a data grid that supports multiple selections, type the following:
dataGrid.select(0); dataGrid.select(2, ModifierKey.Control);
itemText - the row to selectmodifiers - the modifier keys to press while selecting the row. Use a modifier to select multiple rows.public void select(int itemIndex)
Sample Usage In order to select the row that contains two cells with the text "cell 1" and "cell 2" type:
dataGrid.select("cell 1 cell 2");
or
dataGrid.select("*cell 1*");
In order to select the third row from a data grid type:
dataGrid.select(2);In order to select multiple rows in a data grid use modifier keys (such as Ctrl or Shift). For selecting the fist and the third row in a data grid that supports multiple selections, type the following:
dataGrid.select(0); dataGrid.select(2, ModifierKey.Control);
itemIndex - the row to selectpublic void select(int itemIndex,
ModifierKey modifiers)
Sample Usage In order to select the row that contains two cells with the text "cell 1" and "cell 2" type:
dataGrid.select("cell 1 cell 2");
or
dataGrid.select("*cell 1*");
In order to select the third row from a data grid type:
dataGrid.select(2);In order to select multiple rows in a data grid use modifier keys (such as Ctrl or Shift). For selecting the fist and the third row in a data grid that supports multiple selections, type the following:
dataGrid.select(0); dataGrid.select(2, ModifierKey.Control);
itemIndex - the row to selectmodifiers - the modifier keys to press while selecting the row. Use a modifier to select multiple rows.public void selectCell(ItemIdentifier row, ItemIdentifier column)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
row - the row to selectcolumn - the cell to selectpublic void selectCell(ItemIdentifier row, ItemIdentifier column, ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
row - the row to selectcolumn - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.public void selectCell(ItemIdentifier row, String columnText)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
row - the row to selectcolumnText - the cell to selectpublic void selectCell(ItemIdentifier row, String columnText, ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
row - the row to selectcolumnText - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.public void selectCell(ItemIdentifier row, int columnIndex)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
row - the row to selectcolumnIndex - the cell to selectpublic void selectCell(ItemIdentifier row, int columnIndex, ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
row - the row to selectcolumnIndex - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.public void selectCell(String rowText, ItemIdentifier column)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowText - the row to selectcolumn - the cell to selectpublic void selectCell(String rowText, ItemIdentifier column, ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowText - the row to selectcolumn - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.public void selectCell(String rowText, String columnText)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowText - the row to selectcolumnText - the cell to selectpublic void selectCell(String rowText, String columnText, ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowText - the row to selectcolumnText - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.public void selectCell(String rowText, int columnIndex)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowText - the row to selectcolumnIndex - the cell to selectpublic void selectCell(String rowText, int columnIndex, ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowText - the row to selectcolumnIndex - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.public void selectCell(int rowIndex,
ItemIdentifier column)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowIndex - the row to selectcolumn - the cell to selectpublic void selectCell(int rowIndex,
ItemIdentifier column,
ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowIndex - the row to selectcolumn - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.public void selectCell(int rowIndex,
String columnText)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowIndex - the row to selectcolumnText - the cell to selectpublic void selectCell(int rowIndex,
String columnText,
ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowIndex - the row to selectcolumnText - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.public void selectCell(int rowIndex,
int columnIndex)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowIndex - the row to selectcolumnIndex - the cell to selectpublic void selectCell(int rowIndex,
int columnIndex,
ModifierKey modifiers)
Sample Usage In order to select a cell with the text "cell 1" in the third row type:
dataGrid.selectCell(2, "cell 1");
rowIndex - the row to selectcolumnIndex - the cell to selectmodifiers - the modifier keys to press while selecting the cell. Use a modifier to select multiple cells.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 canSelectMultiple()
public int getColumnCount()
public List<SLHeaderItem> getColumnHeaders()
public List<String> getColumnHeaderTexts()
public boolean isHorizontallyScrollable()
public double getHorizontalScrollPercent()
public int getRowCount()
public List<SLDataGridRow> getRows()
If the data grid has a vertical scroll bar, rows which are not in the visible area of the data grid do not expose any information (e.g. text, caption). In order to interact with such a row or retrieve information about the row it needs to be scrolled into view first.
public List<String> getRowTexts()
If the data grid has a vertical scroll bar, rows which are not in the visible area of the data grid return an empty text. In order to retrieve the text of such a row it needs to be scrolled into view first.
public SLDataGridCell getSelectedCell()
null if no cell is selected.public String getSelectedCellText()
public SLDataGridRow getSelectedRow()
null if no row is selected.public List<SLDataGridRow> getSelectedRows()
public String getSelectedRowText()
public List<String> getSelectedRowTexts()
public boolean isVerticallyScrollable()
public double getVerticalScrollPercent()
Copyright 2009-2012 Micro Focus. All Rights Reserved.