FreeWRL / FreeX3D 4.3.0
EventInMFNode.java
1package vrml.external.field;
2import vrml.external.field.FieldTypes;
3import vrml.external.Node;
4import vrml.external.Browser;
5
6public class EventInMFNode extends EventIn {
7
8 public EventInMFNode() { EventType = FieldTypes.MFNODE; }
9
10 public void setValue(Node[] node) throws IllegalArgumentException {
11 int count;
12
13 for (count = 0; count < node.length; count++) {
14 if (node[count].nodeptr == 0) {
15 throw new IllegalArgumentException();
16 }
17 Browser.SendChildEvent (nodeptr,offset, command, node[count].nodeptr);
18 }
19 return;
20 }
21
22 public void set1Value(int index, Node node) throws IllegalArgumentException {
23 if (node.nodeptr == 0) {
24 throw new IllegalArgumentException();
25 }
26
27 Browser.newSendEvent(this, " ONEVAL " + index + " " + node.nodeptr);
28
29 return;
30 }
31}