+ public Object get(Object name) throws JSExn {
+ if (name instanceof String && ((String)name).length() == 0) return rr;
+ //#switch(name)
+ case "math": return xwtMath;
+ case "string": return xwtString;
+ case "date": return METHOD;
+ case "origin": return Main.origin; // FIXME not in ref
+ case "box": return new Box();
+ case "apply": return METHOD;
+ case "graft": return METHOD;
+ case "clone": return METHOD;
+ case "regexp": return METHOD;
+ case "font": return getSub("font");
+ case "font.sansserif": return Main.builtin.get("fonts/vera/Vera.ttf");
+ case "font.monospace": return Main.builtin.get("fonts/vera/VeraMono.ttf");
+ case "font.serif": return Main.builtin.get("fonts/vera/VeraSe.ttf");
+ case "ui": return getSub("ui");
+ case "ui.browser": return METHOD;
+ case "ui.mouse": return getSub("ui.mouse");
+ case "ui.mouse.button":
+ if (Surface.button1 && !Surface.button2 && !Surface.button3) return N(1);
+ else if (!Surface.button1 && Surface.button2 && !Surface.button3) return N(2);
+ else if (!Surface.button1 && !Surface.button2 && Surface.button3) return N(3);
+ else return ZERO;
+ case "ui.key": return getSub("ui.key");
+ case "ui.key.alt": return getSub("ui.key.alt");
+ case "ui.key.alt.name": return Platform.altKeyName();
+ case "ui.key.control": return Surface.control ? T : F;
+ case "ui.key.shift": return Surface.shift ? T : F;
+ case "ui.clipboard": return Platform.getClipBoard();
+ case "ui.maxdim": return new Integer(Short.MAX_VALUE);
+ case "ui.screen": return getSub("ui.screen");
+ case "ui.screen.width": return new Integer(Platform.getScreenWidth());
+ case "ui.screen.height": return new Integer(Platform.getScreenHeight());
+ case "undocumented": return getSub("undocumented");
+ case "undocumented.internal": return getSub("undocumented.internal");
+ case "thread": return getSub("thread");
+ case "thread.yield": return METHOD;
+ case "thread.sleep": return METHOD;
+ case "stream": return getSub("stream");
+ case "stream.home": return url2res("file:" + System.getProperty("user.home"));
+ case "stream.temp": return url2res("file:" + System.getProperty("java.io.tempdir"));
+ case "stream.watch": return METHOD;
+ case "stream.unzip": return METHOD;
+ case "stream.uncab": return METHOD;
+ case "stream.cache": return METHOD;
+ case "stream.url": return METHOD;
+ case "stream.parse.html": return METHOD;
+ case "stream.parse.xml": return METHOD;
+ case "stream.parse.utf8": return METHOD;
+ case "rpc": return getSub("rpc");
+ case "rpc.xml": return METHOD;
+ case "rpc.soap": return METHOD;
+ case "log": return getSub("log");
+ case "log.debug": return METHOD;
+ case "log.info": return METHOD;
+ case "log.warn": return METHOD;
+ case "log.error": return METHOD;
+ case "crypto": return getSub("crypto");
+ case "crypto.rsa": return METHOD;
+ case "crypto.md5": return METHOD;
+ case "crypto.sha1": return METHOD;
+ case "crypto.rc4": return METHOD;
+ //#end
+ return super.get(name);
+ }