public class SapTree extends SapShell implements ISapContextMenuable
Modifier | Constructor and Description |
---|---|
protected |
SapTree(JtfObjectHandle handle,
Desktop desktop)
Creates a new SapTree with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
changeCheckbox(String nodeKey,
String itemName,
boolean check)
This method emulates changing a checkbox state.
|
void |
collapseNode(String nodeKey)
This function closes the node with the key nodeKey.
|
void |
defaultContextMenu()
This method requests a context menu for the whole Tree Control.
|
void |
doubleSelectItem(String nodeKey,
String itemName)
This function emulates double clicking on a text item.
|
void |
doubleSelectNode(String nodeKey)
This function emulates double clicking a node.
|
void |
ensureVisibleHorizontalItem(String nodeKey,
String itemName)
This function scrolls the Tree horizontally until the Item is visible.
|
void |
expandNode(String nodeKey)
This function expands the node with the key nodeKey.
|
String |
findNodeKeyByPath(String path)
Return the node key for the given path (e.g.
|
String |
getAbapImage(String nodeKey,
String itemName)
Gets the abap image.
|
String |
getAccessibilityDescription()
Gets the accessibility description of the shell.
|
boolean |
getCheckBoxState(String nodeKey,
String itemName)
Retrieves the CheckBox state (true = Checked, false = Unchecked).
|
List<String> |
getColumnHeaders()
Gets a collection of the titles of the columns.
|
int |
getColumnIndexFromName(String columnName)
Gets the column index for the given name.
|
List<String> |
getColumnKeys(String column)
The keys of all the items in the given column.
|
List<String> |
getColumnNames()
Gets a collection of the column names.
|
List<String> |
getColumnOrder()
Gets the column order.
|
String |
getColumnTitleFromName(String columnName)
Gets the column title for the given name.
|
List<String> |
getColumnTitles()
Gets a collection of the titles of the columns.
|
SapContextMenu |
getCurrentContextMenu()
Gets the current context menu.
|
String |
getFocusedNodeKey()
Gets the key of the focused node.
|
int |
getHierarchyHeaderWidth()
Gets the width of the hierarchy header in pixels.
|
int |
getHierarchyLevel(String nodeKey)
Gets the hierarchy level for the given key.
|
String |
getHierarchyTitle()
Gets the hierarchy title.
|
int |
getItemHeight(String nodeKey,
String itemName)
Returns the current item height.
|
int |
getItemLeft(String nodeKey,
String itemName)
The left position of the component.
|
int |
getItemStyle(String nodeKey,
String itemName)
The style of the given item.
|
String |
getItemText(String nodeKey,
String itemName)
For multi column trees, this function returns the text of the item specified by the key and name parameters.
|
Color |
getItemTextColor(String nodeKey,
String itemName)
Returns the item text color.
|
String |
getItemTooltip(String nodeKey,
String itemName)
Returns the item tooltip text.
|
int |
getItemTop(String nodeKey,
String itemName)
The top position of the component.
|
ItemType |
getItemType(String nodeKey,
String itemName)
Returns the type of the given node.
|
int |
getItemWidth(String nodeKey,
String itemName)
Returns the current item width.
|
int |
getListTreeNodeItemCount(String nodeKey)
Returns the node item count.
|
String |
getNextNodeKey(String nodeKey)
Returns the key of the next node.
|
String |
getNodeAbapImage(String nodeKey)
Returns the abap image for the given node.
|
int |
getNodeChildrenCount(String nodeKey)
This function returns the number of children of the node given.
|
int |
getNodeChildrenCountByPath(String path)
This function returns the number of children of the node given by the path parameter (e.g.
|
int |
getNodeHeight(String nodeKey)
The current height of the node.
|
int |
getNodeIndex(String nodeKey)
The index of the given node.
|
List<String> |
getNodeItemHeaders(String nodeKey)
Returns the headers for the given node.
|
List<String> |
getNodeKeys()
Gets a collection containing either the node key of the root node, or the node keys of all nodes in the tree, depending on the application.
|
int |
getNodeLeft(String nodeKey)
The left position of the component.
|
String |
getNodePathByKey(String nodeKey)
Given a node key, the path is retrieved (e.g.
|
int |
getNodeStyle(String nodeKey)
Returns the style of the node.
|
String |
getNodeText(String nodeKey)
This function returns the text of the node specified by the given key.
|
String |
getNodeTextByPath(String path)
The text of a node defined by the given path is returned.
|
int |
getNodeTextColor(String nodeKey)
Returns the node text color.
|
String |
getNodeTooltip(String nodeKey)
Returns the node tooltip text.
|
int |
getNodeTop(String nodeKey)
The top position of the component.
|
int |
getNodeWidth(String nodeKey)
Returns the current node width.
|
String |
getParentNodeKey(String nodeKey)
Key of the parent node of the node specified by the given key.
|
String |
getPreviousNodeKey(String nodeKey)
Key of the previous node of the node specified by the given key.
|
String |
getSelectedItemColumn()
Gets the key of the currently selected item column.
|
String |
getSelectedItemNode()
Gets the key of the currently selected item node.
|
String |
getSelectedNode()
Gets the key of the currently selected node.
|
List<String> |
getSelectedNodes()
Gets a collection containing the node keys of all the selected nodes in the tree.
|
TreeSelectionMode |
getSelectionMode()
Gets the selection mode.
|
String |
getStyleDescription(int style)
Returns the description for the given style.
|
List<String> |
getSubNodesKeys(String nodeKey)
Collection of the keys of all subnodes of the node specified by the given key.
|
String |
getTopNode()
Gets the key of the top node.
|
TreeType |
getTreeType()
Gets the tree type.
|
void |
headerContextMenu(String headerName)
This method requests a context menu for a header.
|
boolean |
isFolder(String nodeKey)
Whether the given node is a folder.
|
boolean |
isFolderExpandable(String nodeKey)
Whether the folder is expandable.
|
boolean |
isFolderExpanded(String nodeKey)
Whether the folder is expanded.
|
boolean |
isHighLighted(String nodeKey,
String itemName)
Whether the node is highlighted.
|
void |
itemContextMenu(String nodeKey,
String itemName)
This method requests a context menu for an item.
|
void |
nodeContextMenu(String nodeKey)
This method requests a context menu for a node.
|
void |
pressKey(String key)
This method emulates pressing a key.
|
void |
selectButton(String nodeKey,
String itemName)
This method emulates pressing a button.
|
void |
selectColumn(String columnName)
This function adds a column to the column selection.
|
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 |
selectHeader(String headerName)
This method emulates clicking a header.
|
void |
selectItem(String nodeKey,
String itemName)
This function emulates the selection of an item.
|
void |
selectLink(String nodeKey,
String itemName)
This function emulates triggering a link.
|
void |
selectNode(String nodeKey)
The node with the key nodeKey is added to the Node Selection.
|
void |
setCheckBoxState(String nodeKey,
String itemName,
boolean check)
Changes the state of the checkbox in the given node.
|
void |
setColumnOrder(List<String> columns)
Sets the order of the tree's column.
|
void |
setColumnWidth(String columnName,
int width)
This function sets the width of a column in pixels.
|
void |
setHierarchyHeaderWidth(int width)
Sets the width of the Hierarchy Header in pixels.
|
void |
setSelectedNode(String nodeKey)
Select the given node.
|
void |
setTopNode(String nodeKey)
Sets the given key as top node.
|
void |
unselectAll()
All selections are removed.
|
void |
unselectColumn(String columnName)
This function removes a column from the column selection.
|
void |
unselectNode(String nodeKey)
The node with the key nodeKey is removed from the Node Selection.
|
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 SapTree(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the SapTreedesktop
- the desktop on which this object livespublic void changeCheckbox(String nodeKey, String itemName, boolean check)
nodeKey
- the key of the nodeitemName
- the name of the itemcheck
- whether the checkbox should be checkedpublic void collapseNode(String nodeKey)
nodeKey
- the key of the nodepublic void defaultContextMenu()
public void doubleSelectItem(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic void doubleSelectNode(String nodeKey)
nodeKey
- the key of the nodepublic void ensureVisibleHorizontalItem(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic void expandNode(String nodeKey)
nodeKey
- the key of the nodepublic String findNodeKeyByPath(String path)
path
- the node pathpublic String getAbapImage(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic boolean getCheckBoxState(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic int getColumnIndexFromName(String columnName)
columnName
- the name of the columnpublic List<String> getColumnKeys(String column)
column
- the name of the columnpublic String getColumnTitleFromName(String columnName)
columnName
- the name of the columnpublic int getHierarchyLevel(String nodeKey)
nodeKey
- the key of the nodepublic int getItemHeight(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic int getItemLeft(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic int getItemStyle(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic String getItemText(String nodeKey, String itemName)
Micro Focus generally recommends using SAPTree.GetNodeText() instead of SAPTree.GetItemText(), because it is easier to use, however SAPTree.GetNodeText() does not work for every SAPTree. For an example of how to use SapTree.GetItemText() for a multi colum list tree, see http://stackoverflow.com/questions/29741718/text-in-tree-does-not-match-text-which-is-displayed.
nodeKey
- the key of the nodeitemName
- the name of the itempublic Color getItemTextColor(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic String getItemTooltip(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic int getItemTop(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic ItemType getItemType(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic int getItemWidth(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic int getListTreeNodeItemCount(String nodeKey)
nodeKey
- the key of the nodepublic String getNextNodeKey(String nodeKey)
nodeKey
- the key of the nodepublic String getNodeAbapImage(String nodeKey)
nodeKey
- the key of the nodepublic int getNodeChildrenCount(String nodeKey)
nodeKey
- the key of the nodepublic int getNodeChildrenCountByPath(String path)
path
- the node pathpublic int getNodeHeight(String nodeKey)
nodeKey
- the key of the nodepublic int getNodeIndex(String nodeKey)
nodeKey
- the key of the nodepublic List<String> getNodeItemHeaders(String nodeKey)
nodeKey
- the key of the nodepublic int getNodeLeft(String nodeKey)
nodeKey
- the key of the nodepublic String getNodePathByKey(String nodeKey)
nodeKey
- the key of the nodepublic int getNodeStyle(String nodeKey)
nodeKey
- the key of the nodepublic String getNodeText(String nodeKey)
nodeKey
- the key of the nodepublic String getNodeTextByPath(String path)
path
- the node pathpublic int getNodeTextColor(String nodeKey)
nodeKey
- the key of the nodepublic String getNodeTooltip(String nodeKey)
nodeKey
- the key of the nodepublic int getNodeTop(String nodeKey)
nodeKey
- the key of the nodepublic int getNodeWidth(String nodeKey)
nodeKey
- the key of the nodepublic String getParentNodeKey(String nodeKey)
nodeKey
- the key of the nodepublic String getPreviousNodeKey(String nodeKey)
nodeKey
- the key of the nodepublic String getStyleDescription(int style)
style
- the stylepublic List<String> getSubNodesKeys(String nodeKey)
nodeKey
- the key of the nodepublic void headerContextMenu(String headerName)
headerName
- the name of the headerpublic boolean isFolder(String nodeKey)
nodeKey
- the key of the nodepublic boolean isFolderExpandable(String nodeKey)
nodeKey
- the key of the nodepublic boolean isFolderExpanded(String nodeKey)
nodeKey
- the key of the nodepublic boolean isHighLighted(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic void itemContextMenu(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic void nodeContextMenu(String nodeKey)
nodeKey
- the key of the nodepublic void pressKey(String key)
key
- possible values are: F1, F4, Delete, Insert, Enter, Cut, Copy, and Pastepublic void selectButton(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic void selectColumn(String columnName)
columnName
- the name of the columnpublic 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 selectHeader(String headerName)
headerName
- the name of the headerpublic void selectItem(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic void selectLink(String nodeKey, String itemName)
nodeKey
- the key of the nodeitemName
- the name of the itempublic void selectNode(String nodeKey)
nodeKey
- the key of the nodepublic void setCheckBoxState(String nodeKey, String itemName, boolean check)
nodeKey
- the key of the nodeitemName
- the name of the itemcheck
- the new checkbox statepublic void setColumnOrder(List<String> columns)
columns
- a list of the column titles in the desired order. Each title must not occur more than once.public void setColumnWidth(String columnName, int width)
columnName
- the name of the columnwidth
- the new width of the columnpublic void setHierarchyHeaderWidth(int width)
width
- the new width of the headerpublic void setSelectedNode(String nodeKey)
nodeKey
- the key of the nodepublic void setTopNode(String nodeKey)
nodeKey
- the key of the nodepublic void unselectAll()
public void unselectColumn(String columnName)
columnName
- the name of the columnpublic void unselectNode(String nodeKey)
nodeKey
- the key of the nodepublic String getAccessibilityDescription()
public List<String> getColumnHeaders()
public List<String> getColumnTitles()
public SapContextMenu getCurrentContextMenu()
public String getFocusedNodeKey()
public int getHierarchyHeaderWidth()
public String getHierarchyTitle()
public List<String> getNodeKeys()
public String getSelectedItemColumn()
public String getSelectedItemNode()
public String getSelectedNode()
public List<String> getSelectedNodes()
public TreeSelectionMode getSelectionMode()
public String getTopNode()
public TreeType getTreeType()
Copyright 2009-2012 Micro Focus. All Rights Reserved.