summaryrefslogtreecommitdiff
path: root/toolkit/test/accessibility/AccTreeNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/test/accessibility/AccTreeNode.java')
-rw-r--r--toolkit/test/accessibility/AccTreeNode.java34
1 files changed, 30 insertions, 4 deletions
diff --git a/toolkit/test/accessibility/AccTreeNode.java b/toolkit/test/accessibility/AccTreeNode.java
index 2c041030f2fb..1ce85b68eb2d 100644
--- a/toolkit/test/accessibility/AccTreeNode.java
+++ b/toolkit/test/accessibility/AccTreeNode.java
@@ -174,6 +174,29 @@ class AccTreeNode
return null;
}
+ public AccessibleTreeNode getChildNoCreate (int nIndex)
+ throws IndexOutOfBoundsException
+ {
+ if( nIndex >= 0 )
+ {
+ for(int i = 0; i < maHandlers.size(); i++)
+ {
+ // check if this handler has the child, and if not
+ // search with next handler
+ HandlerDescriptor aDescriptor = getHandlerDescriptor (i);
+ if (nIndex < aDescriptor.mnChildCount)
+ return aDescriptor.maHandler.getChildNoCreate (this, nIndex);
+ else
+ nIndex -= aDescriptor.mnChildCount;
+ }
+ }
+ else
+ throw new IndexOutOfBoundsException();
+
+ // nothing found?
+ return null;
+ }
+
public boolean removeChild (int nIndex)
throws IndexOutOfBoundsException
{
@@ -230,7 +253,7 @@ class AccTreeNode
public boolean equals (Object aOther)
{
- return (this == aOther) || aOther.equals(mxContext);
+ return (this == aOther) || (aOther!=null && aOther.equals(mxContext));
}
@@ -297,9 +320,12 @@ class AccTreeNode
The returned array containes the indices of the updated children
and can be used to create a TreeModelEvent.
*/
- public Vector update (java.lang.Class class1)
- {return update (class1, null); }
- public Vector update (java.lang.Class class1, java.lang.Class class2)
+ public Vector updateChildren (java.lang.Class class1)
+ {
+ return updateChildren (class1, null);
+ }
+
+ public Vector updateChildren (java.lang.Class class1, java.lang.Class class2)
{
Vector aChildIndices = new Vector();
int nOffset = 0;