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.jfc
Class JInternalFrameProxy

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.jfc.JComponentProxy
                          extended by com.rational.test.ft.domain.java.jfc.JInternalFrameProxy
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.IInternalFrame

public class JInternalFrameProxy
extends JComponentProxy
implements com.rational.test.ft.object.interfaces.IInternalFrame

Reconfigure the parent child relationships for JDesktop controls to include all JFrames instead of just those initiated relative to the desktop. We do not have owner-owned for non-top-level controls so must use parent-child for all internal frames. Since internal frames raised from internal frames maintain that hierarchy we need to remap that hierarchy to include the indirectly referenced internal frames.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.domain.java.awt.ComponentProxy
ComponentProxy.ChildEnumerator, ComponentProxy.ImmediateChildEnumerator
 
Field Summary
 
Fields inherited from class com.rational.test.ft.domain.java.jfc.JComponentProxy
TAB_INDEX, TAB_TEXT
 
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.domain.IDataDriven
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
 
Constructor Summary
JInternalFrameProxy(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 addRecognitionProperty(java.lang.String property, java.lang.Object value, int weight)
          Defines an additional recognition property that this proxy should utilize.
 boolean allowProperty(java.lang.String property)
          Returns true if the property is allowed.
 void close()
          This method closes the associated window.
 void contextHelp()
          Activate the context-sensitive Help
 ProxyTestObject[] getMappableChildren()
          Uses getChildren to implement.
 java.lang.String getName()
          Gets the name of the object.
 java.lang.Object getParentObject()
          Returns an object for the parent of this object.
 java.lang.Object getProperty(java.lang.String propertyName)
          Get the value for a specific property.
 java.lang.String getRole()
          Returns TestObjectRole.ROLE_INTERNAL_FRAME.
 java.lang.String getTestObjectClassName()
          Return the top level GUI test object that implements ITopWindow.
protected  java.lang.String getTitle()
          Returns the Title for the Internal frame object.
 boolean isIconified()
          Provides access to the iconified state of the frame
 boolean isMaximized()
           
 boolean isOpaque()
          Check the component under evaluation to determine if it is opaque or transparent.
 void maximize()
          This method maximizes the associated window.
 void minimize()
          This method iconifies the associated window.
 void move(java.awt.Point pt)
          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.
 void toFront()
          Causes the associated internal frame control to the front if possible.
 
Methods inherited from class com.rational.test.ft.domain.java.jfc.JComponentProxy
getBorderTitle, getClippedRect, getClippedScreenRectangle, getDescriptiveName, getProperties, getStandardProperties, getText, getVisibleRectangle, getVisualClippedRectangle, hasFocus, isPointInObject, isType, scrollRectToVisible
 
Methods inherited from class com.rational.test.ft.domain.java.awt.ComponentProxy
canBeScrolled, childConstructed, getChildAtPoint, getChildProxy, getChildrenEnumeration, getComponentChildren, getEmbeddedBrowsers, getImmediateChildren, getLabelText, getLeadingLabel, getLocationOnScreen, getMappableParent, getOwnedObjects, getOwner, getParent, getParent2, getScreenRectangle, getTopParent, getWindow, isDopeyDynamicName, isEnabled, isHScroll, isLabelled, 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, getScriptCommandFlags, getTopMappableWindow, getTopWindow, hover, hover, hover, hover, isDrag, isPointInObject, modifiersChanged, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint, processHoverMouseEvent, processMouseEvent, setProcessMouseEventHandler, setTopLevelWindow, shouldBeMapped
 
Methods inherited from class com.rational.test.ft.domain.java.JavaProxy
addMappableChildrenToVector, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMethods, getNonValueProperties, getRecognitionProperties, getRecognitionPropertyWeight, 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, getClippedScreenRectangle, getScreenPoint, getScreenPoint, getScreenRectangle, hasFocus, hover, hover, hover, hover, isEnabled, isPointInObject, isShowing, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint
 

Constructor Detail

JInternalFrameProxy

public JInternalFrameProxy(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_INTERNAL_FRAME.

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

allowProperty

public boolean allowProperty(java.lang.String property)
Description copied from interface: IPropertyFilter
Returns true if the property is allowed.

Specified by:
allowProperty in interface IPropertyFilter
Overrides:
allowProperty in class JavaProxy
Returns:
true if the property is allowed.

getProperty

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

Overrides:
getProperty in class JComponentProxy
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()
Return the top level GUI test object that implements ITopWindow. This proxy may be used for Frame that are not top level windows, but the same support still works.

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

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 ComponentProxy
Returns:
The parent test object or null for a top level window.

getName

public java.lang.String getName()
Gets the name of the object. There is a bug in JInternalFrame that calling the getName method will occasionally never return, it hangs! This method always returns null to avoid this issue.

Overrides:
getName in class ComponentProxy

getTitle

protected java.lang.String getTitle()
Returns the Title for the Internal frame object.


isOpaque

public boolean isOpaque()
Check 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 JComponentProxy
Returns:
true if component is opaque, else false.

addRecognitionProperty

public void addRecognitionProperty(java.lang.String property,                                    java.lang.Object value,                                    int weight)
Defines an additional recognition property that this proxy should utilize. Properties defined outside a proxy must always be attached to the proxy when it is created. This may be problematic in some domains, and these properties must be ignored if appropriate proxy caching is not being performed. Properties added to a proxy should be returned through the getRecognitionProperties method.

Overrides:
addRecognitionProperty in class JavaProxy
Parameters:
property - The recognition property name. Care should be taken to avoid conflicts with existing property names.
value - The value of the added recognition property.
weight - The weight associated with this recognition property. This value should be returned when the getRecognitionPropertyWeight method is called.
See Also:
JavaProxy.getRecognitionProperties(), JavaProxy.getRecognitionPropertyWeight(String), getProperty(String)

getMappableChildren

public ProxyTestObject[] getMappableChildren()
Uses getChildren to implement.

Overrides:
getMappableChildren in class ComponentProxy
Returns:
null, if no known children.

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

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 pt)
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:
pt - 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

isMaximized

public boolean isMaximized()

toFront

public void toFront()
Description copied from interface: com.rational.test.ft.object.interfaces.IInternalFrame
Causes the associated internal frame control to the front if possible. If this action is not possible, an appropriate exception is thrown.

Specified by:
toFront in interface com.rational.test.ft.object.interfaces.IInternalFrame

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