com.appperfect.devcommon.script.javaelement
Interface SwingMenu

All Superinterfaces:
AwtComponent, AwtContainer, IScript, JavaComponent, SwingComponent

public interface SwingMenu
extends SwingComponent

SwingMenu is created to represent javax.swing.JMenu component

The following code fragment illustrates how to create an SwingMenu element.

 var element = engine.createSwingMenu(1, 5);
 
where engine is object of IScriptEngine


Method Summary
 java.lang.String getItem(int index)
 To get item at specified index in menu
 java.lang.String[] getItems()
 To get items in the menu
 int getItemsCount()
 TO get items count in menu
 boolean select()
 To select the menu
 boolean selectMenuItem(java.lang.String item)
 To select specified item in menu
 boolean selectMenuItemIndex(int index)
 To select item at specified index in menu
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.AwtContainer
getComponentCount
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.JavaComponent
activate, addAttribute, captureImage, click, close, dblClick, drag, drop, getName, getText, getToolTipText, maximize, minimize, mouseMove, restore, rightClick, set, setBreakPoint, setIgnored, setImagePath, setName, setThinkTime, setTitle, type
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout
 

Method Detail

getItem

java.lang.String getItem(int index)
To get item at specified index in menu

Parameters:
index - zero based index
Returns:
item at specified index

getItems

java.lang.String[] getItems()
To get items in the menu

Returns:
array of items in menu

getItemsCount

int getItemsCount()
TO get items count in menu

Returns:
items count in menu

select

boolean select()
To select the menu

Returns:
true if success, false otherwise

selectMenuItem

boolean selectMenuItem(java.lang.String item)
To select specified item in menu

Parameters:
item - item to select
Returns:
true if success, false otherwise

selectMenuItemIndex

boolean selectMenuItemIndex(int index)
To select item at specified index in menu

Parameters:
index - zero based index
Returns:
true if success, false otherwise


Copyright © 2003-2011 AppPerfect Corporation. All Rights Reserved.