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 JScrollPaneProxy

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.JfcGraphicalSubitemProxy
                              extended by com.rational.test.ft.domain.java.jfc.JScrollPaneProxy
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase, IPropertyFilter, ISetParent, com.rational.test.ft.object.interfaces.IGraphical, com.rational.test.ft.object.interfaces.IGraphicalSubitem, com.rational.test.ft.object.interfaces.ISubitem
Direct Known Subclasses:
JListProxy, JTableProxy, JTextProxy, JTreeProxy

public class JScrollPaneProxy
extends JfcGraphicalSubitemProxy
implements com.rational.test.ft.object.interfaces.ISubitem

Proxy class for javax.swing.JScrollPane.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.domain.java.awt.ComponentProxy
ComponentProxy.ChildEnumerator, ComponentProxy.ImmediateChildEnumerator
 
Field Summary
protected  JScrollBarProxy theScrollBar
           
 
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
JScrollPaneProxy(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 click(com.rational.test.ft.script.Subitem subitem)
          Left mouse click on the center point of the associated subitem.
 ProxyTestObject getAssociateProxy()
          Returns the TestObject will be recordered against.
 java.awt.Rectangle getClippedRect(java.awt.Rectangle childRect)
           
 ProxyTestObject getHScroll()
          Returns the horizontal JScrollBarProxy associated with the JScrollPane.
 ProxyTestObject getRealTestObject()
          Returns the TestObject will be recordered against.
 java.lang.String getRole()
          Returns TestObjectRole.ROLE_SCROLL_PANE.
 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 getScroll(com.rational.test.ft.script.Subitem subitem)
          Returns the JScrollBarProxy related to the subitem.
protected  JScrollPaneProxy getScrollPaneProxy()
           
 java.lang.Object getSubitem(com.rational.test.ft.script.Subitem subitem)
          Returns an object that represents the specified subitem in the associated test object.
protected  java.lang.Object getViewport()
           
 ProxyTestObject getVScroll()
          Returns the vertical JScrollBarProxy associated with the JScrollPane.
 boolean isPointInObject(java.awt.Point pt)
          Determines if the specified screen relative point is contained in the component under evaluation.
 boolean isScroll(com.rational.test.ft.script.Subitem subitem)
           
 void setState(com.rational.test.ft.script.Action action)
          This method performs a specific action.
 void setState(com.rational.test.ft.script.Action action, com.rational.test.ft.script.Subitem item)
          This method performs a specific action against the subitem at a specified index.
 void setState(com.rational.test.ft.script.Action action, com.rational.test.ft.script.Subitem start, com.rational.test.ft.script.Subitem end)
          This method performs a specific action against the subitem range defined by the specified indices.
 boolean shouldBeMapped()
          Returns true when the RealTestObject is the JScrollPane itself.
 
Methods inherited from class com.rational.test.ft.domain.java.jfc.JfcGraphicalSubitemProxy
click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, getScreenPoint, getScreenPoint, getTestObjectClassName, hover, hover, hover, hover, mouseMove, mouseMove, mouseMove, mouseMove, nClick, nClickDrag, nClickDrag, nClickDragToScreenPoint, nClickDragToScreenPoint
 
Methods inherited from class com.rational.test.ft.domain.java.jfc.JComponentProxy
getBorderTitle, getClippedScreenRectangle, getDescriptiveName, getProperties, getProperty, getStandardProperties, getText, getVisibleRectangle, getVisualClippedRectangle, hasFocus, isOpaque, 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, getMappableChildren, getMappableParent, getName, getOwnedObjects, getOwner, getParent, getParent2, getParentObject, 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, processSingleMouseEvent, setProcessMouseEventHandler, setTopLevelWindow
 
Methods inherited from class com.rational.test.ft.domain.java.JavaProxy
addMappableChildrenToVector, addRecognitionProperty, allowProperty, 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
 

Field Detail

theScrollBar

protected JScrollBarProxy theScrollBar
Constructor Detail

JScrollPaneProxy

public JScrollPaneProxy(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_SCROLL_PANE.

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

getRealTestObject

public ProxyTestObject getRealTestObject()
Returns the TestObject will be recordered against. If JScrollPane has a Scrollable child, return the proxy for the child. else, return the proxy for the JScrollPane.


getViewport

protected java.lang.Object getViewport()

getAssociateProxy

public ProxyTestObject getAssociateProxy()
Returns the TestObject will be recordered against.


shouldBeMapped

public boolean shouldBeMapped()
Returns true when the RealTestObject is the JScrollPane itself. Returns false when the RealTestObject is a scrollable child of the JScrollPane.

Overrides:
shouldBeMapped in class JavaGuiProxy
Returns:
true the realTestObject is the JScrollPane false the realTestObject is a scrollable child of the JScrollPane

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 is used to resolve this query, there are situations for which this is not accurate. For instance if the clickable region on a button is not rectangular, just checking if the point is in the rectangle is not be valid.

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

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
Overrides:
getSubitem in class JfcGraphicalSubitemProxy
Parameters:
subitem - The subitem to fetch an object for.
Returns:
An object representation of the subitem.

getClippedRect

public java.awt.Rectangle getClippedRect(java.awt.Rectangle childRect)
Overrides:
getClippedRect in class JComponentProxy

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
Specified by:
getScreenRectangle in class JfcGraphicalSubitemProxy
Returns:
The adjusted rectangle surrounding subitem relative to the screen. null is returned if the subitem is not showing.

setState

public void setState(com.rational.test.ft.script.Action action)
This method performs a specific action.

Specified by:
setState in interface com.rational.test.ft.object.interfaces.ISubitem
Parameters:
action - The action that should be performed.

setState

public void setState(com.rational.test.ft.script.Action action,                      com.rational.test.ft.script.Subitem item)
This method performs a specific action against the subitem at a specified index.

Specified by:
setState in interface com.rational.test.ft.object.interfaces.ISubitem
Parameters:
item - The item to act upon.
action - The action that should be performed.

setState

public void setState(com.rational.test.ft.script.Action action,                      com.rational.test.ft.script.Subitem start,                      com.rational.test.ft.script.Subitem end)
This method performs a specific action against the subitem range defined by the specified indices.

Specified by:
setState in interface com.rational.test.ft.object.interfaces.ISubitem
Parameters:
start - The first item to act upon.
end - The last item to act upon.
action - The action that should be performed.

isScroll

public boolean isScroll(com.rational.test.ft.script.Subitem 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
Overrides:
click in class JfcGraphicalSubitemProxy

getScrollPaneProxy

protected JScrollPaneProxy getScrollPaneProxy()

getVScroll

public ProxyTestObject getVScroll()
Returns the vertical JScrollBarProxy associated with the JScrollPane.


getHScroll

public ProxyTestObject getHScroll()
Returns the horizontal JScrollBarProxy associated with the JScrollPane.


getScroll

public ProxyTestObject getScroll(com.rational.test.ft.script.Subitem subitem)
Returns the JScrollBarProxy related to the subitem.

Parameters:
subitem - the Subitem
Returns:
a ProxyTestObject related to the subitem.