public class SapGridView extends SapShell implements ISapContextMenuable
Modifier | Constructor and Description |
---|---|
protected |
SapGridView(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 SapGridView。
|
Modifier and Type | Method and Description |
---|---|
void |
clearSelection()
删除所有行、列和单元格选定内容。
|
void |
click(int row,
String column)
单击指定的单元格。
|
void |
clickCurrentCell()
单击当前单元格。
|
void |
contextMenu()
请求上下文菜单。
|
void |
currentCellMoved()
此功能通知服务器另一个单元格已成为当前单元格。
|
void |
deleteRows(String rows)
删除指定行。
|
void |
deselectColumn(String column)
删除指定列的列表中的指定列。
|
void |
doubleClick(int row,
String column)
双击指定的单元格。
|
void |
doubleClickCurrentCell()
双击当前单元格。
|
void |
duplicateRows(String rows)
复制行的指定范围。
|
void |
getCellColor(int row,
String column)
返回单元格颜色的标识符。
|
int |
getCellHeight(int row,
String column)
获取单元格高度(像素)。
|
String |
getCellIcon(int row,
String column)
获取指定单元格的图标字符串。
|
int |
getCellLeft(int row,
String column)
获取单元格的左侧位置。
|
int |
getCellMaxLength(int row,
String column)
获取单元格的最大长度(字节数)。
|
GridCellState |
getCellState(int row,
String column)
获取指定单元格的状态。
|
String |
getCellTooltip(int row,
String column)
获取指定单元格的工具提示。
|
int |
getCellTop(int row,
String column)
获取指定单元格的顶部位置。
|
GridCellType |
getCellType(int row,
String column)
获取指定单元格的单元格类型。
|
String |
getCellValue(int row,
String column)
获取指定单元格的值。
|
int |
getCellWidth(int row,
String column)
获取指定单元格的的宽度。
|
void |
getColorInfo(int color)
返回单元格颜色的说明。
|
int |
getColumnCount()
获取 列数。
|
String |
getColumnDataType(String column)
获取列的数据类型。
|
List<String> |
getColumnOrder()
获取 包含所有列标识符的字符串列表(以显示顺序排列)。
|
int |
getColumnPosition(String column)
获取指定列的位置。
|
GridColumnSortType |
getColumnSortType(String column)
获取列的排序类型。
|
List<String> |
getColumnTitles(String column)
获取指定列的所有列标题。
|
String |
getColumnTooltip(String column)
获取指定列的工具提示文本。
|
GridColumnTotalType |
getColumnTotalType(String column)
获取列的总计类型。
|
String |
getCurrentCellColumn()
获取 当前列。
|
int |
getCurrentCellRow()
获取 当前行。
|
SapContextMenu |
getCurrentContextMenu()
获取 当前上下文菜单。
|
String |
getDisplayedColumnTitle(String column)
获取指定列的当前显示标题。
|
String |
getFirstVisibleColumn()
获取 网格视图可滚动区域的第一个可见列,忽略固定列。
|
int |
getFirstVisibleRow()
获取 网格中第一个可见行的索引。.
|
int |
getFrozenColumnCount()
获取 不在水平滚动范围内的列数。
|
int |
getRowCount()
获取 行数。
|
int |
getRowTotalLevel(int row)
获取行的级别。
|
List<String> |
getSelectedCells()
获取 包含所选单元格的字符串列表,每个单元格的格式为“<row>、<column id>”。
|
List<String> |
getSelectedColumns()
获取 当前所选列的字符串列表。
|
String |
getSelectedRows()
获取 以逗号分隔的行索引号或索引范围的列表,例如“1,4,6-8”。
|
GridSelectionMode |
getSelectionMode()
获取 选择模式。
|
void |
getSymbolInfo(String symbol)
返回单元格中符号的说明。
|
String |
getTitle()
获取 网格控件的标题。
|
int |
getToolbarButtonCount()
获取 工具栏按钮的数量(含分隔符)。
|
String |
getToolbarButtonIcon(int buttonpos)
获取指定工具栏按钮的图标名称。
|
String |
getToolbarButtonId(int buttonpos)
获取指定工具栏按钮的 ID。
|
String |
getToolbarButtonText(int buttonpos)
获取指定工具栏按钮的文本。
|
String |
getToolbarButtonTooltip(int buttonpos)
获取指定工具栏按钮的工具提示。
|
GridToolbarButtonType |
getToolbarButtonType(int buttonpos)
获取指定工具栏按钮的类型。
|
int |
getToolbarFocusButton()
获取当前关注的工具栏按钮的位置。
|
int |
getVisibleRowCount()
获取 网格视图的可见行的数量。
|
boolean |
hasCellF4Help(int row,
String column)
如果指定单元格已分配值帮助,则返回 ture。
|
void |
insertRows(String rows)
插入一系列行。
|
boolean |
isCellChangeable(int row,
String column)
如果指定单元格可更改,则返回 ture。
|
boolean |
isCellCheckBoxChecked(int row,
String column)
如果选中指定位置的复选框,则返回 ture。
|
boolean |
isCellHotspot(int row,
String column)
如果单元格为链接,则返回 ture。
|
boolean |
isCellSymbol(int row,
String column)
如果单元格中的文本以 SAP 符号字体显示,则返回 ture。
|
boolean |
isCellTotalExpander(int row,
String column)
如果指定单元格包含总扩展器按钮,则返回 ture。
|
boolean |
isColumnFiltered(String column)
如果筛选指定列,则返回 ture。
|
boolean |
isColumnKey(String column)
如果指定列为键列,则返回 ture。
|
boolean |
isToolbarButtonChecked(int buttonpos)
如果选中指定工具栏按钮,则返回 ture。
|
boolean |
isToolbarButtonEnabled(int buttonpos)
如果指定按钮已启用,则返回 ture。
|
boolean |
isTotalRowExpanded(int row)
是否扩展指定总计行。
|
void |
modifyCell(int row,
String column,
String value)
修改指定单元格的值。
|
void |
modifyCheckBox(int row,
String column,
boolean selected)
修改指定复选框单元格的值。
|
void |
moveRows(int fromRow,
int toRow,
int destRow)
将具有大于或等于 fromRow 且小于或等于 toRow 索引的行向上移动至 destRow 位置。
|
void |
pressButton(int row,
String column)
按位于指定单元格中的按钮。
|
void |
pressButtonCurrentCell()
单击位于当前单元格中的按钮。
|
void |
pressColumnHeader(String column)
单击指定列的标题。
|
void |
pressEnter()
按 Enter 键。
|
void |
pressF1()
按 F1 键。
|
void |
pressF4()
按 F4 键。
|
void |
pressToolbarButton(String id)
单击网格视图的工具栏中的指定按钮。
|
void |
pressToolbarContextButton(String id)
打开网格视图的工具栏中指定按钮的上下文菜单。
|
void |
pressTotalRow(int row,
String column)
按指定总计行的行按钮。
|
void |
pressTotalRowCurrentCell()
按当前单元格上的扩展按钮。
|
void |
selectAll()
选择整个网格内容(即所有行和列)。
|
void |
selectColumn(String column)
添加指定列至所选列的列表。
|
void |
selectContextMenuItem(String functionCode)
选择控件上下文菜单中的项目。
|
void |
selectContextMenuItemByPosition(String positionDescription)
利用此方法可通过项目位置选择上下文菜单项目。
|
void |
selectContextMenuItemByText(String text)
使用项目文本和可能的更高层菜单选择上下文菜单的菜单项目。
|
void |
selectionChanged()
通知服务器已更改选择。
|
void |
selectToolbarMenuItem(String id)
选择网格视图的工具栏的上下文菜单中的项目。
|
void |
setColumnOrder(List<String> columns)
设置列的顺序。
|
void |
setColumnWidth(String column,
int width)
设置指定列的宽度。
|
void |
setCurrentCell(int row,
String column)
设置指定单元格为当前单元格。
|
void |
setCurrentCellColumn(String column)
指定当前单元格的列。
|
void |
setCurrentCellRow(int row)
设置当前单元格的行。
|
void |
setFirstVisibleColumn(String column)
设置第一个可见列。
|
void |
setFirstVisibleRow(int row)
设置第一个可见行。
|
void |
setSelectedRows(String rows)
选择指定行。
|
void |
triggerModified()
通知服务器单元格中有多处更改。
|
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
- 可确定 SapGridView 的句柄desktop
- 此对象所在的桌面public void clearSelection()
public void click(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public void clickCurrentCell()
public void contextMenu()
public void currentCellMoved()
public void deleteRows(String rows)
参数行是用逗号分隔的索引或索引范围字符串,例如“3,5-8,14,15”。必须对条目进行排序并且范围不可重叠。
rows
- 可删除的行public void deselectColumn(String column)
column
- 列标识符public void doubleClick(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public void doubleClickCurrentCell()
public void duplicateRows(String rows)
参数行是用逗号分隔的索引或索引范围字符串,例如“3,5-8,14,15”。对于单个索引,行副本将在指定索引处插入。如果复制索引范围,则所有新行将作为单个块插入在旧行前面。必须对条目进行排序并且范围不可重叠。
rows
- 可复制的行public void getCellColor(int row, String column)
这可用于使用 GetColorInfo 检索颜色信息。
row
- 行的索引. The value is zero-based.column
- 列标识符public int getCellHeight(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public String getCellIcon(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public int getCellLeft(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public int getCellMaxLength(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public GridCellState getCellState(int row, String column)
row
- 行的索引。. The value is zero-based.column
- 列标识符public String getCellTooltip(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public int getCellTop(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public GridCellType getCellType(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public String getCellValue(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public int getCellWidth(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public void getColorInfo(int color)
SAP GUI 的可访问性模式启用时,此功能仅返回值。
color
- 可为其获取说明的颜色。. The value is zero-based.public String getColumnDataType(String column)
column
- 列标识符public int getColumnPosition(String column)
column
- 列标识符public GridColumnSortType getColumnSortType(String column)
column
- 列标识符public List<String> getColumnTitles(String column)
column
- 列标识符public String getColumnTooltip(String column)
column
- 列标识符public GridColumnTotalType getColumnTotalType(String column)
column
- 列标识符public String getDisplayedColumnTitle(String column)
column
- 列标识符public int getRowTotalLevel(int row)
row
- 行的索引. The value is zero-based.public void getSymbolInfo(String symbol)
SAP GUI 的可访问性模式启用时,此功能仅返回值。
symbol
- 单元格的符号值public String getToolbarButtonIcon(int buttonpos)
buttonpos
- 工具栏按钮的位置。. The value is zero-based.public String getToolbarButtonId(int buttonpos)
buttonpos
- 工具栏按钮的位置. The value is zero-based.public String getToolbarButtonText(int buttonpos)
buttonpos
- 工具栏按钮的按钮位置. The value is zero-based.public String getToolbarButtonTooltip(int buttonpos)
buttonpos
- 工具栏按钮的索引. The value is zero-based.public GridToolbarButtonType getToolbarButtonType(int buttonpos)
buttonpos
- 工具栏按钮的索引. The value is zero-based.public int getToolbarFocusButton()
public boolean hasCellF4Help(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public void insertRows(String rows)
参数行是用逗号分隔的索引或索引范围字符串,例如“3,5-8,14,15”。对于单个索引,每向下移动一个旧行,便在指定索引处添加一个新行。如果插入索引范围,则所有新行将作为单个块插入在旧行前面。必须对条目进行排序并且范围不可重叠。
rows
- 可插入的行public boolean isCellChangeable(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public boolean isCellCheckBoxChecked(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public boolean isCellHotspot(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public boolean isCellSymbol(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public boolean isCellTotalExpander(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public boolean isColumnFiltered(String column)
column
- 列标识符public boolean isColumnKey(String column)
column
- 列标识符public boolean isToolbarButtonChecked(int buttonpos)
buttonpos
- 工具栏中的按钮索引. The value is zero-based.public boolean isToolbarButtonEnabled(int buttonpos)
buttonpos
- 工具栏中的按钮索引. The value is zero-based.public boolean isTotalRowExpanded(int row)
row
- 行的索引. The value is zero-based.public void modifyCell(int row, String column, String value)
row
- 行的索引. The value is zero-based.column
- 列标识符value
- 单元格的新值public void modifyCheckBox(int row, String column, boolean selected)
row
- 行的索引. The value is zero-based.column
- 列标识符selected
- 指定是否应该选中复选框public void moveRows(int fromRow, int toRow, int destRow)
fromRow
- 选定内容的第一行的索引. The value is zero-based.toRow
- 选定内容的最后一行的索引. The value is zero-based.destRow
- 行应移动至的目的地的索引. The value is zero-based.public void pressButton(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public void pressButtonCurrentCell()
public void pressColumnHeader(String column)
column
- 列标识符public void pressEnter()
public void pressF1()
public void pressF4()
public void pressToolbarButton(String id)
id
- 工具栏按钮的 IDpublic void pressToolbarContextButton(String id)
id
- 工具栏按钮的 IDpublic void pressTotalRow(int row, String column)
row
- 行的索引. The value is zero-based.column
- 列标识符public void pressTotalRowCurrentCell()
public void selectAll()
public void selectColumn(String column)
column
- 列标识符public void selectContextMenuItem(String functionCode)
selectContextMenuItem
in interface ISapContextMenuable
functionCode
- 函数代码public void selectContextMenuItemByPosition(String positionDescription)
selectContextMenuItemByPosition
in interface ISapContextMenuable
positionDescription
- 包含项目路径的字符串。如果上下文菜单项目在顶层菜单中,则这仅是项目的零基索引。否则,菜单中的位置和各自子菜单应用“|”分隔串联。public void selectContextMenuItemByText(String text)
selectContextMenuItemByText
in interface ISapContextMenuable
text
- 菜单项目文本public void selectionChanged()
public void selectToolbarMenuItem(String id)
id
- 菜单项目的 IDpublic void setColumnOrder(List<String> columns)
columns
- 按所需顺序排列的列标识符的列表public void setColumnWidth(String column, int width)
column
- 列标识符width
- 宽度public void setCurrentCell(int row, String column)
row
- 行的索引column
- 列标识符public void setCurrentCellColumn(String column)
column
- 列标识符public void setCurrentCellRow(int row)
row
- 行的索引. The value is zero-based.public void setFirstVisibleColumn(String column)
column
- 列标识符public void setFirstVisibleRow(int row)
row
- 行的索引. The value is zero-based.public void setSelectedRows(String rows)
rows
- 指定行为以逗号分隔的行索引或索引范围的列表,例如“1,3,6-8”public void triggerModified()
public int getColumnCount()
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 String getSelectedRows()
public GridSelectionMode getSelectionMode()
public String getTitle()
public int getToolbarButtonCount()
public int getVisibleRowCount()
Copyright 2009-2012 Micro Focus. All Rights Reserved.