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