public class GuiChildIterator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
GuiChildIterator.ClassTypeInfo |
Modifier and Type | Field and Description |
---|---|
protected static java.util.Hashtable |
absindices
Stores object references at absolute indices.
|
static int |
CLASSIC_SEARCH_MODE
0=Classic Search Mode
The default mode which attempts to mimic the IBM Rational Robot search algorithm in order
to retain compatibility with IBM Rational Robot recognition strings.
|
static int |
FULLPATH_SEARCH_MODE
1=Fullpath Search Mode (New, and incompatible with IBM Rational Robot)
A new search mode which requires recognition strings to contain info for each hierarchical
level in the parent/child ancestry tree.
|
protected java.util.List |
gather
Stores list of matching named items.
|
protected static boolean |
hasFinalMatch
Flag indicating a final match was achieved for the object vector.
|
protected static java.util.Vector |
matches
Stores object references that match pieces of our recognition strings.
|
protected static boolean |
notFound
Flag indicating whether object searches should continue to iterate.
|
protected static int |
SEARCH_MODE
Default is CLASSIC_SEARCH_MODE
|
Constructor and Description |
---|
GuiChildIterator(java.util.List gather)
ONLY used internally by the initial GuiChildIterator for each subsequent
child level in the hierarchy search.
|
GuiChildIterator(java.lang.Object aparent,
GuiObjectVector agovVector,
java.util.List gather)
Called only once by some external routine kicking off a TestObject search.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Hashtable |
getAbsoluteIndexStore()
Returns stored absolute indices Hashtable.
|
java.util.List |
getGather()
Returns are stored List.
|
java.lang.Object |
getMatchedGuiObject()
Retrieves the final Object that satisfies the entire GuiObjectVector recognition string.
|
static java.util.Vector |
getMatches()
Retrieves the final list of possible child matches.
|
static int |
getSearchMode() |
protected GuiChildIterator.ClassTypeInfo |
incrementClassTypeIndices(java.lang.Object child,
GuiObjectVector govVector,
int govLevel,
int objLevel,
java.util.Hashtable classindices,
java.util.Hashtable typeindices,
java.lang.String classname) |
protected void |
processChildren(java.lang.Object achild,
GuiObjectVector agovVector,
int agovLevel,
int aobjLevel,
java.util.Hashtable classindices,
java.util.Hashtable typeindices,
java.lang.String typeclass)
See if the provided object reference has any children that may help satisfy the
recognition string.
|
protected void |
processNextLevel(java.lang.Object[] children,
GuiObjectVector govVector,
int govLevel,
int objLevel,
java.util.Hashtable entry_classindices,
java.util.Hashtable entry_typeindices,
boolean onlyOneChildVisible)
Called internally by processChildren only.
|
protected void |
processParent(java.lang.Object parent,
GuiObjectVector agovVector,
int agovLevel,
int aobjLevel,
java.util.Hashtable classindices,
java.util.Hashtable typeindices,
java.lang.String typeclass) |
static void |
resetAbsoluteIndexStore()
Reset\Clear stored absolute indices.
|
static void |
setSearchMode(int search_mode) |
public static final int CLASSIC_SEARCH_MODE
1 /\ 2 5 / \--\--\---\---\ 3 6 6 6 10? 10? / \ 4 7 \ 8 \ 9
public static final int FULLPATH_SEARCH_MODE
1 /\ 1 2 / \--\--\--\--\ 1 1 2 3 4 5 / \ \ 1 1 1 \--\ 1 2
protected static int SEARCH_MODE
protected static java.util.Vector matches
protected static boolean notFound
protected static boolean hasFinalMatch
protected static java.util.Hashtable absindices
protected java.util.List gather
public GuiChildIterator(java.util.List gather)
gather,
- List containing names matched, if null, then match first namepublic GuiChildIterator(java.lang.Object aparent, GuiObjectVector agovVector, java.util.List gather)
If we can deduce that the parent actually exists in the path vector then that govLevel of the vector will be matched and skipped. If we find that the parent info is NOT in the provided vector then we will not skip the govLevel.
We can assume the parent info is in the path if the path begins with "\;". The next item in the path is assumed to be the topmost parent.
We can ignore the first path info if it instead begins with ".\;". The next item would be considered to be the first child of the parent.
aparent
- the topmost parent to search.
agovVector
- the govVector (recognition string) to satisfy with the search.
gather,
- List containing names matched, if null, then match first namepublic static int getSearchMode()
public static void setSearchMode(int search_mode)
search_mode
- the SEARCH_MODE to setpublic java.util.List getGather()
public static java.util.Hashtable getAbsoluteIndexStore()
public static void resetAbsoluteIndexStore()
public static java.util.Vector getMatches()
protected void processChildren(java.lang.Object achild, GuiObjectVector agovVector, int agovLevel, int aobjLevel, java.util.Hashtable classindices, java.util.Hashtable typeindices, java.lang.String typeclass)
Throughout the process we must maintain an accurate count of each class and its associated object type in each child branch. In this way, we keep track of when we have found the nth Index of a class or an associated object type in the branch. Thus, for each object encountered, we must increment both the class count, and t he object type count for that class in this branch.
Note, as we go down an object hierarchy branch, the counts increment. However, when we reset back up to a higher level in the object hierarchy to go down a new branch, the counts must be reset to those counts that were valid on entry at that level.
This function is only called internally.
achild
- the Object to process for children.
agovVector
- the currently active GuiObjectVector.
agovLevel
- the hierarchy level in the GuiObjectVector we are trying
to satisfy.
aobjLevel
- the level in the actual object hierarchy we are searching.
classindices
- the storage of current class counts.
typeindices
- the storage of current object type counts.protected void processParent(java.lang.Object parent, GuiObjectVector agovVector, int agovLevel, int aobjLevel, java.util.Hashtable classindices, java.util.Hashtable typeindices, java.lang.String typeclass)
protected GuiChildIterator.ClassTypeInfo incrementClassTypeIndices(java.lang.Object child, GuiObjectVector govVector, int govLevel, int objLevel, java.util.Hashtable classindices, java.util.Hashtable typeindices, java.lang.String classname)
child
- govVector
- objLevel
- govLevel
- classindices
- typeindices
- classname
- protected void processNextLevel(java.lang.Object[] children, GuiObjectVector govVector, int govLevel, int objLevel, java.util.Hashtable entry_classindices, java.util.Hashtable entry_typeindices, boolean onlyOneChildVisible)
children
- -- array of child objects to examine to see if any one of them
satisfies the piece of the recognition string for the current
object vector level--the current substring of the full recognition
string. May be array of cached keys if GuiObjectVector is in
EXTERNAL_PROCESSING_MODE.
govVector
- -- the currently active GuiObjectVector.
govLevel
- -- the hierarchy level (current substring)in the GuiObjectVector
we are trying to satisfy.
objLevel
- -- the depth in the actual application's object hierarchy currently
being searched.
entry_classindices
- -- the storage for class counts.
entry_typeindices
- -- the storage for object type counts.
onlyOneChildVisible
- -- true if parent is a TabControl-like component,public java.lang.Object getMatchedGuiObject()
Copyright © SAS Institute. All Rights Reserved.