2 import org.web3d.x3d.sai.*;
6 private static HashMap browserProperties;
8 private static final int ABSTRACT_NODES = 0;
9 private static final int CONCRETE_NODES = 1;
10 private static final int EXTERNAL_INTERACTIONS = 2;
11 private static final int PROTOTYPE_CREATE = 3;
12 private static final int DOM_IMPORT = 4;
13 private static final int XML_ENCODING = 5;
14 private static final int CLASSIC_VRML_ENCODING = 6;
15 private static final int BINARY_ENCODING = 7;
18 browserProperties =
new HashMap();
20 browserProperties.put(
new Integer(ABSTRACT_NODES),
new Boolean(
false));
21 browserProperties.put(
new Integer(CONCRETE_NODES),
new Boolean(
true));
22 browserProperties.put(
new Integer(EXTERNAL_INTERACTIONS),
new Boolean(
true));
23 browserProperties.put(
new Integer(PROTOTYPE_CREATE),
new Boolean(
true));
24 browserProperties.put(
new Integer(DOM_IMPORT),
new Boolean(
false));
25 browserProperties.put(
new Integer(XML_ENCODING),
new Boolean(
true));
26 browserProperties.put(
new Integer(CLASSIC_VRML_ENCODING),
new Boolean(
true));
27 browserProperties.put(
new Integer(BINARY_ENCODING),
new Boolean(
true));
30 public static void setBrowserProperty(
int property,
boolean value) {
31 if ( property < 0 || property > 7) {
32 System.out.println(
"Passed invalid property value. Property set request ignored.");
34 browserProperties.remove(
new Integer(property));
35 browserProperties.put(
new Integer(property),
new Boolean(value));
39 public static boolean getBrowserProperty(
int property) {
41 temp = (Boolean) browserProperties.get(
new Integer(property));
42 return temp.booleanValue();
45 public static Map getBrowserProperties() {
46 return browserProperties;