IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester Proxy SDK Reference

Project Version 2.3

com.rational.test.ft.domain.java.awt
Class MenuItemProxy

java.lang.Object   extended by com.rational.test.ft.sys.RegisteredObject       extended by com.rational.test.ft.domain.ProxyTestObject
          extended by com.rational.test.ft.domain.java.JavaProxy
              extended by com.rational.test.ft.domain.java.JavaGuiProxy
                  extended by com.rational.test.ft.domain.java.awt.MenuComponentProxy
                      extended by com.rational.test.ft.domain.java.awt.MenuItemProxy
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase, IPropertyFilter, com.rational.test.ft.object.interfaces.IGraphical
Direct Known Subclasses:
CheckboxMenuItemProxy, MenuProxy

public class MenuItemProxy
extends MenuComponentProxy

Proxy for AWT MenuItem objects.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.domain.java.awt.MenuComponentProxy
MenuComponentProxy.ChildEnumerator
 
Field Summary
protected static java.awt.Point screenPoint
           
 
Fields inherited from class com.rational.test.ft.domain.java.awt.MenuComponentProxy
CLASSINDEX, CLASSINDEXWEIGHT, MAX_NAME, NAME
 
Fields inherited from class com.rational.test.ft.domain.java.JavaGuiProxy
LEFT, preDownState, processMouseEventHandler, ROLEINDEX, ROLEINDEXWEIGHT, TESTDATA_SPECIALFRAMESTATE, TESTDATA_SPECIALFRAMESTATE_DESCRIPTION, topLevelWindow
 
Fields inherited from class com.rational.test.ft.domain.java.JavaProxy
debug, uniqueId
 
Fields inherited from class com.rational.test.ft.domain.ProxyTestObject
BROWSERTABTESTOBJECT_CLASSNAME, BROWSERTESTOBJECT_CLASSNAME, COLORDIALOGTESTOBJECT_CLASSNAME, CROSSDOMAINCONTAINER_CLASSNAME, DOCUMENTTESTOBJECT_CLASSNAME, DOMAINTESTOBJECT_CLASSNAME, ECLIPSETOPLEVELTESTOBJECT_CLASSNAME, EMBEDDEDBROWSERTESTOBJECT_CLASSNAME, FILEDIALOGTESTOBJECT_CLASSNAME, FRAMESUBITEMTESTOBJECT_CLASSNAME, FRAMETESTOBJECT_CLASSNAME, GEFEDITPARTTESTOBJECT_CLASSNAME, GUISUBITEMTESTOBJECT_CLASSNAME, GUITESTOBJECT_CLASSNAME, INTERNALFRAMETESTOBJECT_CLASSNAME, MESSAGEBOXTESTOBJECT_CLASSNAME, PALETTEGUISUBITEMTESTOBJECT_CLASSNAME, PROCESSTESTOBJECT_CLASSNAME, SCROLLSUBITEMTESTOBJECT_CLASSNAME, SCROLLTESTOBJECT_CLASSNAME, SELECTGUISUBITEMTESTOBJECT_CLASSNAME, SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME, SHELLTESTOBJECT_CLASSNAME, STATELESSGUISUBITEMTESTOBJECT_CLASSNAME, SUBITEMTESTOBJECT_CLASSNAME, TABITEMTESTOBJECT_CLASSNAME, TESTOBJECT_CLASSNAME, TEXTGUISUBITEMTESTOBJECT_CLASSNAME, TEXTGUITESTOBJECT_CLASSNAME, TEXTSCROLLTESTOBJECT_CLASSNAME, TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME, TOGGLEGUITESTOBJECT_CLASSNAME, TOGGLETESTOBJECT_CLASSNAME, TOPLEVELSUBITEMTESTOBJECT_CLASSNAME, TOPLEVELTESTOBJECT_CLASSNAME, TRACKBARTESTOBJECT_CLASSNAME, vomClippedRectangle
 
Fields inherited from class com.rational.test.ft.sys.RegisteredObject
theTestObject
 
Fields inherited from interface com.rational.test.ft.domain.IDataDriven
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
 
Constructor Summary
MenuItemProxy(java.lang.Object theObjectInTheSUT)
          Sets the SUT object as a member variable for the proxy.
 
Method Summary
 ProxyTestObject getAssociateProxy()
          Return the MenuBarProxy proxy we want to record the actions against.
 java.lang.String getDescriptiveName()
          Returns a name that can be used to describe the associated UI object in a script.
 java.lang.String getLabel()
          get the label on the menu item
 com.rational.test.ft.script.Subitem[] getPath()
          Get the path to this menu item relative to the top of the menu hierarchy.
 java.lang.String getRole()
          Returns TestObjectRole.ROLE_MENU_ITEM.
 java.awt.Rectangle getScreenRectangle()
          Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen.
 boolean getState()
          get the label on the menu item
 com.rational.test.ft.script.Subitem getSubitem()
          Return the Subitem describes this JMenuItem.
 com.rational.test.ft.vp.ITestData getTestData(java.lang.String testDataType)
          This method constructs the specified verification data object.
 java.util.Hashtable getTestDataTypes()
          Returns a hashtable of data type descriptions of the verification point data available with the associated object in the SUT.
 boolean isEnabled()
          Check the component under evaluation to determine if it is enabled or disabled.
 boolean isShowing()
          Check the component under evaluation to determine if it is showing (as apposed to hidden).
 boolean isSubitem(com.rational.test.ft.script.Subitem subitem)
          true if the specified subitem is valid for this menu item.
 void processSingleMouseEvent(IMouseActionInfo action)
           
protected  void setScreenPoint(java.awt.Point pt)
           
 
Methods inherited from class com.rational.test.ft.domain.java.awt.MenuComponentProxy
getChildAtPoint, getChildrenEnumeration, getClippedRect, getImmediateChildren, getMappableParent, getMenuChildrenArray, getName, getOwnedObjects, getOwner, getParent, getParentObject, getProperty, getTopParent, hasFocus, isOpaque
 
Methods inherited from class com.rational.test.ft.domain.java.JavaGuiProxy
activateTopWindow, click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, dumpAction, ensureObjectIsVisible, getActionRect, getCachedRectX, getCachedRectY, getClippedScreenRectangle, getMethodSpecForPoint, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScreenPoint, getScriptCommandFlags, getTestObjectClassName, getTopMappableWindow, getTopWindow, hover, hover, hover, hover, isDrag, isPointInObject, isPointInObject, modifiersChanged, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint, processHoverMouseEvent, processMouseEvent, scrollRectToVisible, setProcessMouseEventHandler, setTopLevelWindow, shouldBeMapped
 
Methods inherited from class com.rational.test.ft.domain.java.JavaProxy
addMappableChildrenToVector, addRecognitionProperty, allowProperty, childConstructed, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMappableChildren, getMethods, getNonValueProperties, getProperties, getRecognitionProperties, getRecognitionPropertyWeight, getStandardProperties, getTestDomain, getTopMappableParent, getUniqueId, getVisualClippableParent, hasAddedRecognitionProperties, isRecognitionProperty, setIndexer, setProperty
 
Methods inherited from class com.rational.test.ft.domain.ProxyTestObject
addDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChannel, getChildren, getDataDrivableCommand, getDataDrivableCommands, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getVisualClippedRectangle, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction, updateTestData
 
Methods inherited from class com.rational.test.ft.sys.RegisteredObject
addProxyReference, dereference, getObject, getRegisteredId, getTransactionId, isReferenced, isReleaseRequired, register, registerTransiently, release, toString, unregister
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

screenPoint

protected static java.awt.Point screenPoint
Constructor Detail

MenuItemProxy

public MenuItemProxy(java.lang.Object theObjectInTheSUT)
Sets the SUT object as a member variable for the proxy. All interactions with the supplied object are performed through this class.

Method Detail

getRole

public java.lang.String getRole()
Returns TestObjectRole.ROLE_MENU_ITEM.

Overrides:
getRole in class MenuComponentProxy
Returns:
A brief type name that describes the role this object plays in the UI.
Since:
RFT1.0

getLabel

public java.lang.String getLabel()
get the label on the menu item


getState

public boolean getState()
get the label on the menu item


getDescriptiveName

public java.lang.String getDescriptiveName()
Returns a name that can be used to describe the associated UI object in a script. This name may be further adjusted to be made unique to the script, but will act as the base for the name used in the script. Only characters used in Java identifiers should be returned (alphabetic, numeric or underscore characters). Non-identifier characters will cause script compilation failures. An example of what to return may be "OKButton" for a java.awt.Button with the text "OK" on it.

Overrides:
getDescriptiveName in class MenuComponentProxy
Returns:
A descriptive object name.

isShowing

public boolean isShowing()
Check the component under evaluation to determine if it is showing (as apposed to hidden).

Specified by:
isShowing in interface com.rational.test.ft.object.interfaces.IGraphical
Overrides:
isShowing in class MenuComponentProxy
Returns:
true if component is showing, else false.

isEnabled

public boolean isEnabled()
Check the component under evaluation to determine if it is enabled or disabled.

Specified by:
isEnabled in interface com.rational.test.ft.object.interfaces.IGraphical
Overrides:
isEnabled in class MenuComponentProxy
Returns:
true if component is enabled, else false.

getScreenRectangle

public java.awt.Rectangle getScreenRectangle()
Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen. This will commonly be two operations (getLocationOnScreen and getSize) combined into a single operation.

Specified by:
getScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphical
Overrides:
getScreenRectangle in class MenuComponentProxy
Returns:
The adjusted rectangle surrounding component relative to the screen.
See Also:
IGraphical.isPointInObject(java.awt.Point), IGraphical.getClippedScreenRectangle()

getPath

public com.rational.test.ft.script.Subitem[] getPath()
Get the path to this menu item relative to the top of the menu hierarchy.


getSubitem

public com.rational.test.ft.script.Subitem getSubitem()
Return the Subitem describes this JMenuItem.

Returns:
Text if there's text on this JMenuItem Index if the text is not available.

isSubitem

public boolean isSubitem(com.rational.test.ft.script.Subitem subitem)
true if the specified subitem is valid for this menu item.

Returns:
true if the specified subitem is valid for this menu item.

getAssociateProxy

public ProxyTestObject getAssociateProxy()
Return the MenuBarProxy proxy we want to record the actions against.


processSingleMouseEvent

public void processSingleMouseEvent(IMouseActionInfo action)
Overrides:
processSingleMouseEvent in class JavaGuiProxy

getTestDataTypes

public java.util.Hashtable getTestDataTypes()
Returns a hashtable of data type descriptions of the verification point data available with the associated object in the SUT. The hashtable keys are String objects that are used as the VP type in the associated test data. The type is a simple value that is defferent then other type values associated with this object under test. The type keys map to a verbose description of the test data, reasonable for presentation to a user.

Overrides:
getTestDataTypes in class JavaProxy
Returns:
An hashtable of type/description pairs used to describe the verification data available from this proxy.
See Also:
getTestData(String), ITestData

getTestData

public com.rational.test.ft.vp.ITestData getTestData(java.lang.String testDataType)
This method constructs the specified verification data object. The testDataType parameter is one of the hashtable keys returned by getTestDataTypes.

Overrides:
getTestData in class ProxyTestObject
Parameters:
testDataType - A test data type supplied by getTestDataTypes.
Returns:
The verification data for the supplied type.
See Also:
getTestDataTypes(), ITestData

setScreenPoint

protected void setScreenPoint(java.awt.Point pt)