FreeWRL/FreeX3D  3.0.0
EventInMFFloat.java
1 package vrml.external.field;
3 import vrml.external.Node;
5 
6 public class EventInMFFloat extends EventIn {
7 
8  public EventInMFFloat() { EventType = FieldTypes.MFFLOAT; }
9 
10  public void setValue(float[] value) throws IllegalArgumentException {
11  String val;
12 
13  int count;
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 
25  return;
26  }
27 
28  public void set1Value(int index, float value) throws IllegalArgumentException {
29  if (index < 0) {
30  throw new IllegalArgumentException();
31  }
32  Browser.newSendEvent(this, " ONEVAL " + index + " " + value);
33  return;
34  }
35 }