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 TableTreeProxy

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.ScrollableProxy
                          extended by com.rational.test.ft.domain.java.swt.ScrollableSwtGraphicalSubitemProxy
                              extended by com.rational.test.ft.domain.java.swt.TableTreeProxy
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase, IPropertyFilter, com.rational.test.ft.object.interfaces.IGraphical, com.rational.test.ft.object.interfaces.IGraphicalSubitem, com.rational.test.ft.object.interfaces.IScrollable, com.rational.test.ft.object.interfaces.ISubitem

public class TableTreeProxy
extends ScrollableSwtGraphicalSubitemProxy
implements com.rational.test.ft.object.interfaces.ISubitem

This is the proxy class for org.eclipse.swt.custom.TableTree.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.domain.java.swt.ControlProxy
ControlProxy.ChildEnumerator, ControlProxy.ImmediateChildEnumerator
 
Field Summary
 
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.domain.IDataDriven
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
 
Constructor Summary
TableTreeProxy(java.lang.Object theObjectInTheSUT)
          This sole constructor for all proxy objects sets the SUT object as a member variable for the proxy.
 
Method Summary
protected  boolean allowsMultipleSelections()
          true is returned if the tree component being evaluated allows multiple nodes to be selected at the same time.
 void click(com.rational.test.ft.script.Subitem subitem)
          Left mouse click on the center point of the associated subitem.
protected  void collapseNode(java.lang.Object node)
          Set the state of the specified node to be collapsed (such that the child nodes are not visible).
protected  void deselectNode(java.lang.Object node)
           
 void doubleClick(com.rational.test.ft.script.Subitem subitem)
          Left mouse dbl-click on the center point of the associated TestObject.
 void drag(com.rational.test.ft.script.Subitem subitem)
          Left mouse drag in the associated TestObject.
protected  void expandNode(java.lang.Object node)
          Set the state of the specified node to be expanded (such that the child nodes are visible).
protected  void extendSelectNode(java.lang.Object node)
           
protected  boolean getCheckable()
           
protected  com.rational.test.ft.script.State getCheckState(java.lang.Object node)
           
 org.eclipse.swt.graphics.Rectangle getClientArea()
          Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").
protected  TableTreeItem getClosestTableTreeItem(java.awt.Point pt)
           
 int getColumnCount()
          This method returns the number of columns in the table header component under evaluation.
 int getColumnIndexAtPoint(TableTreeItem item, java.awt.Point pt)
          Returns the column index of the point given.
 java.lang.String getColumnName(int nColumn)
          This method returns the name of the column at the specified column index.
 long getHandle()
          Get the value for the handle field.
 org.eclipse.swt.widgets.ScrollBar getHorizontalBar()
          Gets the horizontal Scroll Bar.
protected  TableTreeItem getParentItem(TableTreeItem item)
           
protected  TableTree getParentTableTree(TableTreeItem item)
           
protected  com.rational.test.ft.script.Subitem[] getPath(TableTreeItem item)
           
 java.lang.Object getProperty(java.lang.String propertyName)
          Get the value for a specific property.
 java.lang.String getRole()
          Returns TestObjectRole.ROLE_TREE.
 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.
protected  java.awt.Rectangle getScreenRectangle(TableTreeItem item, int colIndex)
           
protected  com.rational.test.ft.script.Action getState(java.lang.Object node)
           
 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  TableTreeItem getTableTreeItem(com.rational.test.ft.script.Index subitem, TableTreeItem[] theItems)
           
protected  TableTreeItem getTableTreeItem(com.rational.test.ft.script.Subitem subitem)
           
protected  TableTreeItem getTableTreeItem(com.rational.test.ft.script.Text text, TableTreeItem[] theItems)
           
 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 getText(TableTreeItem item)
           
 org.eclipse.swt.widgets.ScrollBar getVerticalBar()
          Gets the vertical Scroll Bar.
protected  boolean hasDuplicateChildren(TableTreeItem path, java.lang.String node)
           
protected  boolean isChecked(java.lang.Object node)
           
 boolean isCollapsed(java.lang.Object node)
           
 boolean isExpanded(java.lang.Object node)
           
 boolean isSelected(java.lang.Object node)
           
 void processSingleMouseEvent(IMouseActionInfo action)
           
protected  void scrollCellIntoView(int nRow, int nCol, boolean isCheckBox)
           
protected  void selectNode(java.lang.Object node)
          Set the state of the specified node to be selected.
 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.
 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.
 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.ScrollableSwtGraphicalSubitemProxy
click, click, click, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, getScreenPoint, getScreenPoint, getTestObjectClassName, hover, hover, hover, hover, hScrollTo, mouseMove, mouseMove, mouseMove, mouseMove, nClick, nClickDrag, nClickDrag, nClickDragToScreenPoint, nClickDragToScreenPoint, scrollLineDown, scrollLineLeft, scrollLineRight, scrollLineUp, scrollPageDown, scrollPageLeft, scrollPageRight, scrollPageUp, setState, vScrollTo
 
Methods inherited from class com.rational.test.ft.domain.java.swt.ScrollableProxy
canBeScrolled, hScroll, isHorizontalScrollable, isPointInClientArea, isScrollable, isVerticalScrollable, scrollRectToVisible, vScroll
 
Methods inherited from class com.rational.test.ft.domain.java.swt.ControlProxy
childConstructed, getActionArgs, getChannel, getChildProxy, getChildrenEnumeration, getClippedScreenRectangle, getDefaultActionArgs, getDescriptiveName, getImmediateChildren, getLabelText, getLeadingLabel, getLocationOnScreen, getMappableParent, getName, getOwnedObjects, getOwner, getParent, getParentObject, getReorderedChildren, getScreenRectangle, getStyle, getToolTipText, getTopMappableParent, getTopParent, getVisualClippedRectangle, hasFocus, isEnabled, isGTK, isLabelled, isObjectMoved, isShell, isShowing, processHoverMouseEvent, processPreDownMouseEvent, processPreUpMouseEvent, 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, getScriptCommandFlags, 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, 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, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction
 
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.ISubitem
setState
 

Constructor Detail

TableTreeProxy

public TableTreeProxy(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_TREE.

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

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

getHandle

public long getHandle()
Get the value for the handle field.

Overrides:
getHandle in class ControlProxy

getParentItem

protected TableTreeItem getParentItem(TableTreeItem item)

getParentTableTree

protected TableTree getParentTableTree(TableTreeItem item)

getClosestTableTreeItem

protected TableTreeItem getClosestTableTreeItem(java.awt.Point pt)

getPath

protected com.rational.test.ft.script.Subitem[] getPath(TableTreeItem item)

getTableTreeItem

protected TableTreeItem getTableTreeItem(com.rational.test.ft.script.Subitem subitem)

getTableTreeItem

protected TableTreeItem getTableTreeItem(com.rational.test.ft.script.Index subitem,                                          TableTreeItem[] theItems)

getTableTreeItem

protected TableTreeItem getTableTreeItem(com.rational.test.ft.script.Text text,                                          TableTreeItem[] theItems)

isChecked

protected boolean isChecked(java.lang.Object node)

getCheckState

protected com.rational.test.ft.script.State getCheckState(java.lang.Object node)

getCheckable

protected boolean getCheckable()

getState

protected com.rational.test.ft.script.Action getState(java.lang.Object node)

isExpanded

public boolean isExpanded(java.lang.Object node)

isCollapsed

public boolean isCollapsed(java.lang.Object node)

isSelected

public boolean isSelected(java.lang.Object node)

allowsMultipleSelections

protected boolean allowsMultipleSelections()
true is returned if the tree component being evaluated allows multiple nodes to be selected at the same time. false is returned if only one node may be selected at any time.

Returns:
true if the tree allows multiple nodes to be selected at the same time.

selectNode

protected void selectNode(java.lang.Object node)
Set the state of the specified node to be selected. If the specified node is already selected this call should be treated as a no-op.

Parameters:
node - The node that is to be selected.

extendSelectNode

protected void extendSelectNode(java.lang.Object node)

deselectNode

protected void deselectNode(java.lang.Object node)

expandNode

protected void expandNode(java.lang.Object node)
Set the state of the specified node to be expanded (such that the child nodes are visible). This command will be used during playback of a script that expanded the same node when the script was recorded. If the specified node is already expanded this command is a no-op.

Parameters:
node - The node that is to be expanded.

collapseNode

protected void collapseNode(java.lang.Object node)
Set the state of the specified node to be collapsed (such that the child nodes are not visible).

Parameters:
node - The node that is to be collapsed.

scrollCellIntoView

protected void scrollCellIntoView(int nRow,                                   int nCol,                                   boolean isCheckBox)

getText

public java.lang.String getText(TableTreeItem item)

getHorizontalBar

public org.eclipse.swt.widgets.ScrollBar getHorizontalBar()
Gets the horizontal Scroll Bar.

Overrides:
getHorizontalBar in class ScrollableProxy
Returns:
the horizontal Scroll Bar (or null)

getVerticalBar

public org.eclipse.swt.widgets.ScrollBar getVerticalBar()
Gets the vertical Scroll Bar.

Overrides:
getVerticalBar in class ScrollableProxy
Returns:
the vertical Scroll Bar (or null)

getClientArea

public org.eclipse.swt.graphics.Rectangle getClientArea()
Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").

Overrides:
getClientArea in class ScrollableProxy
Returns:
the client area

getColumnIndexAtPoint

public int getColumnIndexAtPoint(TableTreeItem item,                                  java.awt.Point pt)
Returns the column index of the point given.

Returns:
the column index

getColumnCount

public int getColumnCount()
This method returns the number of columns in the table header component under evaluation.

Returns:
The column count, zero if the count can not be determined.

getColumnName

public java.lang.String getColumnName(int nColumn)
This method returns the name of the column at the specified column index. This is typically the title of the column, but may be an icon description or other value that uniquely identifies the column. If the column does not have name then null or "" should be returned. Note, that without a name to identify a column the column index will be used in it's place.

Parameters:
nColumn - The column index for which a name should be created.
Returns:
The title (or other name) for the column at nColumn index into the table header.

processSingleMouseEvent

public void processSingleMouseEvent(IMouseActionInfo action)
Overrides:
processSingleMouseEvent in class ScrollableProxy

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.

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.

getScreenRectangle

protected java.awt.Rectangle getScreenRectangle(TableTreeItem item,                                                 int colIndex)

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 ScrollableSwtGraphicalSubitemProxy
Returns:
The adjusted rectangle surrounding subitem relative to the screen. null is returned if the subitem is not showing.

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 ScrollableSwtGraphicalSubitemProxy

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
Overrides:
doubleClick in class ScrollableSwtGraphicalSubitemProxy

drag

public void drag(com.rational.test.ft.script.Subitem subitem)
Left mouse drag in the associated TestObject. This method is a simple shortcut to the drag method with a modifier parameter (modifier set to MOUSE_LEFT).

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

hasDuplicateChildren

protected boolean hasDuplicateChildren(TableTreeItem path,                                        java.lang.String node)

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 JavaProxy
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 ProxyTestObject
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

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)