public class SapGridView extends SapShell implements ISapContextMenuable
Modifier | Constructor and Description |
---|---|
protected |
SapGridView(JtfObjectHandle handle,
Desktop desktop)
Creates a new SapGridView with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
clearSelection()
Removes all row, column and cell selections.
|
void |
click(int row,
String column)
Clicks on the specified cell.
|
void |
clickCurrentCell()
Clicks the current cell.
|
void |
contextMenu()
Requests the context menu.
|
void |
currentCellMoved()
This function notifies the server that another cell was made the current cell.
|
void |
deleteRows(String rows)
Delete the given rows.
|
void |
deselectColumn(String column)
Removes the specified column from the list of selected columns.
|
void |
doubleClick(int row,
String column)
Double clicks the specified cell.
|
void |
doubleClickCurrentCell()
Double clicks on the current cell.
|
void |
duplicateRows(String rows)
Duplicates the given range of rows.
|
void |
getCellColor(int row,
String column)
Returns an identifier for the color of the cell.
|
int |
getCellHeight(int row,
String column)
Gets the height of the cell in pixels.
|
String |
getCellIcon(int row,
String column)
Gets the icon string of the specified cell.
|
int |
getCellLeft(int row,
String column)
Gets the left position of the cell.
|
int |
getCellMaxLength(int row,
String column)
Gets the maximum length of the cell in number of bytes.
|
GridCellState |
getCellState(int row,
String column)
Gets the state of the specified cell.
|
String |
getCellTooltip(int row,
String column)
Gets the tooltip of the specified cell.
|
int |
getCellTop(int row,
String column)
Gets the top position of the specified cell.
|
GridCellType |
getCellType(int row,
String column)
Gets the cell type of the specified cell.
|
String |
getCellValue(int row,
String column)
Gets the value of the specified cell.
|
int |
getCellWidth(int row,
String column)
Gets the width of the specified cell.
|
void |
getColorInfo(int color)
Returns the description for the color of the cell.
|
int |
getColumnCount()
Gets the number of columns.
|
String |
getColumnDataType(String column)
Gets the data type of the column.
|
List<String> |
getColumnOrder()
Gets a list of strings which contains all the column identifiers in the order in which they are displayed.
|
int |
getColumnPosition(String column)
Gets the position of the specified column.
|
GridColumnSortType |
getColumnSortType(String column)
Gets the sort type of the column.
|
List<String> |
getColumnTitles(String column)
Gets all column titles of the specified column.
|
String |
getColumnTooltip(String column)
Gets the tool tip text of the specified column.
|
GridColumnTotalType |
getColumnTotalType(String column)
Gets the total type of the column.
|
String |
getCurrentCellColumn()
Gets the current column.
|
int |
getCurrentCellRow()
Gets the current row.
|
SapContextMenu |
getCurrentContextMenu()
Gets the current context menu.
|
String |
getDisplayedColumnTitle(String column)
Gets the currently displayed title of the specified column.
|
String |
getFirstVisibleColumn()
Gets the first visible column of the scrollable area of the grid view, fixed columns are ignored.
|
int |
getFirstVisibleRow()
Gets the index of the first visible row in the grid.
|
int |
getFrozenColumnCount()
Gets the number of columns that are excluded from horizontal scrolling.
|
int |
getRowCount()
Gets the number of rows.
|
int |
getRowTotalLevel(int row)
Gets the level of the row.
|
List<String> |
getSelectedCells()
Gets a list of strings that contains the selected cells, each of which has the format "<row>,<column id>".
|
List<String> |
getSelectedColumns()
Gets a list of strings of currently selected columns.
|
String |
getSelectedRows()
Gets a comma separated list of row index numbers or index ranges, such as "1,4,6-8".
|
GridSelectionMode |
getSelectionMode()
Gets the selection mode.
|
void |
getSymbolInfo(String symbol)
Returns the description for the symbol in the cell.
|
String |
getTitle()
Gets the title of the grid control.
|
int |
getToolbarButtonCount()
Gets the number of tool bar buttons (separators included).
|
String |
getToolbarButtonIcon(int buttonpos)
Gets the name of the icon of the specified toolbar button.
|
String |
getToolbarButtonId(int buttonpos)
Gets the ID of the specified tool bar button.
|
String |
getToolbarButtonText(int buttonpos)
Gets the text of the specified tool bar button.
|
String |
getToolbarButtonTooltip(int buttonpos)
Gets the tooltip of the specified tool bar button.
|
GridToolbarButtonType |
getToolbarButtonType(int buttonpos)
Gets the type of the specified toolbar button.
|
int |
getToolbarFocusButton()
Gets the position of the current focused tool bar button.
|
int |
getVisibleRowCount()
Gets the number of visible rows of the grid view.
|
boolean |
hasCellF4Help(int row,
String column)
Returns true if the specified cell has a value help assigned.
|
void |
insertRows(String rows)
Inserts a range of rows.
|
boolean |
isCellChangeable(int row,
String column)
Returns true if the specified cell is changeable.
|
boolean |
isCellCheckBoxChecked(int row,
String column)
Returns true if the check box at the specified position is checked.
|
boolean |
isCellHotspot(int row,
String column)
Returns true if the cell is a link.
|
boolean |
isCellSymbol(int row,
String column)
Returns true if the text in the cell is displayed in the SAP symbol font.
|
boolean |
isCellTotalExpander(int row,
String column)
Returns true if the specified cell contains a total expander button.
|
boolean |
isColumnFiltered(String column)
Returns true if the specified column is filtered.
|
boolean |
isColumnKey(String column)
Returns true if the specified column is a key column.
|
boolean |
isToolbarButtonChecked(int buttonpos)
Returns true if the specified tool bar button is checked.
|
boolean |
isToolbarButtonEnabled(int buttonpos)
Returns true if the specified button is enabled.
|
boolean |
isTotalRowExpanded(int row)
whether the specified total row is expanded.
|
void |
modifyCell(int row,
String column,
String value)
Modifies the value of the specified cell.
|
void |
modifyCheckBox(int row,
String column,
boolean selected)
Modifies the value of the specified checkbox cell.
|
void |
moveRows(int fromRow,
int toRow,
int destRow)
Moves the rows with an index greater than or equal to fromRow up to an index less than or equal to toRow to the position of destRow.
|
void |
pressButton(int row,
String column)
Presses the button placed in the specified cell.
|
void |
pressButtonCurrentCell()
Clicks a button placed in the current cell.
|
void |
pressColumnHeader(String column)
Clicks on the header of the specified column.
|
void |
pressEnter()
Presses the enter key.
|
void |
pressF1()
Presses the F1 key.
|
void |
pressF4()
Presses the F4 key.
|
void |
pressToolbarButton(String id)
Clicks the specified button in the grid view's tool bar.
|
void |
pressToolbarContextButton(String id)
Opens the context menu of the specified button of the grid view's tool bar.
|
void |
pressTotalRow(int row,
String column)
Presses the row button of the specified total row.
|
void |
pressTotalRowCurrentCell()
Presses the expansion button on the current cell.
|
void |
selectAll()
Selects the whole grid content (i.e.
|
void |
selectColumn(String column)
Adds the specified column to the list of the selected columns.
|
void |
selectContextMenuItem(String functionCode)
Select an item from the controls context menu.
|
void |
selectContextMenuItemByPosition(String positionDescription)
This method allows you to select a context menu item using the position of the item.
|
void |
selectContextMenuItemByText(String text)
Select a menu item of a context menu using the text of the item and possible higher level menus.
|
void |
selectionChanged()
Notifies the server that the selection has changed.
|
void |
selectToolbarMenuItem(String id)
Selects an item from the context menu of the grid view's tool bar.
|
void |
setColumnOrder(List<String> columns)
Sets the order of the columns.
|
void |
setColumnWidth(String column,
int width)
Sets the width of the specified column.
|
void |
setCurrentCell(int row,
String column)
Sets the specified cell as the current cell.
|
void |
setCurrentCellColumn(String column)
Specifies the column of the current cell.
|
void |
setCurrentCellRow(int row)
Sets the row of the current cell.
|
void |
setFirstVisibleColumn(String column)
Sets the first visible column.
|
void |
setFirstVisibleRow(int row)
Sets the first visible row.
|
void |
setSelectedRows(String rows)
Selects the specified rows.
|
void |
triggerModified()
Notifies the server of multiple changes in cells.
|
isDragDropSupported
getAccessibilityText, getAccessibilityTextOnRequest, getAccessibilityTooltip, getDefaultTooltip, getHeight, getIconName, getLeft, getName, getScreenLeft, getScreenTop, getTooltip, getTop, getWidth, isChangeable, isFocused, isModified, isSymbolFont, setFocus, showContextMenu
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 SapGridView(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the SapGridViewdesktop
- the desktop on which this object livespublic void clearSelection()
public void click(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic void clickCurrentCell()
public void contextMenu()
public void currentCellMoved()
public void deleteRows(String rows)
The parameter rows is a comma-separated string of indices or index ranges, for example '3,5-8,14,15'. The entries must be ordered and the ranges must not overlap.
rows
- the rows to deletepublic void deselectColumn(String column)
column
- column identifierpublic void doubleClick(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic void doubleClickCurrentCell()
public void duplicateRows(String rows)
The parameter rows is a comma-separated string of indices or index ranges, for example '3,5-8,14,15'. For any single index a copy of the row will be inserted at the given index. If a range of indexes is duplicated then all the new lines are inserted as a single block before the old lines. The entries must be ordered and the ranges must not overlap,
rows
- the rows to duplicatepublic void getCellColor(int row, String column)
This can be used to retrieve the color information using GetColorInfo.
row
- index of the row. The value is zero-based.column
- column identifierpublic int getCellHeight(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic String getCellIcon(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic int getCellLeft(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic int getCellMaxLength(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic GridCellState getCellState(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic String getCellTooltip(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic int getCellTop(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic GridCellType getCellType(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic String getCellValue(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic int getCellWidth(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic void getColorInfo(int color)
This function will only return a value when the accessibility mode of SAP GUI is enabled.
color
- the color to get the description for. The value is zero-based.public String getColumnDataType(String column)
column
- column identifierpublic int getColumnPosition(String column)
column
- column identifierpublic GridColumnSortType getColumnSortType(String column)
column
- column identifierpublic List<String> getColumnTitles(String column)
column
- column identifierpublic String getColumnTooltip(String column)
column
- column identifierpublic GridColumnTotalType getColumnTotalType(String column)
column
- column identifierpublic String getDisplayedColumnTitle(String column)
column
- column identifierpublic int getRowTotalLevel(int row)
row
- index of the row. The value is zero-based.public void getSymbolInfo(String symbol)
This function will only return a value when the accessibility mode of SAP GUI is enabled.
symbol
- the symbolic value of the cellpublic String getToolbarButtonIcon(int buttonpos)
buttonpos
- the position of the toolbar button. The value is zero-based.public String getToolbarButtonId(int buttonpos)
buttonpos
- the position of the tool bar button. The value is zero-based.public String getToolbarButtonText(int buttonpos)
buttonpos
- the button position of the tool bar button. The value is zero-based.public String getToolbarButtonTooltip(int buttonpos)
buttonpos
- the index of the tool bar button. The value is zero-based.public GridToolbarButtonType getToolbarButtonType(int buttonpos)
buttonpos
- the index of the tool bar button. The value is zero-based.public int getToolbarFocusButton()
public boolean hasCellF4Help(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic void insertRows(String rows)
The parameter rows is a comma-separated string of indices or index ranges, for example '3,5-8,14,15'. For any single index, a new row will be added at the given index, moving the old row one line down. If a range of indexes is inserted then all the new lines are inserted as a single block before any of the old lines. The entries must be ordered and the ranges must not overlap.
rows
- the rows to insertpublic boolean isCellChangeable(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic boolean isCellCheckBoxChecked(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic boolean isCellHotspot(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic boolean isCellSymbol(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic boolean isCellTotalExpander(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic boolean isColumnFiltered(String column)
column
- column identifierpublic boolean isColumnKey(String column)
column
- column identifierpublic boolean isToolbarButtonChecked(int buttonpos)
buttonpos
- the button index in the tool bar. The value is zero-based.public boolean isToolbarButtonEnabled(int buttonpos)
buttonpos
- the button index in the tool bar. The value is zero-based.public boolean isTotalRowExpanded(int row)
row
- index of the row. The value is zero-based.public void modifyCell(int row, String column, String value)
row
- index of the row. The value is zero-based.column
- column identifiervalue
- the new value of the cellpublic void modifyCheckBox(int row, String column, boolean selected)
row
- index of the row. The value is zero-based.column
- column identifierselected
- specifies if the check box should be selectedpublic void moveRows(int fromRow, int toRow, int destRow)
fromRow
- index of the first row of the selection. The value is zero-based.toRow
- index of the last row of the selection. The value is zero-based.destRow
- index of the destination to which the rows should be moved. The value is zero-based.public void pressButton(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic void pressButtonCurrentCell()
public void pressColumnHeader(String column)
column
- column identifierpublic void pressEnter()
public void pressF1()
public void pressF4()
public void pressToolbarButton(String id)
id
- the id of the tool bar buttonpublic void pressToolbarContextButton(String id)
id
- the id of the tool bar buttonpublic void pressTotalRow(int row, String column)
row
- index of the row. The value is zero-based.column
- column identifierpublic void pressTotalRowCurrentCell()
public void selectAll()
public void selectColumn(String column)
column
- column identifierpublic void selectContextMenuItem(String functionCode)
selectContextMenuItem
in interface ISapContextMenuable
functionCode
- the function codepublic void selectContextMenuItemByPosition(String positionDescription)
selectContextMenuItemByPosition
in interface ISapContextMenuable
positionDescription
- a string containing the path to the item. If the context menu item is on the top level menu, this is just the zero-base index of the item. Otherwise, the positions on the menu and respective submenus should be concatenated, separated by "|".public void selectContextMenuItemByText(String text)
selectContextMenuItemByText
in interface ISapContextMenuable
text
- the menu item textpublic void selectionChanged()
public void selectToolbarMenuItem(String id)
id
- the id of the menu itempublic void setColumnOrder(List<String> columns)
columns
- a list of column identifiers in the desired orderpublic void setColumnWidth(String column, int width)
column
- column identifierwidth
- widthpublic void setCurrentCell(int row, String column)
row
- index of the rowcolumn
- column identifierpublic void setCurrentCellColumn(String column)
column
- column identifierpublic void setCurrentCellRow(int row)
row
- index of the row. The value is zero-based.public void setFirstVisibleColumn(String column)
column
- column identifierpublic void setFirstVisibleRow(int row)
row
- index of the row. The value is zero-based.public void setSelectedRows(String rows)
rows
- specifies the rows as comma separated list of row index or index ranges, e.g. "1,3,6-8".public void triggerModified()
public int getColumnCount()
public List<String> getColumnOrder()
public String getCurrentCellColumn()
public int getCurrentCellRow()
public SapContextMenu getCurrentContextMenu()
public String getFirstVisibleColumn()
public int getFirstVisibleRow()
public int getFrozenColumnCount()
public int getRowCount()
public List<String> getSelectedCells()
public List<String> getSelectedColumns()
public String getSelectedRows()
public GridSelectionMode getSelectionMode()
public String getTitle()
public int getToolbarButtonCount()
public int getVisibleRowCount()
Copyright 2009-2012 Micro Focus. All Rights Reserved.