summaryrefslogtreecommitdiff
path: root/toolkit/test
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-04-11 16:15:09 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-04-11 16:15:09 +0000
commitd19c12a12b61b29c0ad8cecebdaf8e39799a3100 (patch)
tree752f8c18b768abb2689f756b8106f80c72dd56e3 /toolkit/test
parent3b78f972a6cdf54dd569fdb6e7f1df11b446e063 (diff)
INTEGRATION: CWS vcl07 (1.3.2); FILE ADDED
2003/04/08 14:29:07 obr 1.3.2.1: re-added accessibility workbench
Diffstat (limited to 'toolkit/test')
-rw-r--r--toolkit/test/accessibility/VectorNode.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/toolkit/test/accessibility/VectorNode.java b/toolkit/test/accessibility/VectorNode.java
new file mode 100644
index 000000000000..282abb595620
--- /dev/null
+++ b/toolkit/test/accessibility/VectorNode.java
@@ -0,0 +1,50 @@
+import com.sun.star.lang.IndexOutOfBoundsException;
+import java.util.Vector;
+
+/** The VectorNode class is a simple container whose list of children is
+ managed entirely by its owner.
+*/
+class VectorNode
+ extends StringNode
+{
+ private Vector maChildren;
+
+ public VectorNode (String sDisplayObject, AccessibleTreeNode aParent)
+ {
+ super (sDisplayObject, aParent);
+
+ maChildren = new Vector ();
+ }
+
+ public void addChild (AccessibleTreeNode aChild)
+ {
+ maChildren.add (aChild);
+ }
+
+ public int getChildCount ()
+ {
+ return maChildren.size();
+ }
+
+ public AccessibleTreeNode getChild (int nIndex)
+ throws IndexOutOfBoundsException
+ {
+ return (AccessibleTreeNode)maChildren.elementAt (nIndex);
+ }
+
+ public boolean removeChild (int nIndex)
+ throws IndexOutOfBoundsException
+ {
+ return maChildren.remove (nIndex) != null;
+ }
+
+ public int indexOf (AccessibleTreeNode aNode)
+ {
+ return maChildren.indexOf (aNode);
+ }
+
+ public boolean isLeaf()
+ {
+ return maChildren.isEmpty();
+ }
+}