2 import org.web3d.x3d.sai.*;
13 public void getValue(
X3DNode[] nodes)
throws ArrayIndexOutOfBoundsException {
15 StringTokenizer tokens;
20 rep = browser.SendEventOut(nodePtr, offset, datasize, dataType,
command);
21 System.out.println(
"GOT REP: " + rep);
22 tokens =
new StringTokenizer(rep);
24 tokens =
new StringTokenizer(RLreturn);
27 count = tokens.countTokens();
29 if (nodes.length < count) {
30 throw new ArrayIndexOutOfBoundsException(
"MFNode getValue passed array of insufficient size");
35 while (count2 < count) {
37 rep = tokens.nextToken();
38 ((
FreeWRLNode)nodes[count2]).setPerlPtr(
new String(rep));
39 ((
FreeWRLNode)nodes[count2]).setPointer(
new String(rep));
43 public X3DNode get1Value(
int index)
throws ArrayIndexOutOfBoundsException {
45 StringTokenizer tokens;
51 rep = browser.SendEventOut(nodePtr, offset, datasize, dataType,
command);
52 tokens =
new StringTokenizer(rep);
54 tokens =
new StringTokenizer(RLreturn);
57 count = tokens.countTokens();
60 throw new ArrayIndexOutOfBoundsException(
"MFNode get1Value passed index out of bounds");
67 while (count2 < count) {
69 rep = tokens.nextToken();
70 nodes[count2].setPerlPtr(
new String(rep));
71 nodes[count2].setPointer(
new String(rep));
76 public void setValue(
int size,
X3DNode[] value) {
79 if (size > value.length) {
83 for (count = 0; count < value.length; count++) {
84 if ((((
FreeWRLNode)(value[count])).getPointer()) == null) {
86 browser.SendChildEvent(nodePtr, offset,
command, ((
FreeWRLNode)value[count]).getPointer());
89 public void set1Value(
int index,
X3DNode value) {
92 public void append(
X3DNode value) {
94 StringTokenizer tokens;
95 String tempPtr, tempName;
100 rep = browser.SendEventOut(nodePtr, offset, datasize, dataType,
command);
101 tokens =
new StringTokenizer(rep);
103 tokens =
new StringTokenizer(RLreturn);
106 count = tokens.countTokens();
110 while (count2 < count) {
111 rep = tokens.nextToken();
112 tempName =
new String(rep);
113 rep = tokens.nextToken();
114 tempPtr =
new String(rep);
115 browser.SendChildEvent(nodePtr, offset,
command, tempPtr);
121 public void insertValue(
int index,
X3DNode value) {
123 StringTokenizer tokens;
126 String tempPtr, tempName;
129 rep = browser.SendEventOut(nodePtr, offset, datasize, dataType,
command);
130 tokens =
new StringTokenizer(rep);
132 tokens =
new StringTokenizer(RLreturn);
135 count = tokens.countTokens();
139 while (count2 < index) {
140 rep = tokens.nextToken();
141 tempName =
new String(rep);
142 rep = tokens.nextToken();
143 tempPtr =
new String(rep);
144 browser.SendChildEvent(nodePtr, offset,
command, tempPtr);
150 while (count2 < count) {
151 rep = tokens.nextToken();
152 tempName =
new String(rep);
153 rep = tokens.nextToken();
154 tempPtr =
new String(rep);
155 browser.SendChildEvent(nodePtr, offset, command, tempPtr);