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 ShellProxy

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.ControlProxy
                      extended by com.rational.test.ft.domain.java.swt.ShellProxy
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase, IMenuBarHost, IPropertyFilter, com.rational.test.ft.object.interfaces.IFrame, com.rational.test.ft.object.interfaces.IGraphical, com.rational.test.ft.object.interfaces.ITopWindow

public class ShellProxy
extends ControlProxy
implements com.rational.test.ft.object.interfaces.ITopWindow, IMenuBarHost

This is the proxy class for org.eclipse.swt.widgets.Shell.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.domain.java.swt.ControlProxy
ControlProxy.ChildEnumerator, ControlProxy.ImmediateChildEnumerator
 
Field Summary
protected static java.lang.String CAPTION
           
static java.lang.String INPUTKEYS_METHOD
          The name of the inputKeys method.
 
Fields inherited from class com.rational.test.ft.domain.java.swt.ControlProxy
childrenEnumerated, CLASSINDEX, CLASSINDEXWEIGHT, clickArgs, currentMethod, GROUPTEXT, GROUPTEXTWEIGHT, HANDLE, MAPPABLECLASSINDEX, MAPPABLECLASSINDEXWEIGHT, MAX_NAME, predownScreenRect, PRIORLABEL, PRIORLABELWEIGHT, TOOLTIPTEXT, TOOLTIPTEXTWEIGHT
 
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.object.interfaces.ITopWindow
INPUTCHARS_METHOD
 
Fields inherited from interface com.rational.test.ft.domain.IDataDriven
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
 
Constructor Summary
ShellProxy(java.lang.Object theObjectInTheSUT)
          This sole constructor for all proxy objects sets the SUT object as a member variable for the proxy.
 
Method Summary
 void activate()
          This method causes the associated window control to become the active window, if possible.
 void clickDisabled()
          Click on a window that is disabled or waiting on the modal dialog.
 void close()
          This method closes the associated window.
 void contextHelp()
          Activate the context-sensitive Help
protected  com.rational.test.ft.script.CaptionText getCaption()
          Returns the Title for the Frame object.
 java.util.Enumeration getChildrenEnumeration()
          Returns a proxy object for the owner of this object.
 java.lang.String getDescriptiveName()
          Returns a name that can be used to describe the associated UI object in a script.
 ProxyTestObject getEclipsePlatformObject()
           
 long getHandle()
          Get the value for the handle field.
 java.util.Enumeration getImmediateChildren()
          Return an enumeration of proxies for the immediate children of this object.
 ProxyTestObject getMenuBar()
          Return the menu bar associated with this frame.
 java.lang.Object getProperty(java.lang.String propertyName)
          Get the value for a specific property.
 java.lang.String getRole()
          Returns TestObjectRole.ROLE_FRAME.
 java.awt.Rectangle getScreenRectangle()
          Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen.
 com.rational.test.ft.script.ScriptCommandFlags getScriptCommandFlags()
          This method returns an active state value that reflects the state of the test object at the time of the call.
 java.lang.String getTestObjectClassName()
          Returns the classname of a top level gui test object.
 java.lang.String getText()
           
 void inputChars(java.lang.String keys)
          This method sends the supplied characters to the associated window.
 void inputKeys(java.lang.String keys)
          This method sends the supplied characters to the associated window.
 boolean isIconified()
          Provides access to the iconified state of the frame
 void maximize()
          This method maximizes the associated window.
 void minimize()
          This method iconifies the associated window.
 void move(java.awt.Point screenPt)
          Moves the frame to the specified location within parent.
 void processSingleMouseEvent(IMouseActionInfo action)
          Return a MethodSpecification for the specified mouse event.
 void resize(int width, int height)
          Resizes the frame to the specified width and height.
 void restore()
          This method restores the associated window.
 
Methods inherited from class com.rational.test.ft.domain.java.swt.ControlProxy
childConstructed, getActionArgs, getChannel, getChildProxy, getClippedScreenRectangle, getDefaultActionArgs, getLabelText, getLeadingLabel, getLocationOnScreen, getMappableParent, getName, getOwnedObjects, getOwner, getParent, getParentObject, getReorderedChildren, getStyle, getToolTipText, getTopMappableParent, getTopParent, getVisualClippedRectangle, hasFocus, isEnabled, isGTK, isLabelled, isObjectMoved, isShell, isShowing, processHoverMouseEvent, processPreDownMouseEvent, processPreUpMouseEvent, scrollRectToVisible, setClickArgs, setDownPointArgs, setDrag, setMethodSpecification, setMultiClickAction, setRecordCache
 
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, getChildAtPoint, getClippedRect, getMethodSpecForPoint, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScreenPoint, getTopMappableWindow, getTopWindow, hover, hover, hover, hover, isDrag, isOpaque, isPointInObject, isPointInObject, modifiersChanged, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint, processMouseEvent, setProcessMouseEventHandler, setTopLevelWindow, shouldBeMapped
 
Methods inherited from class com.rational.test.ft.domain.java.JavaProxy
addMappableChildrenToVector, addRecognitionProperty, allowProperty, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMappableChildren, getMethods, getNonValueProperties, getProperties, getRecognitionProperties, getRecognitionPropertyWeight, getStandardProperties, getTestDataTypes, getTestDomain, getUniqueId, 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, getTestData, 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
 
Methods inherited from interface com.rational.test.ft.object.interfaces.IGraphical
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, getChildAtPoint, getClippedScreenRectangle, getScreenPoint, getScreenPoint, hasFocus, hover, hover, hover, hover, isEnabled, isOpaque, isPointInObject, isShowing, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint
 

Field Detail

CAPTION

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

INPUTKEYS_METHOD

public static final java.lang.String INPUTKEYS_METHOD
The name of the inputKeys method.

See Also:
Constant Field Values
Constructor Detail

ShellProxy

public ShellProxy(java.lang.Object theObjectInTheSUT)
This sole constructor for all proxy objects 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_FRAME.

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

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 ControlProxy
Returns:
A descriptive object name.

inputKeys

public void inputKeys(java.lang.String keys)
This method sends the supplied characters to the associated window. The window is then responsible for sending the characters on to the appropriate controls nested in that window.

Specified by:
inputKeys in interface com.rational.test.ft.object.interfaces.ITopWindow
Parameters:
keys - The characters to be processed by this window.

inputChars

public void inputChars(java.lang.String keys)
This method sends the supplied characters to the associated window. The window is then responsible for sending the characters on to the appropriate controls nested in that window. The characters are uninterpreted. For example, inputChars("+a+b") would emit "+a+b", as opposed to inputKeys("+a+b") which will interpret the "+" as shift and emit "AB".

Specified by:
inputChars in interface com.rational.test.ft.object.interfaces.ITopWindow
Parameters:
keys - The characters to be processed by this window.

activate

public void activate()
This method causes the associated window control to become the active window, if possible. If not possible an appropriate exception will be thrown. Common causes for the window to not become active are that another window is modal or the window is not displayable.

Specified by:
activate in interface com.rational.test.ft.object.interfaces.ITopWindow

close

public void close()
This method closes the associated window. The means by wich the window is closed depends on the platform. The most resilient means of closing the window should be used, for instance clicking on the window close icon. If already closed this method has no effect.

Specified by:
close in interface com.rational.test.ft.object.interfaces.IFrame

maximize

public void maximize()
This method maximizes the associated window. The means by wich the window is maximized depends on the platform. The most resilient means of maximizing the window should be used. If already maximized this method has no effect.

Specified by:
maximize in interface com.rational.test.ft.object.interfaces.IFrame

minimize

public void minimize()
This method iconifies the associated window. The means by wich the window is iconified depends on the platform. The most resilient means of iconifying the window should be used. If the window is already minimized this method has no effect.

Specified by:
minimize in interface com.rational.test.ft.object.interfaces.IFrame

restore

public void restore()
This method restores the associated window. The means by wich the window is restored depends on the platform. The most resilient means of restoring the window should be used. Restoring a window depends on the state of the window, if iconified it will be deiconified, if maximized it will be returned to it's normal size and if already the normal size this method has no effect.

Specified by:
restore in interface com.rational.test.ft.object.interfaces.IFrame

isIconified

public boolean isIconified()
Description copied from interface: com.rational.test.ft.object.interfaces.IFrame
Provides access to the iconified state of the frame

Specified by:
isIconified in interface com.rational.test.ft.object.interfaces.IFrame
Returns:
boolean - true, if the frame can be iconified, false otherwise

resize

public void resize(int width,                    int height)
Description copied from interface: com.rational.test.ft.object.interfaces.IFrame
Resizes the frame to the specified width and height.

Specified by:
resize in interface com.rational.test.ft.object.interfaces.IFrame
Parameters:
width - The new width in pixels size
height - The new height in pixel size

move

public void move(java.awt.Point screenPt)
Description copied from interface: com.rational.test.ft.object.interfaces.IFrame
Moves the frame to the specified location within parent.

Specified by:
move in interface com.rational.test.ft.object.interfaces.IFrame
Parameters:
screenPt - The point specified in java.awt.Point to move the application

contextHelp

public void contextHelp()
Description copied from interface: com.rational.test.ft.object.interfaces.IFrame
Activate the context-sensitive Help

Specified by:
contextHelp in interface com.rational.test.ft.object.interfaces.IFrame

clickDisabled

public void clickDisabled()
Description copied from interface: com.rational.test.ft.object.interfaces.ITopWindow
Click on a window that is disabled or waiting on the modal dialog.

Specified by:
clickDisabled in interface com.rational.test.ft.object.interfaces.ITopWindow

getCaption

protected com.rational.test.ft.script.CaptionText getCaption()
Returns the Title for the Frame object.


getProperty

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

Overrides:
getProperty in class ControlProxy
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)

getTestObjectClassName

public java.lang.String getTestObjectClassName()
Returns the classname of a top level gui test object.

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

getText

public java.lang.String getText()

getMenuBar

public ProxyTestObject getMenuBar()
Return the menu bar associated with this frame. If there is no menu bar association then null should be returned.

Specified by:
getMenuBar in interface IMenuBarHost

getChildrenEnumeration

public java.util.Enumeration getChildrenEnumeration()
Returns a proxy object for the owner of this object. Returns null if this object has no owner.

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

getImmediateChildren

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

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

getScreenRectangle

public java.awt.Rectangle getScreenRectangle()
Description copied from class: ControlProxy
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 ControlProxy
Returns:
The adjusted rectangle surrounding component relative to the screen.
See Also:
IGraphical.isPointInObject(java.awt.Point), IGraphical.getClippedScreenRectangle()

getScriptCommandFlags

public com.rational.test.ft.script.ScriptCommandFlags getScriptCommandFlags()
Description copied from class: JavaGuiProxy
This method returns an active state value that reflects the state of the test object at the time of the call. The state includes values such as enabled and showing< and allows the find algorithm to wait until a required state is achieved.

Overrides:
getScriptCommandFlags in class JavaGuiProxy
Returns:
An object that reflects the active state of the represented test 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. We supply this method for a Frame (rather than inheriting from JavaGuiProxy) so that we can special-case the icons in the title bar.

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

getHandle

public long getHandle()
Description copied from class: ControlProxy
Get the value for the handle field. * 2007/12/20 by sky Create AXUIElement object.

Overrides:
getHandle in class ControlProxy

getEclipsePlatformObject

public ProxyTestObject getEclipsePlatformObject()