FreeWRL / FreeX3D 4.3.0
FWSFBool.java
1package sai;
2import org.web3d.x3d.sai.*;
3
4public class FWSFBool extends FreeWRLField implements SFBool {
5 FreeWRLBrowser browser;
6
8 super(def, b);
9 browser = b;
10 }
11
12 public boolean getValue() throws InvalidFieldException {
13 checkValid();
14 return RLreturn.equals("TRUE");
15 }
16
17 public void setValue(boolean value) throws InvalidFieldException {
18 checkValid();
19 if (value) {
20 browser.newSendEvent(this, "TRUE");
21 } else {
22 browser.newSendEvent(this, "FALSE");
23 }
24 }
25}