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.swt
Class MenuProxy

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.swt.MenuItemProxy
                      extended by com.rational.test.ft.domain.java.swt.MenuProxy
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase, IMenuManager, IPropertyFilter, ISetParent, com.rational.test.ft.object.interfaces.IGraphical, com.rational.test.ft.object.interfaces.IGraphicalSubitem

public class MenuProxy
extends MenuItemProxy
implements ISetParent, IMenuManager, com.rational.test.ft.object.interfaces.IGraphicalSubitem

Proxy for SWT Menu objects.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.domain.java.swt.MenuItemProxy
MenuItemProxy.ChildEnumerator
 
Field Summary
protected static com.rational.test.ft.sys.graphical.Window cachedPopUp
           
protected static int MAX_NAME
           
protected static java.lang.String NAME
           
 
Fields inherited from class com.rational.test.ft.domain.java.swt.MenuItemProxy
CLASSINDEX, CLASSINDEXWEIGHT, TESTDATA_STATE, TESTDATA_TEXT, theCacheMenu
 
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
MenuProxy(java.lang.Object theObjectInTheSUT)
          Sets the SUT object as a member variable for the proxy.
 
Method Summary
 void click(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem)
          Perform a mouse click action at the specified object relative coordinates within the associated TestObject.
 void click(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Perform a mouse click action on the specified coordinates relative to the associated TestObject.
 void click(com.rational.test.ft.script.Subitem subitem)
          Left mouse click on the center point of the associated subitem.
 void click(com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Left mouse click on the specified coordinates relative to the associated TestObject.
 void doubleClick(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem)
          Perform a mouse dbl-click action at the specified object relative coordinates within the associated TestObject.
 void doubleClick(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Perform a mouse dbl-click action on the specified coordinates relative to the associated TestObject.
 void doubleClick(com.rational.test.ft.script.Subitem subitem)
          Left mouse dbl-click on the center point of the associated TestObject.
 void doubleClick(com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Left mouse dbl-click on the specified coordinates relative to the associated TestObject.
 void drag(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem)
          Perform a drag action against the associated TestObject with the supplied set of mouse modifiers.
 void drag(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem1, java.awt.Point pt1, com.rational.test.ft.script.Subitem subitem2, java.awt.Point pt2)
          Perform a drag action against the associated TestObject.
 void drag(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem1, com.rational.test.ft.script.Subitem subitem2)
          Perform a drag action against the associated TestObject.
 void drag(com.rational.test.ft.script.Subitem subitem)
          Perform a MOUSE_LEFT drag action against the associated TestObject.
 void drag(com.rational.test.ft.script.Subitem subitem1, java.awt.Point pt1, com.rational.test.ft.script.Subitem subitem2, java.awt.Point pt2)
          Perform a MOUSE_LEFT drag action against the associated TestObject.
 void drag(com.rational.test.ft.script.Subitem subitem1, com.rational.test.ft.script.Subitem subitem2)
          Perform a MOUSE_LEFT drag action against the associated TestObject.
 void dragToScreenPoint(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem, java.awt.Point screenPt)
          Perform a drag action against the associated TestObject.
 void dragToScreenPoint(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem, java.awt.Point subitemPt, java.awt.Point screenPt)
          Perform a drag action against the associated TestObject.
 void dragToScreenPoint(com.rational.test.ft.script.Subitem subitem, java.awt.Point screenPt)
          Perform a MOUSE_LEFT drag action against the associated TestObject.
 void dragToScreenPoint(com.rational.test.ft.script.Subitem subitem, java.awt.Point subitemPt, java.awt.Point screenPt)
          Perform a MOUSE_LEFT drag action against the associated TestObject.
 IChannel getChannel()
          return a channel for the object.
 java.lang.Object getChildAtPoint(java.awt.Point pt)
          Finds the child object that is at the specified point.
protected  ProxyTestObject getChildProxy(java.lang.Object childObject)
           
 java.util.Enumeration getChildrenEnumeration()
          Returns an enumeration of proxies for the children of this object.
 java.awt.Rectangle getClippedScreenRectangle()
          Returns the clipped-screen rectangle for the associated TestObject
 java.lang.String getDescriptiveName()
          Returns a name that can be used to describe the associated UI object in a script.
 java.util.Enumeration getImmediateChildren()
          Returns an enumeration of proxies for the immediate children of this object.
 java.lang.String getLabel()
          get the label on the menu item
 ProxyTestObject getMappableParent()
          Returns a proxy object for the parent of this object.
protected  ProxyTestObject[] getMenuChildrenArray()
          This protected method is needed to access true menu child proxies.
protected  MenuItem getMenuItem(org.eclipse.swt.widgets.Menu theMenu, com.rational.test.ft.script.Subitem item)
           
protected  MenuItem getMenuItem(com.rational.test.ft.script.Subitem subitem)
           
protected  MenuItemProxy getMenuItemProxy(com.rational.test.ft.script.Subitem item)
           
 java.awt.Rectangle getMenuScreenRectangle(java.lang.Object target)
           
 java.lang.String getName()
          get the name of the object
 java.lang.Object getObject()
          Export access to the object under evaluation in the SUT.
 ProxyTestObject[] getOwnedObjects()
          Returns an array of proxies for the objects owned by this object.
 ProxyTestObject getOwner()
          Returns a proxy object for the owner of this object.
 ProxyTestObject getParent()
          Returns a proxy object for the parent of this object.
 ProxyTestObject getParentItemProxy()
           
 java.lang.Object getParentObject()
          Returns an object for the parent of this object.
 java.lang.Object getProperty(java.lang.String propertyName)
          Gets the value for a specific property.
 java.lang.String getRole()
          Returns TestObjectRole.ROLE_SWT.
 java.awt.Point getScreenPoint(com.rational.test.ft.script.Subitem subitem)
          Returns the screen relative point to the center of the supplied subitem.
 java.awt.Point getScreenPoint(com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Returns the screen relative point given a subitem and a subitem relative point.
 java.awt.Rectangle getScreenRectangle()
          Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen.
 java.awt.Rectangle getScreenRectangle(com.rational.test.ft.script.Subitem subitem)
          Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen.
 ProxyTestObject getShell()
           
 java.lang.Object getSubitem(com.rational.test.ft.script.Subitem subitem)
          Returns an object that represents the specified subitem in the associated test object.
 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.
 java.lang.String getTestObjectClassName()
          Return the GuiSubitemTestObject classname.
 ProxyTestObject getTopParent()
          Returns a proxy object for the top parent of this object.
 java.lang.String getUniqueId()
          Return a unique string for the associated object.
 java.awt.Rectangle getVisualClippedRectangle()
          The optimized way to obtain the ClippedRectangle.
 boolean hasFocus()
          Always returns false because there is not a direct way to determine who has the focus in the AWT world.
 void hover(double secondDelay, com.rational.test.ft.script.Subitem subitem)
          Hover the mouse over the center of the specified subitem.
 void hover(double secondDelay, com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Hover the mouse over the specified coordinates relative to the specified subitem.
 void hover(com.rational.test.ft.script.Subitem subitem)
          Hover the mouse over the center of the specified subitem.
 void hover(com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Hover the mouse over the specified coordinates relative to the specified subitem.
 boolean isEnabled()
          Checks the component under evaluation to determine if it is enabled or disabled.
 boolean isOpaque()
          Checks the component under evaluation to determine if it is opaque or transparent.
 boolean isPointInObject(java.awt.Point pt)
          Determines if the specified screen relative point is contained in the component under evaluation.
 boolean isShowing()
          Checks the component under evaluation to determine if it is showing (as opposed to hidden).
 void mouseMove(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem)
          Perform a move action against the associated TestObject.
 void mouseMove(com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Perform a move action against the associated TestObject.
 void mouseMove(com.rational.test.ft.script.Subitem subitem)
          Perform a MOUSE_LEFT move action against the associated TestObject.
 void mouseMove(com.rational.test.ft.script.Subitem subitem, java.awt.Point subitemPt)
          Perform a MOUSE_LEFT move action against the associated TestObject.
 void nClick(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem, java.awt.Point pt)
          Perform a mouse n-click action on the specified coordinates relative to the associated TestObject.
 void nClickDrag(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem1, java.awt.Point pt1, com.rational.test.ft.script.Subitem subitem2, java.awt.Point pt2)
          Perform a mouse n-click drag action on the specified coordinates relative to the associated TestObject.
 void nClickDrag(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem1, com.rational.test.ft.script.Subitem subitem2)
          Perform a mouse n-click drag action on the specified coordinates relative to the associated TestObject.
 void nClickDragToScreenPoint(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem, java.awt.Point screenPt)
          Perform a mouse n-click drag action on the specified coordinates relative the screen relative screenPt coordinates.
 void nClickDragToScreenPoint(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, com.rational.test.ft.script.Subitem subitem, java.awt.Point subitemPt, java.awt.Point screenPt)
          Perform a mouse n-click drag action on the specified coordinates relative the screen relative screenPt coordinates.
 void processMouseEvent(IMouseActionInfo action, com.rational.test.ft.sys.graphical.Window popupWindow)
          Process a menu action against the specified menu popup window.
 void processSingleMouseEvent(IMouseActionInfo action)
          Return a MethodSpecification for the specified mouse event.
 void setParent(ProxyTestObject parent)
          For efficiency allow the parent proxy to be explicitly set.
 void setPopUpWindow(com.rational.test.ft.sys.graphical.Window popUp)
           
 boolean shouldBeMapped()
          Returns true; by default all test objects are mapped.
 com.rational.test.ft.vp.ITestData updateTestData(java.lang.String testDataType, com.rational.test.ft.vp.ITestData testData)
          This method updates the supplied test data object and returns it.
 
Methods inherited from class com.rational.test.ft.domain.java.swt.MenuItemProxy
getIndex, getMenuProxy, getPath, getState, getStyle, getSubitem, isCheckBox, isRadioButton, isSeparator, isSubitem, setCachedMenuBar
 
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, getClippedRect, getMethodSpecForPoint, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScreenPoint, getScriptCommandFlags, getTopMappableWindow, getTopWindow, hover, hover, hover, hover, isDrag, isPointInObject, modifiersChanged, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint, processHoverMouseEvent, processMouseEvent, scrollRectToVisible, setProcessMouseEventHandler, setTopLevelWindow
 
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, getVisualClippableParent, hasAddedRecognitionProperties, isRecognitionProperty, setIndexer, setProperty
 
Methods inherited from class com.rational.test.ft.domain.ProxyTestObject
addDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChildren, getDataDrivableCommand, getDataDrivableCommands, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction
 
Methods inherited from class com.rational.test.ft.sys.RegisteredObject
addProxyReference, dereference, 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

MAX_NAME

protected static final int MAX_NAME
See Also:
Constant Field Values

NAME

protected static final java.lang.String NAME
See Also:
Constant Field Values

cachedPopUp

protected static com.rational.test.ft.sys.graphical.Window cachedPopUp
Constructor Detail

MenuProxy

public MenuProxy(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

setPopUpWindow

public void setPopUpWindow(com.rational.test.ft.sys.graphical.Window popUp)

getTestObjectClassName

public java.lang.String getTestObjectClassName()
Return the GuiSubitemTestObject classname.

Specified by:
getTestObjectClassName in interface IProxyBase
Overrides:
getTestObjectClassName in class JavaGuiProxy
Returns:
The default IGraphicalSubitem test object class full name.

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 swt.Button with the text "OK" on it.

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

getName

public java.lang.String getName()
get the name of the object


shouldBeMapped

public boolean shouldBeMapped()
Description copied from class: JavaGuiProxy
Returns true; by default all test objects are mapped. This method should be overriden by proxies that do not contain interesting persistent information. Objects that the script may want to interact with should always return true.

Overrides:
shouldBeMapped in class JavaGuiProxy
Returns:
true, unless overriden in a super class.

setParent

public void setParent(ProxyTestObject parent)
For efficiency allow the parent proxy to be explicitly set. If not set need to go looking at top level windows with this proxies theTestObject as its menu bar.

Specified by:
setParent in interface ISetParent
Parameters:
parent - The parent proxy.

getUniqueId

public java.lang.String getUniqueId()
Return a unique string for the associated object. This string needs to be identical for each call to this method for the same instance of the UI object. This value must also be as unique as possible.

Overrides:
getUniqueId in class JavaProxy
Returns:
Return a unique and repeatable identifier for the object being evaluated.

getRole

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

Overrides:
getRole in class MenuItemProxy
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

Overrides:
getLabel in class MenuItemProxy

isShowing

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

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

isEnabled

public boolean isEnabled()
Checks 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 MenuItemProxy
Returns:
true if component is enabled, else false.

isOpaque

public boolean isOpaque()
Checks the component under evaluation to determine if it is opaque or transparent.

Specified by:
isOpaque in interface com.rational.test.ft.object.interfaces.IGraphical
Overrides:
isOpaque in class MenuItemProxy
Returns:
true if component is opaque, else false.

hasFocus

public boolean hasFocus()
Always returns false because there is not a direct way to determine who has the focus in the AWT world. This does not represent a significant loss in functionality for AWT because the associated HWND can be queried to determine who has the focus. It could monitor focus events, but this is not a very significant issue considering the extreme and error-prone solution.

Specified by:
hasFocus in interface com.rational.test.ft.object.interfaces.IGraphical
Overrides:
hasFocus in class MenuItemProxy
Returns:
Always false for AWT.

getObject

public java.lang.Object getObject()
Export access to the object under evaluation in the SUT. This object can be indirectly referenced from the script using cross process reflection support.

Overrides:
getObject in class com.rational.test.ft.sys.RegisteredObject
Returns:
The object in the SUT being evaluated.

getMappableParent

public ProxyTestObject getMappableParent()
Returns a proxy object for the parent of this object. Returns null if this object has no parent.

Overrides:
getMappableParent in class MenuItemProxy
Returns:
The proxy for the parent test object or null for a top level window.

getParent

public ProxyTestObject getParent()
Returns a proxy object for the parent of this object. Returns null if this object has no parent.

Overrides:
getParent in class MenuItemProxy
Returns:
The proxy for the parent test object or null for a top level window.

getParentItemProxy

public ProxyTestObject getParentItemProxy()

getParentObject

public java.lang.Object getParentObject()
Returns an object for the parent of this object. Returns null if this object has no parent.

Overrides:
getParentObject in class MenuItemProxy
Returns:
The proxy for the parent test object or null for a top level window.

getTopParent

public ProxyTestObject getTopParent()
Returns a proxy object for the top parent of this object. Returns itself if this object has no parent.

Overrides:
getTopParent in class JavaProxy
Returns:
The proxy for the top-parent test object or itself for a top-level window.

getChildrenEnumeration

public java.util.Enumeration getChildrenEnumeration()
Returns an enumeration of proxies for the children of this object.

Overrides:
getChildrenEnumeration in class MenuItemProxy
Returns:
The child proxies relative to this proxy.

getImmediateChildren

public java.util.Enumeration getImmediateChildren()
Returns an enumeration of proxies for the immediate children of this object.

Overrides:
getImmediateChildren in class MenuItemProxy
Returns:
The child proxies relative to this proxy.

getOwner

public ProxyTestObject getOwner()
Returns a proxy object for the owner of this object. Returns null if this object has no owner.

Overrides:
getOwner in class MenuItemProxy
Returns:
The proxy for the owning object or null for a top object without an owner.

getOwnedObjects

public ProxyTestObject[] getOwnedObjects()
Returns an array of proxies for the objects owned by this object.

Overrides:
getOwnedObjects in class MenuItemProxy
Returns:
An array of proxies of objects owned by this proxy.

isPointInObject

public boolean isPointInObject(java.awt.Point pt)
Determines if the specified screen relative point is contained in the component under evaluation. Note that the point is relative to the top left corner of the screen, and not the component itself or its parent.

This functionality is performed by the proxy due to potentially unusual aspects associated with functionality. While typically the getScreenRectangle would be used to resolve this query, there are situations for which this is not accurate. For instance if the clickable region on a button were not rectangular just checking if the point is in the rectangle would not be valid.

Specified by:
isPointInObject in interface com.rational.test.ft.object.interfaces.IGraphical
Overrides:
isPointInObject in class JavaGuiProxy
Parameters:
pt - Screen relative point to check.
Returns:
true if component contains thePoint, else false.
See Also:
getScreenRectangle()

getChildAtPoint

public java.lang.Object getChildAtPoint(java.awt.Point pt)
Finds the child object that is at the specified point. Note that the point is relative to the top left corner of the screen, and not the component itself or its parent.

If this object has no children, it should return null.

Specified by:
getChildAtPoint in interface com.rational.test.ft.object.interfaces.IGraphical
Overrides:
getChildAtPoint in class MenuItemProxy
Parameters:
pt - Screen relative point to check.
Returns:
The object at the point or null if no child object is found.
See Also:
getScreenRectangle()

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Gets the value for a specific property.

Overrides:
getProperty in class MenuItemProxy
Parameters:
propertyName - The name of the property to fetch.
Returns:
The active value of the specified property for the associated test object.
See Also:
ProxyTestObject.getProperties(), ProxyTestObject.setProperty(String,Object), ProxyTestObject.getRecognitionProperties(), ProxyTestObject.addRecognitionProperty(String,Object,int)

getMenuChildrenArray

protected ProxyTestObject[] getMenuChildrenArray()
This protected method is needed to access true menu child proxies.


getChildProxy

protected ProxyTestObject getChildProxy(java.lang.Object childObject)

getChannel

public IChannel getChannel()
return a channel for the object.

Specified by:
getChannel in interface IChannelObject
Overrides:
getChannel in class MenuItemProxy
Returns:
the channel used by this object.

processSingleMouseEvent

public void processSingleMouseEvent(IMouseActionInfo action)
Return a MethodSpecification for the specified mouse event. This is the primary record interface for mouse events against a particular control.

Overrides:
processSingleMouseEvent in class MenuItemProxy
Parameters:
action - The event cache and other mouse state information for this mouse action.
See Also:
MethodSpecification

processMouseEvent

public void processMouseEvent(IMouseActionInfo action,                               com.rational.test.ft.sys.graphical.Window popupWindow)
Description copied from interface: IMenuManager
Process a menu action against the specified menu popup window.

Specified by:
processMouseEvent in interface IMenuManager

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 MenuItemProxy
Returns:
The adjusted rectangle surrounding component relative to the screen.
See Also:
IGraphical.isPointInObject(java.awt.Point), IGraphical.getClippedScreenRectangle()

getClippedScreenRectangle

public java.awt.Rectangle getClippedScreenRectangle()
Description copied from interface: com.rational.test.ft.object.interfaces.IGraphical
Returns the clipped-screen rectangle for the associated TestObject

Specified by:
getClippedScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphical
Overrides:
getClippedScreenRectangle in class MenuItemProxy
Returns:
java.awt.Rectangle - The clipped screen rectangle, or null if the object cannot be seen in any window on the screen.
See Also:
IGraphical.getScreenRectangle()

getVisualClippedRectangle

public java.awt.Rectangle getVisualClippedRectangle()
The optimized way to obtain the ClippedRectangle.

Overrides:
getVisualClippedRectangle in class MenuItemProxy
Returns:
The ClippedScreen Rectangle of the control

getScreenRectangle

public java.awt.Rectangle getScreenRectangle(com.rational.test.ft.script.Subitem subitem)
Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen. This will commonly be two operations (getScreenRectangle for the parent object and then adjusting for the specified subitem) combined into a single operation. The rectangle is exposed so that actions may be directly scripted against a visible subitem. null is returned if the subitem is not showing.

Specified by:
getScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
Returns:
The adjusted rectangle surrounding subitem relative to the screen. null is returned if the subitem is not showing.

getShell

public ProxyTestObject getShell()

getMenuScreenRectangle

public java.awt.Rectangle getMenuScreenRectangle(java.lang.Object target)

getScreenPoint

public java.awt.Point getScreenPoint(com.rational.test.ft.script.Subitem subitem)
Returns the screen relative point to the center of the supplied subitem.

Specified by:
getScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
Parameters:
subitem - The subitem the resultant screen point is relative to.
Returns:
A screen relative point.

getMenuItemProxy

protected MenuItemProxy getMenuItemProxy(com.rational.test.ft.script.Subitem item)

getMenuItem

protected MenuItem getMenuItem(org.eclipse.swt.widgets.Menu theMenu,                                com.rational.test.ft.script.Subitem item)

getMenuItem

protected MenuItem getMenuItem(com.rational.test.ft.script.Subitem subitem)

getScreenPoint

public java.awt.Point getScreenPoint(com.rational.test.ft.script.Subitem subitem,                                      java.awt.Point pt)
Returns the screen relative point given a subitem and a subitem relative point.

Specified by:
getScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
Parameters:
subitem - The subitem the resultant screen point is relative to.
pt - The subitem relative point.
Returns:
A screen relative point.

getSubitem

public java.lang.Object getSubitem(com.rational.test.ft.script.Subitem subitem)
Returns an object that represents the specified subitem in the associated test object. SubitemNotFoundException will be thrown if the specified subitem is invalid relative to the associated test object. null may be returned if the subitem does not have an object association that can be returned.

Specified by:
getSubitem in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem
Parameters:
subitem - The subitem to fetch an object for.
Returns:
An object representation of the subitem.

click

public void click(com.rational.test.ft.script.Subitem subitem)
Left mouse click on the center point of the associated subitem. This method is a simple shortcut to the click method with a modifier parameter (modifier set to MOUSE_LEFT).

Specified by:
click in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

click

public void click(com.rational.test.ft.script.MouseModifiers modifiers,                   com.rational.test.ft.script.Subitem subitem)
Perform a mouse click action at the specified object relative coordinates within the associated TestObject.

Specified by:
click in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

click

public void click(com.rational.test.ft.script.Subitem subitem,                   java.awt.Point pt)
Left mouse click on the specified coordinates relative to the associated TestObject. This method is a simple shortcut to the click method with a modifier parameter and coordinates (modifier set to MOUSE_LEFT).

Specified by:
click in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

click

public void click(com.rational.test.ft.script.MouseModifiers modifiers,                   com.rational.test.ft.script.Subitem subitem,                   java.awt.Point pt)
Perform a mouse click action on the specified coordinates relative to the associated TestObject.

Specified by:
click in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

doubleClick

public void doubleClick(com.rational.test.ft.script.Subitem subitem)
Left mouse dbl-click on the center point of the associated TestObject. This method is a simple shortcut to the dbl-click method with a modifier parameter (modifier set to MOUSE_LEFT).

Specified by:
doubleClick in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

doubleClick

public void doubleClick(com.rational.test.ft.script.MouseModifiers modifiers,                         com.rational.test.ft.script.Subitem subitem)
Perform a mouse dbl-click action at the specified object relative coordinates within the associated TestObject.

Specified by:
doubleClick in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

doubleClick

public void doubleClick(com.rational.test.ft.script.Subitem subitem,                         java.awt.Point pt)
Left mouse dbl-click on the specified coordinates relative to the associated TestObject. This method is a simple shortcut to the dbl-click method with a modifier parameter and coordinates (modifier set to MOUSE_LEFT).

Specified by:
doubleClick in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

doubleClick

public void doubleClick(com.rational.test.ft.script.MouseModifiers modifiers,                         com.rational.test.ft.script.Subitem subitem,                         java.awt.Point pt)
Perform a mouse dbl-click action on the specified coordinates relative to the associated TestObject.

Specified by:
doubleClick in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

nClick

public void nClick(int clickCount,                    com.rational.test.ft.script.MouseModifiers modifiers,                    com.rational.test.ft.script.Subitem subitem,                    java.awt.Point pt)
Perform a mouse n-click action on the specified coordinates relative to the associated TestObject.

Specified by:
nClick in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

drag

public void drag(com.rational.test.ft.script.Subitem subitem)
Perform a MOUSE_LEFT drag action against the associated TestObject. This method is used to simulate drag actions against controls that are typically not sensitive to drag actions.

Specified by:
drag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

drag

public void drag(com.rational.test.ft.script.MouseModifiers modifiers,                  com.rational.test.ft.script.Subitem subitem)
Perform a drag action against the associated TestObject with the supplied set of mouse modifiers. This method is used to simulate drag actions against controls that are typically not sensitive to drag actions.

Specified by:
drag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

drag

public void drag(com.rational.test.ft.script.Subitem subitem1,                  com.rational.test.ft.script.Subitem subitem2)
Perform a MOUSE_LEFT drag action against the associated TestObject. The action is performed from (x1, y1) to (x2, y2) coordinates relative to this TestObject.

Specified by:
drag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

drag

public void drag(com.rational.test.ft.script.MouseModifiers modifiers,                  com.rational.test.ft.script.Subitem subitem1,                  com.rational.test.ft.script.Subitem subitem2)
Perform a drag action against the associated TestObject. The action is performed from (x1, y1) to (x2, y2) coordinates relative to this TestObject.

Specified by:
drag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

drag

public void drag(com.rational.test.ft.script.Subitem subitem1,                  java.awt.Point pt1,                  com.rational.test.ft.script.Subitem subitem2,                  java.awt.Point pt2)
Perform a MOUSE_LEFT drag action against the associated TestObject. The action is performed from (x1, y1) to (x2, y2) coordinates relative to this TestObject.

Specified by:
drag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

drag

public void drag(com.rational.test.ft.script.MouseModifiers modifiers,                  com.rational.test.ft.script.Subitem subitem1,                  java.awt.Point pt1,                  com.rational.test.ft.script.Subitem subitem2,                  java.awt.Point pt2)
Perform a drag action against the associated TestObject. The action is performed from (x1, y1) to (x2, y2) coordinates relative to this TestObject.

Specified by:
drag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

nClickDrag

public void nClickDrag(int clickCount,                        com.rational.test.ft.script.MouseModifiers modifiers,                        com.rational.test.ft.script.Subitem subitem1,                        com.rational.test.ft.script.Subitem subitem2)
Perform a mouse n-click drag action on the specified coordinates relative to the associated TestObject.

Specified by:
nClickDrag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

nClickDrag

public void nClickDrag(int clickCount,                        com.rational.test.ft.script.MouseModifiers modifiers,                        com.rational.test.ft.script.Subitem subitem1,                        java.awt.Point pt1,                        com.rational.test.ft.script.Subitem subitem2,                        java.awt.Point pt2)
Perform a mouse n-click drag action on the specified coordinates relative to the associated TestObject.

Specified by:
nClickDrag in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

dragToScreenPoint

public void dragToScreenPoint(com.rational.test.ft.script.Subitem subitem,                               java.awt.Point screenPt)
Perform a MOUSE_LEFT drag action against the associated TestObject. The action is performed from (x, y) relative to this TestObject to the screen relative screenPt coordinates.

Specified by:
dragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

dragToScreenPoint

public void dragToScreenPoint(com.rational.test.ft.script.MouseModifiers modifiers,                               com.rational.test.ft.script.Subitem subitem,                               java.awt.Point screenPt)
Perform a drag action against the associated TestObject. The action is performed from (x, y) relative to this TestObject to the screen relative screenPt coordinates.

Specified by:
dragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

dragToScreenPoint

public void dragToScreenPoint(com.rational.test.ft.script.Subitem subitem,                               java.awt.Point subitemPt,                               java.awt.Point screenPt)
Perform a MOUSE_LEFT drag action against the associated TestObject. The action is performed from (x, y) relative to this TestObject to the screen relative screenPt coordinates.

Specified by:
dragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

dragToScreenPoint

public void dragToScreenPoint(com.rational.test.ft.script.MouseModifiers modifiers,                               com.rational.test.ft.script.Subitem subitem,                               java.awt.Point subitemPt,                               java.awt.Point screenPt)
Perform a drag action against the associated TestObject. The action is performed from (x, y) relative to this TestObject to the screen relative screenPt coordinates.

Specified by:
dragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

nClickDragToScreenPoint

public void nClickDragToScreenPoint(int clickCount,                                     com.rational.test.ft.script.MouseModifiers modifiers,                                     com.rational.test.ft.script.Subitem subitem,                                     java.awt.Point screenPt)
Perform a mouse n-click drag action on the specified coordinates relative the screen relative screenPt coordinates.

Specified by:
nClickDragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

nClickDragToScreenPoint

public void nClickDragToScreenPoint(int clickCount,                                     com.rational.test.ft.script.MouseModifiers modifiers,                                     com.rational.test.ft.script.Subitem subitem,                                     java.awt.Point subitemPt,                                     java.awt.Point screenPt)
Perform a mouse n-click drag action on the specified coordinates relative the screen relative screenPt coordinates.

Specified by:
nClickDragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

mouseMove

public void mouseMove(com.rational.test.ft.script.Subitem subitem)
Perform a MOUSE_LEFT move action against the associated TestObject. The action is performed from current mouse coordinates to (x, y) coordinates relative to this TestObject.

Specified by:
mouseMove in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

mouseMove

public void mouseMove(com.rational.test.ft.script.Subitem subitem,                       java.awt.Point subitemPt)
Perform a MOUSE_LEFT move action against the associated TestObject. The action is performed from current mouse coordinates to (x, y) coordinates relative to this TestObject.

Specified by:
mouseMove in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

mouseMove

public void mouseMove(com.rational.test.ft.script.MouseModifiers modifiers,                       com.rational.test.ft.script.Subitem subitem)
Perform a move action against the associated TestObject. The action is performed from current mouse coordinates to (x, y) coordinates relative to this TestObject.

Specified by:
mouseMove in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

mouseMove

public void mouseMove(com.rational.test.ft.script.MouseModifiers modifiers,                       com.rational.test.ft.script.Subitem subitem,                       java.awt.Point pt)
Perform a move action against the associated TestObject. The action is performed from current mouse coordinates to (x, y) coordinates relative to this TestObject.

Specified by:
mouseMove in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

hover

public void hover(double secondDelay,                   com.rational.test.ft.script.Subitem subitem)
Hover the mouse over the center of the specified subitem. The mouse is moved to the center of the subitem and stays there for at least the specified number of seconds.

Specified by:
hover in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

hover

public void hover(double secondDelay,                   com.rational.test.ft.script.Subitem subitem,                   java.awt.Point pt)
Hover the mouse over the specified coordinates relative to the specified subitem. The mouse is moved to the subitem relative coordinates and stays there for at least the specified number of seconds.

Specified by:
hover in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

hover

public void hover(com.rational.test.ft.script.Subitem subitem)
Hover the mouse over the center of the specified subitem. The mouse is moved to the center of the subitem and stays there for at least the default amount of time.

Specified by:
hover in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

hover

public void hover(com.rational.test.ft.script.Subitem subitem,                   java.awt.Point pt)
Hover the mouse over the specified coordinates relative to the specified subitem. The mouse is moved to the subitem relative coordinates and stays there for at least the default amount of time.

Specified by:
hover in interface com.rational.test.ft.object.interfaces.IGraphicalSubitem

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 MenuItemProxy
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 MenuItemProxy
Parameters:
testDataType - A test data type supplied by getTestDataTypes.
Returns:
The verification data for the supplied type.
See Also:
getTestDataTypes(), ITestData

updateTestData

public com.rational.test.ft.vp.ITestData updateTestData(java.lang.String testDataType,                                                         com.rational.test.ft.vp.ITestData testData)
This method updates the supplied test data object and returns it. The testDataType parameter is one of the hashtable keys returned by getTestDataTypes. The testData is a previously supplied ITestData object that needs to be updated to reflect the current state of the associated test object.

Overrides:
updateTestData in class ProxyTestObject
Parameters:
testDataType - A test data type supplied by getTestDataTypes.
testData - The test data base object that requires updating.
Returns:
The testData passed in with appropriate updates.
See Also:
getTestDataTypes(), ITestData