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 TopLevelWindowProxy

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.ComponentProxy
                      extended by com.rational.test.ft.domain.java.awt.TopLevelWindowProxy
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase, IPropertyFilter, ISetParent, com.rational.test.ft.object.interfaces.IFrame, com.rational.test.ft.object.interfaces.IGraphical, com.rational.test.ft.object.interfaces.ITopWindow
Direct Known Subclasses:
FrameProxy, WindowProxy

public abstract class TopLevelWindowProxy
extends ComponentProxy
implements com.rational.test.ft.object.interfaces.ITopWindow

Base proxy class for java.awt.Frame & java.awt.Window.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.domain.java.awt.ComponentProxy
ComponentProxy.ChildEnumerator, ComponentProxy.ImmediateChildEnumerator
 
Field Summary
static java.lang.String CAPTION
           
 
Fields inherited from class com.rational.test.ft.domain.java.awt.ComponentProxy
childrenEnumerated, CLASSINDEX, CLASSINDEXWEIGHT, MAX_NAME, NAMEPROPERTY, NAMEPROPERTYWEIGHT, PRIORLABEL, PRIORLABELWEIGHT
 
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, INPUTKEYS_METHOD
 
Fields inherited from interface com.rational.test.ft.domain.IDataDriven
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
 
Constructor Summary
TopLevelWindowProxy(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()
          All actions performed against an inactive window will be recorded as a call to this method.
 void close()
          This method closes the associated window.
 void contextHelp()
          Activate the context-sensitive Help
protected abstract  com.rational.test.ft.script.CaptionText getCaption()
          Returns the Title for the Frame 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.
 long getHandle()
          Get the top-level window associated with this frame and return its native handle.
 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.
protected  com.rational.test.ft.sys.graphical.TopLevelWindow getTopLevelWindow()
          Get the top-level window associated with this Frame.
 java.awt.Rectangle getVisualClippedRectangle()
          The optimized way to obtain the ClippedRectangle.
 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
protected  boolean isTopLevel()
          Is this Frame a top-level window?
 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.awt.ComponentProxy
canBeScrolled, childConstructed, getChildAtPoint, getChildProxy, getChildrenEnumeration, getClippedRect, getComponentChildren, getEmbeddedBrowsers, getImmediateChildren, getLabelText, getLeadingLabel, getLocationOnScreen, getMappableChildren, getMappableParent, getName, getOwnedObjects, getOwner, getParent, getParent2, getParentObject, getProperty, getRole, getTopParent, getWindow, hasFocus, isDopeyDynamicName, isEnabled, isHScroll, isLabelled, isOpaque, isRecognitionProperty, isShowing, isVScroll, setParent
 
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, getMethodSpecForPoint, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScreenPoint, 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, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMethods, getNonValueProperties, getProperties, getRecognitionProperties, getRecognitionPropertyWeight, getStandardProperties, getTestDataTypes, getTestDomain, getTopMappableParent, getUniqueId, getVisualClippableParent, hasAddedRecognitionProperties, 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, 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, getScreenPoint, getScreenPoint, hasFocus, hover, hover, hover, hover, isEnabled, isOpaque, isPointInObject, isShowing, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint
 

Field Detail

CAPTION

public static final java.lang.String CAPTION
See Also:
Constant Field Values
Constructor Detail

TopLevelWindowProxy

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

isTopLevel

protected boolean isTopLevel()
Is this Frame a top-level window?


getCaption

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


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

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

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. The window is first de-iconified if necessary, and then activated (on Windows this means calling SetForegroundWindow()). If it is not possible to activate the window 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. Frame.activate() is generally called before any UI action that occurs on a component in the frame. For instance, JavaGuiProxy.click() calls activateTopWindow(), which in most cases makes its way to Frame.activate() (assuming the top window to be activated is a Frame).

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

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

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

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()
All actions performed against an inactive window will be recorded as a call to this method. Top objects become inactive when a modal dialog box prevents them from becoming active. Actions against an inactive window will cause the top most modal dialog box to be activated instead of this test object getting activated.

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

getHandle

public long getHandle()
Get the top-level window associated with this frame and return its native handle. Note that native handles are not exposed through AWT and this relies on native window code.

Since:
RFT2.0

getTopLevelWindow

protected com.rational.test.ft.sys.graphical.TopLevelWindow getTopLevelWindow()
Get the top-level window associated with this Frame.


getScreenRectangle

public java.awt.Rectangle getScreenRectangle()
Description copied from class: ComponentProxy
Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen. This commonly consists of 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 ComponentProxy
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 JavaGuiProxy
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()
Description copied from class: ProxyTestObject
The optimized way to obtain the ClippedRectangle.

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