public class SapToolbarControl extends SapShell implements ISapContextMenuable
Modifier | Constructor and Description |
---|---|
protected |
SapToolbarControl(JtfObjectHandle handle,
Desktop desktop)
Creates a new SapToolbarControl with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
int |
getButtonCount()
Gets the number of toolbar buttons including separators.
|
String |
getButtonIcon(int buttonPosition)
the name of the icon of the specified toolbar button.
|
ToolBarButtonType |
getButtonType(int buttonPosition)
the type of the specified toolbar button.
|
int |
getChangeable()
Gets whether the control is changeable.
|
SapContextMenu |
getCurrentContextMenu()
Gets the current context menu.
|
int |
getDragDropSupported()
Gets whether the shell allows drag and drop operations.
|
int |
getFocusedButton()
Gets the zero-based index of the button that currently has the focus.
|
int |
getWindowHandle()
Gets the window handle of the control that is connected to the GuiShell.
|
boolean |
isButtonChecked(int buttonPosition)
if the button is currently checked (pressed).
|
boolean |
isButtonEnabled(int buttonPosition)
if the button can be pressed.
|
void |
pressContextButton(String id)
Press the context button with the given id.
|
void |
selectButton(String id)
emulates pressing the button with the given id.
|
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 |
selectMenuItem(String id)
emulates selecting the menu item with the given id.
|
void |
selectMenuItemByText(String text)
emulates selecting the menu item by menu item text.
|
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 SapToolbarControl(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the SapToolbarControldesktop
- the desktop on which this object livespublic String getButtonIcon(int buttonPosition)
buttonPosition
- the zero-based button positionpublic ToolBarButtonType getButtonType(int buttonPosition)
buttonPosition
- the zero-based button positionpublic boolean isButtonChecked(int buttonPosition)
buttonPosition
- the zero-based button positionpublic boolean isButtonEnabled(int buttonPosition)
buttonPosition
- the zero-based button positionpublic void pressContextButton(String id)
id
- the id of the buttonpublic void selectButton(String id)
id
- the id of the buttonpublic 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 selectMenuItem(String id)
id
- the id of the menupublic void selectMenuItemByText(String text)
text
- the text of the menu itempublic int getButtonCount()
public int getChangeable()
public SapContextMenu getCurrentContextMenu()
public int getDragDropSupported()
public int getFocusedButton()
public int getWindowHandle()
Copyright 2009-2012 Micro Focus. All Rights Reserved.