org.safs.rational
Class CFTree

java.lang.Object
  extended by org.safs.Processor
      extended by org.safs.ComponentFunction
          extended by org.safs.rational.CFComponent
              extended by org.safs.rational.CFTree
Direct Known Subclasses:
CFDotNetTree, CFFlexTree

public class CFTree
extends CFComponent


Purpose: CFTree, process a TREE component
Lifetime: instantiated by TestStepProcessor

Since:
JUN 04, 2003
JUL 11, 2003 (DBauman) Original Release
SEP 09, 2004 (CANAGL) Added/Fixed all partial text matching!
AUG 18, 2005 (Jeremy_J_Smith) Added "Right Click" action
Aug 22, 2005 (bolawl) Added SelectAnother*TextNode actions (RJL).
Changed Select* actions to use click() rather than
setState() so that they are always recognized (RJL).
Added extractRootName() helper function to retrieve the
text of the rootnode (RJL).
Fixed code to properly handle root node (RJL).
Re-factored commandWithOneParam() for more tree types (RJL).
Aug 26, 2005 (bolawl) Added captureTreeDataToFile() (with partial match) (RJL).
Sep 02, 2005 (bolawl) Re-factored for CFTree to utilize 2DArray of tree (rather
than a Tree object) (RJL).
Sep 08, 2005 (bolawl) Updated commandWithOneParam() and captureTreeDataToFile()
to trim off hidden root node before logging success and
improved success messages. (RJL)
Added isRootVisible() helper function. (RJL)
OCT 13, 2005 (canagl) Changes to (hopefully) better support SWT
OCT 18, 2005 (canagl) Changed generic Click commands to ClickTextNode commands
JAN 11, 2006 (bolawl) Updated captureTreeDataToFile() to format output file with
new optional parameter indentMark (default is tab \t). (RJL)
JAN 19, 2006 (bolawl) Added verifyTreeContains() for new Component Functions: (RJL)
- VerifyTreeContainsNode/PartialMatch
- SetTreeContainsNode/PartialMatch
MAR 10, 2008 (junwuma) Added two keywords for multi-selecting nodes in JavaTree CtrlClickUnverifiedTextNode and ShiftClickUnverifiedTextNode.
MAY 5, 2008 (leiwang) Reorganize keyword order, Add keyword: ClickPartial CollapsePartial DoubleClickPartial ExpandPartial RightClickPartial SelectPartial ActivateUnverifiedTextNode ClickUnverifiedTextNode CollapseUnverifiedTextNode DoubleClickUnverifiedTextNode ExpandUnverifiedTextNode RightClickUnverifiedTextNode SelectAnotherUnverifiedTextNode SelectUnverifiedTextNode VerifyNodeUnselected VerifySelectedNode Modify keyword: CtrlClickUnverifiedTextNode, ShiftClickUnverifiedTextNode Add the optional parameter [MatchIndex = index] support for many keywords
AUG 5, 2008 (leiwang) Modify methods: commandWithOneParam(),isRootVisible(),extractRootName() captureTreeDataToFile(),verifyTreeContains(). -- Repalce the usage of calling isSWTWidget() by isJavaDomain() and isSwtDomain(). I suppose the "hidden root" exists only for java-swing component. Add counstant: METHOD_TOSTRING,METHOD_GETSELECTIONPATH,METHOD_GETPATH,PROPERTY_USEROBJECT Modify method: isNodeSelected(), catch PropertyNotFoundException and MethodNotFoundException. If more than one node is selected in the tree, we will test each selected path with our test path.
OCT 28, 2008 (canagl) Catch and process NullPointerException in to2DArray for empty trees.

Field Summary
static java.lang.String ACTIVATEUNVERIFIEDTEXTNODE
           
static java.lang.String CAPTURETREEDATATOFILE
           
static java.lang.String CLICK
           
static java.lang.String CLICKPARTIAL
           
static java.lang.String CLICKUNVERIFIEDTEXTNODE
           
static java.lang.String COLLAPSE
           
static java.lang.String COLLAPSEPARTIAL
           
static java.lang.String COLLAPSEPARTIALTEXTNODE
           
static java.lang.String COLLAPSETEXTNODE
           
static java.lang.String COLLAPSEUNVERIFIEDTEXTNODE
           
static java.lang.String CTRLCLICKUNVERIFIEDTEXTNODE
           
static java.lang.String DOUBLECLICK
           
static java.lang.String DOUBLECLICKPARTIAL
           
static java.lang.String DOUBLECLICKUNVERIFIEDTEXTNODE
           
static java.lang.String EXPAND
           
static java.lang.String EXPANDPARTIAL
           
static java.lang.String EXPANDPARTIALTEXTNODE
           
static java.lang.String EXPANDTEXTNODE
           
static java.lang.String EXPANDUNVERIFIEDTEXTNODE
           
static java.lang.String INDEX_PREFIX
           
static java.lang.String MAKESELECTION
           
static java.lang.String METHOD_GETPATH
           
static java.lang.String METHOD_GETSELECTIONPATHS
           
static java.lang.String METHOD_TOSTRING
           
static java.lang.String NODE_DELIMIT
           
static java.lang.String PARTIALTREEDATATOFILE
           
static java.lang.String PROPERTY_USEROBJECT
           
static java.lang.String RIGHTCLICK
           
static java.lang.String RIGHTCLICKPARTIAL
           
static java.lang.String RIGHTCLICKUNVERIFIEDTEXTNODE
           
static java.lang.String SELECT
           
static java.lang.String SELECTANOTHERPARTIALTEXTNODE
           
static java.lang.String SELECTANOTHERTEXTNODE
           
static java.lang.String SELECTANOTHERUNVERIFIEDTEXTNODE
           
static java.lang.String SELECTPARTIAL
           
static java.lang.String SELECTPARTIALTEXTNODE
           
static java.lang.String SELECTTEXTNODE
           
static java.lang.String SELECTUNVERFIEDTEXTNODE
           
static java.lang.String SETTREECONTAINSNODE
           
static java.lang.String SETTREECONTAINSPARTIAL
           
static java.lang.String SHIFTCLICKUNVERIFIEDTEXTNODE
           
static java.lang.String VERIFYNODEUNSELECTED
           
static java.lang.String VERIFYSELECTEDNODE
           
static java.lang.String VERIFYTREECONTAINSNODE
           
static java.lang.String VERIFYTREECONTAINSPARTIAL
           
 
Fields inherited from class org.safs.rational.CFComponent
ALTLEFTDRAG, ASSIGNPROPERTYVARIABLE, CAPTUREOBJECTDATATOFILE, CAPTUREPROPERTIESTOFILE, CAPTUREPROPERTYTOFILE, CLEARAPPMAPCACHE, CLOSEWINDOW, COMPONENTCLICK, CTRLALTLEFTDRAG, CTRLCLICK, CTRLLEFTDRAG, CTRLRIGHTCLICK, CTRLSHIFTLEFTDRAG, GETGUIIMAGE, GUIDOESEXIST, GUIDOESNOTEXIST, HOVERMOUSE, HSCROLLTO, INPUTCHARACTERS, INPUTKEYS, LEFTDRAG, MAXIMIZE, MINIMIZE, obj1, RESTORE, RIGHTDRAG, script, SELECTMENUITEM, SELECTMENUITEMCONTAINS, SETPOSITION, SETPROPERTYVALUE, SHIFTCLICK, SHIFTLEFTDRAG, VERIFYARRAYPROPERTYTOFILE, VERIFYBINARYFILETOFILE, VERIFYCLIPBOARDTOFILE, VERIFYFILETOFILE, VERIFYGUIIMAGETOFILE, VERIFYMENUITEM, VERIFYMENUITEMCONTAINS, VERIFYOBJECTDATATOFILE, VERIFYPROPERTY, VERIFYPROPERTYCONTAINS, VERIFYPROPERTYTOFILE, VERIFYTEXTFILETOFILE, VERIFYVALUECONTAINS, VERIFYVALUEEQUALS, VERIFYVALUES, VERIFYVALUESIGNORECASE, VSCROLLTO, WAITFORGUI, WIN_MAXIMIZED, WIN_MINIMIZED, WIN_NORMAL
 
Fields inherited from class org.safs.ComponentFunction
action, compName, mapname, utils, windowName
 
Fields inherited from class org.safs.Processor
breakpointsOn, CASE_INSENSITIVE_FLAG, CASEINSENSITIVE_FLAG, clearProxiesAlways, commandLineBreakpoint, customStr, customText, DEBUG_MESSAGE, debugStr, debugText, DEFAULT_CUSTOM_PROCESSOR_PACKAGE, DEFAULT_CUSTOM_PROCESSOR_SUBPACKAGE, DEFAULT_PROCESSOR_PACKAGE, FAILED_MESSAGE, FAILED_OK_MESSAGE, failedStr, failedText, FAILURE_DETAIL, GENERIC_MESSAGE, genericStr, genericText, LINE_FAILURE_4, log, myBreakpointsOn, otherStr, otherText, PARAM_SIZE_1, PARAM_SIZE_2, PARAM_SIZE_3, PARAM_SIZE_4, params, PASSED_MESSAGE, passedStr, passedText, PRE_TXT_SUCCESS_4, PRE_TXT_SUCCESS_5, processorConfigSet, processorMap, recordProcessed, RECTYPE_DRIVER_COMMAND, RECTYPE_DRIVER_COMMAND_F, RECTYPE_DRIVER_COMMAND_W, RECTYPE_TEST_STEP, RECTYPE_TEST_STEP_F, RECTYPE_TEST_STEP_W, SAFS_CLEARPROXIESALWAYS_ITEM, SAFS_COMMANDLINEBREAKPOINT_ITEM, SAFS_COMMANDLINEBREAKPOINT_VARIABLE, SAFS_PARAMS_FILE, SAFS_RESBUN_NAME, SAFS_SECSWAITFORCOMPONENT_ITEM, SAFS_SECSWAITFORCOMPONENT_VARIABLE, SAFS_SECSWAITFORWINDOW_ITEM, SAFS_SECSWAITFORWINDOW_VARIABLE, SAFS_TESTDOMAINS_ITEM, SAFS_TESTDOMAINS_VARIABLE, secsWaitForComponent, secsWaitForWindow, SENT_MSG_3, testDomains, testRecordData, TXT_FAILURE_1, TXT_FAILURE_2, TXT_FAILURE_3, TXT_FAILURE_4, TXT_FAILURE_5, TXT_SUCCESS_1, TXT_SUCCESS_2, TXT_SUCCESS_2a, TXT_SUCCESS_3, TXT_SUCCESS_4, TXT_SUCCESS_5, WARNING_MESSAGE, WARNING_OK_MESSAGE, warningStr, warningText
 
Constructor Summary
CFTree()
          
Purpose: constructor, calls super
 
Method Summary
protected  java.util.List captureObjectData(TestObject tree)
          Overrides CFComponent.captureObjectData.
protected  void captureTreeDataToFile()
          
Purpose: capture the 'Tree' hierarchy data (from a TestObject) to a file.
protected  void doDoubleClick(TestObject testObjct, com.rational.test.ft.script.List path)
           
protected  void doExpand(TestObject testObjct, com.rational.test.ft.script.List path, boolean expand)
           
protected  java.lang.String extractRootName(GuiSubitemTestObject gstobj)
          Extract the text of the root node.
Note: Swing JTrees only have 1 root node.
protected  java.lang.String extractSWTRootName(GuiSubitemTestObject gstobj)
          Extract the text of the root node in an SWT Tree.
Note: SWT Trees can have multiple root nodes.
protected  Tree extractTreeItems(java.lang.Object obj)
          Extract a 'Tree' hierarchy from a TestObject.
protected  java.lang.String formatObjectData(java.util.List list)
          Overrides CFComponent.formatObjectData.
protected  boolean isNodeSelected(GuiSubitemTestObject guiObj, com.rational.test.ft.script.List testPathList)
          Note: This method can only treate the java-swing component, For other appliction, it needed to be overrided.
protected  boolean isRootVisible(GuiSubitemTestObject guiObj)
          
Purpose: helper function to check if the root node of the tree is visible
protected  void localProcess()
          
Purpose: process: process the testRecordData
This is our specific version.
protected  void process2DSubtree(ITestDataTreeNode treenode, int lev)
          Recursive helper function for to2DArray().
protected  java.lang.String[][] to2DArray(java.lang.Object obj)
          Return a 2D format of the JTree by first recursively updating the global rowlist which contains each treenode, and then dumping rowlist into the 2D array.
protected  void verifyTreeContains()
          
Purpose: Verify the existence of a node in a tree.
 
Methods inherited from class org.safs.rational.CFComponent
captureObjectDataToFile, checkForCoord, checkForCoord, componentClick, convertObjectValueToString, extractTreeItemsSub, findMenuBars, getAppletsBrowser, getComponentRectangle, getHelpers, getObjectProperty, getObjectPropertyFromProperties, getUserObject, isDotnetDomain, isFlexDomain, isHtmlDomain, isJavaDomain, isSwtDomain, isSWTWidget, isWinDomain, listAllProperties, listAllProperties, listMethods, listNonValueProperties, listProperties, matchedPathOfMenuItem, parseWhereInfo, performClick, preformDrag, process, selectMenuItem, setPosition, tobj, verifyMenuItem
 
Methods inherited from class org.safs.ComponentFunction
action_getGuiImage, action_verifyGuiImageToFile, componentExecutedFailureMessage, componentFailureMessage, componentSuccessMessage, convertCoords, convertNum, getAlternateParams, getHelpersWorker, issueActionFailure, issueActionOnXFailure, issueErrorPerformingAction, issueErrorPerformingActionOnX, issueFileErrorFailure, issueInputRecordFailure, issueParameterCountFailure, issueParameterCountFailure, issueParameterValueFailure, issuePassedSuccess, issuePassedSuccessUsing, issueUnknownErrorFailure, isSupportedRecordType, lookupAppMapCoordReference, lookupAppMapNumReference, lookupAppMapReference, updateFromTestRecordData
 
Methods inherited from class org.safs.Processor
activateBreakpoint, checkBreakpoints, checkMyBreakpoints, delay, distributeConfigInformation, getAppMapItem, getChainedProcessor, getClassInstance, getClearProxiesAlways, getCustomProcClassNames, getCustomProcInstancePath, getLogUtilities, getParams, getProcClassNames, getProcInstance, getProcInstancePath, getRequiredField, getSecsWaitForComponent, getSecsWaitForWindow, getStandardErrorMessage, getTestRecordData, getVariable, hasChainedProcessor, initProcessorAndProcess, instanceProcessorAndProcess, isBreakpointsOn, isComponentFunctionRecord, isDriverCommandRecord, isEngineCommandRecord, isMyBreakpointsOn, isRecordProcessed, paramsFailedMsg, paramsFailedMsg, processCustomProcessor, processSubclassProcessor, setBreakpointsOn, setChainedProcessor, setClearProxiesAlways, setCommandLineBreakpoint, setCustomProcInstancePath, setLogUtilities, setMyBreakpointsOn, setParams, setProcInstance, setProcInstancePath, setRecordProcessed, setSecsWaitForComponent, setSecsWaitForWindow, setTestDomains, setTestRecordData, setVariable, standardFailureMessage, substituteVariable, validateParamSize, validProcessorClassName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIVATEUNVERIFIEDTEXTNODE

public static final java.lang.String ACTIVATEUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

CAPTURETREEDATATOFILE

public static final java.lang.String CAPTURETREEDATATOFILE
See Also:
Constant Field Values

CLICKPARTIAL

public static final java.lang.String CLICKPARTIAL
See Also:
Constant Field Values

CLICK

public static final java.lang.String CLICK
See Also:
Constant Field Values

CLICKUNVERIFIEDTEXTNODE

public static final java.lang.String CLICKUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

COLLAPSE

public static final java.lang.String COLLAPSE
See Also:
Constant Field Values

COLLAPSEPARTIALTEXTNODE

public static final java.lang.String COLLAPSEPARTIALTEXTNODE
See Also:
Constant Field Values

COLLAPSEPARTIAL

public static final java.lang.String COLLAPSEPARTIAL
See Also:
Constant Field Values

COLLAPSETEXTNODE

public static final java.lang.String COLLAPSETEXTNODE
See Also:
Constant Field Values

COLLAPSEUNVERIFIEDTEXTNODE

public static final java.lang.String COLLAPSEUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

CTRLCLICKUNVERIFIEDTEXTNODE

public static final java.lang.String CTRLCLICKUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

DOUBLECLICKPARTIAL

public static final java.lang.String DOUBLECLICKPARTIAL
See Also:
Constant Field Values

DOUBLECLICK

public static final java.lang.String DOUBLECLICK
See Also:
Constant Field Values

DOUBLECLICKUNVERIFIEDTEXTNODE

public static final java.lang.String DOUBLECLICKUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

EXPAND

public static final java.lang.String EXPAND
See Also:
Constant Field Values

EXPANDPARTIAL

public static final java.lang.String EXPANDPARTIAL
See Also:
Constant Field Values

EXPANDPARTIALTEXTNODE

public static final java.lang.String EXPANDPARTIALTEXTNODE
See Also:
Constant Field Values

EXPANDTEXTNODE

public static final java.lang.String EXPANDTEXTNODE
See Also:
Constant Field Values

EXPANDUNVERIFIEDTEXTNODE

public static final java.lang.String EXPANDUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

MAKESELECTION

public static final java.lang.String MAKESELECTION
See Also:
Constant Field Values

PARTIALTREEDATATOFILE

public static final java.lang.String PARTIALTREEDATATOFILE
See Also:
Constant Field Values

RIGHTCLICKPARTIAL

public static final java.lang.String RIGHTCLICKPARTIAL
See Also:
Constant Field Values

RIGHTCLICK

public static final java.lang.String RIGHTCLICK
See Also:
Constant Field Values

RIGHTCLICKUNVERIFIEDTEXTNODE

public static final java.lang.String RIGHTCLICKUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

SELECT

public static final java.lang.String SELECT
See Also:
Constant Field Values

SELECTANOTHERPARTIALTEXTNODE

public static final java.lang.String SELECTANOTHERPARTIALTEXTNODE
See Also:
Constant Field Values

SELECTANOTHERTEXTNODE

public static final java.lang.String SELECTANOTHERTEXTNODE
See Also:
Constant Field Values

SELECTANOTHERUNVERIFIEDTEXTNODE

public static final java.lang.String SELECTANOTHERUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

SELECTPARTIAL

public static final java.lang.String SELECTPARTIAL
See Also:
Constant Field Values

SELECTPARTIALTEXTNODE

public static final java.lang.String SELECTPARTIALTEXTNODE
See Also:
Constant Field Values

SELECTTEXTNODE

public static final java.lang.String SELECTTEXTNODE
See Also:
Constant Field Values

SELECTUNVERFIEDTEXTNODE

public static final java.lang.String SELECTUNVERFIEDTEXTNODE
See Also:
Constant Field Values

SETTREECONTAINSNODE

public static final java.lang.String SETTREECONTAINSNODE
See Also:
Constant Field Values

SETTREECONTAINSPARTIAL

public static final java.lang.String SETTREECONTAINSPARTIAL
See Also:
Constant Field Values

SHIFTCLICKUNVERIFIEDTEXTNODE

public static final java.lang.String SHIFTCLICKUNVERIFIEDTEXTNODE
See Also:
Constant Field Values

VERIFYNODEUNSELECTED

public static final java.lang.String VERIFYNODEUNSELECTED
See Also:
Constant Field Values

VERIFYSELECTEDNODE

public static final java.lang.String VERIFYSELECTEDNODE
See Also:
Constant Field Values

VERIFYTREECONTAINSNODE

public static final java.lang.String VERIFYTREECONTAINSNODE
See Also:
Constant Field Values

VERIFYTREECONTAINSPARTIAL

public static final java.lang.String VERIFYTREECONTAINSPARTIAL
See Also:
Constant Field Values

NODE_DELIMIT

public static final java.lang.String NODE_DELIMIT
See Also:
Constant Field Values

INDEX_PREFIX

public static final java.lang.String INDEX_PREFIX
See Also:
Constant Field Values

METHOD_TOSTRING

public static final java.lang.String METHOD_TOSTRING
See Also:
Constant Field Values

METHOD_GETSELECTIONPATHS

public static final java.lang.String METHOD_GETSELECTIONPATHS
See Also:
Constant Field Values

METHOD_GETPATH

public static final java.lang.String METHOD_GETPATH
See Also:
Constant Field Values

PROPERTY_USEROBJECT

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

CFTree

public CFTree()

Purpose: constructor, calls super

Method Detail

localProcess

protected void localProcess()

Purpose: process: process the testRecordData
This is our specific version. We subclass the generic CFComponent. We first call super.process() [which handles actions like 'click'] The types of objects handled here are 'GuiSubitemTestObject'. Path Example: "Composers->Bach->Brandenburg Concertos Nos. 1 & 3"
Side Effects: Processor.testRecordData statusCode is set based on the result of the processing
State Read: Processor.testRecordData, Processor.params
Assumptions: none

Overrides:
localProcess in class CFComponent

doExpand

protected void doExpand(TestObject testObjct,
                        com.rational.test.ft.script.List path,
                        boolean expand)
                 throws SAFSException
Parameters:
testObjct - TestObject The tree test object
path - String The tree path to be selected
expand - boolean If true, expand the tree path; otherwise collapse the tree path
Throws:
SAFSException

doDoubleClick

protected void doDoubleClick(TestObject testObjct,
                             com.rational.test.ft.script.List path)
                      throws SAFSException
Throws:
SAFSException

extractSWTRootName

protected java.lang.String extractSWTRootName(GuiSubitemTestObject gstobj)
Extract the text of the root node in an SWT Tree.
Note: SWT Trees can have multiple root nodes. We currently only return the text of the first one.

Parameters:
gstobj, - GuiSubitemTestObject
Returns:
String text of first root node. May be empty or null.

extractRootName

protected java.lang.String extractRootName(GuiSubitemTestObject gstobj)
Extract the text of the root node.
Note: Swing JTrees only have 1 root node. However, SWT Trees can have multiple root nodes.

Parameters:
gstobj, - Object (actually of type GuiSubitemTestObject)
Returns:
String text of (first) root node. May be empty or null.

isRootVisible

protected boolean isRootVisible(GuiSubitemTestObject guiObj)

Purpose: helper function to check if the root node of the tree is visible

Parameters:
gstobj, - Object (actually of type GuiSubitemTestObject--the JTree)
Returns:
boolean; We assume that root is visible if the rootVisible property is not found or equals anything other than "false". Always returns true for SWT widgets.
Throws:
PropertyNotFoundException

extractTreeItems

protected Tree extractTreeItems(java.lang.Object obj)
                         throws SAFSException
Extract a 'Tree' hierarchy from a TestObject. This method is kept for backward compatibility with old or custom user code. We now use 'to2DArray()' instead.

Parameters:
obj, - Object (actually of type GuiSubitemTestObject--the JTree)
Returns:
org.safs.Tree or null
Throws:
SAFSException

captureObjectData

protected java.util.List captureObjectData(TestObject tree)
Overrides CFComponent.captureObjectData. Provides a List of Lists. Each List contains one tree node text at an index appropriate to its position in the tree hierarchy.
 Root
      Trunk
            Branch1
                    Leaf1
            Branch2
                    Leaf2
 etc.
 

Overrides:
captureObjectData in class CFComponent
Parameters:
tree - TestObject to snapshot data from.
Returns:
List containing a single Object item. Null if an invalid table reference is provided or some other error occurs.
See Also:
CFComponent.captureObjectData(TestObject)

formatObjectData

protected java.lang.String formatObjectData(java.util.List list)
Overrides CFComponent.formatObjectData. Provides a formatted String.

Overrides:
formatObjectData in class CFComponent
Parameters:
list - List returned from captureObjectData
Returns:
String formatted for writing to file or screen.
See Also:
CFComponent.formatObjectData(java.util.List)

to2DArray

protected java.lang.String[][] to2DArray(java.lang.Object obj)
Return a 2D format of the JTree by first recursively updating the global rowlist which contains each treenode, and then dumping rowlist into the 2D array. 2D array is sized by [num. of rows in rowlist][maximum num. of elements of each row in rowlist].

Parameters:
obj, - Object, actually of type GuiSubitemTestObject
Returns:
arr, a 2D array representation of the Tree, or null

process2DSubtree

protected void process2DSubtree(ITestDataTreeNode treenode,
                                int lev)
Recursive helper function for to2DArray(). This function will first save the node string for subtree into the global rowarray (ArrayList), then handle each child and sibling. It also keeps track of the max number of columns necessary for the 2D array.

Parameters:
treenode, - ITestDataTreeNode (the treenode)
Throws:
java.lang.ArrayIndexOutOfBoundsException

captureTreeDataToFile

protected void captureTreeDataToFile()
                              throws SAFSException

Purpose: capture the 'Tree' hierarchy data (from a TestObject) to a file.

Throws:
SAFSException

verifyTreeContains

protected void verifyTreeContains()
                           throws SAFSException

Purpose: Verify the existence of a node in a tree.

Since the basic functionality is the same, this routine is
used to both verify that a node is found in a tree
(VerifyTreeContainsNode/PartialMatch) and to set a user-defined
variable with those results (SetTreeContainsNode/PartialMatch).

For SetTreeContainsNode/PartialMatch commands only, the name of
the variable which gets assigned the result will be set to the
string 'TRUE' if the node is found, or the string 'FALSE' if
the node is not found.

Throws:
SAFSException

isNodeSelected

protected boolean isNodeSelected(GuiSubitemTestObject guiObj,
                                 com.rational.test.ft.script.List testPathList)
                          throws SAFSException
Note: This method can only treate the java-swing component, For other appliction, it needed to be overrided.

Parameters:
guiObj - Represent a javax.swing.JTree object.
testPathList - The path to be tested if it is the selected path.
Returns:
True if the path is selected; False otherwise.
Throws:
SAFSException