FreeWRL/FreeX3D  3.0.0
EventInMFNode.java
1 package vrml.external.field;
3 import vrml.external.Node;
5 
6 public 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 }