+ 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 "box": return new Box();
+ case "clone": return METHOD;
+ case "bless": return METHOD;
+ case "regexp": return METHOD;
+ case "ui": return getSub("ui");
+ case "ui.font": return getSub("ui.font");
+ case "ui.font.sansserif": return Main.builtin.get("fonts/vera/Vera.ttf");
+ case "ui.font.monospace": return Main.builtin.get("fonts/vera/VeraMono.ttf");
+ case "ui.font.serif": return Main.builtin.get("fonts/vera/VeraSe.ttf");
+ 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.name": return getSub("ui.key.name");
+ case "ui.key.name.alt": return Platform.altKeyName();
+ case "ui.key.alt": return Surface.alt ? T : F;
+ 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 N(Short.MAX_VALUE);
+ case "ui.screen": return getSub("ui.screen");
+ case "ui.screen.width": return N(Platform.getScreenWidth());
+ case "ui.screen.height": return N(Platform.getScreenHeight());
+ case "undocumented": return getSub("undocumented");
+ case "undocumented.initialOrigin": return Main.origin;
+ case "undocumented.initialTemplate": return Main.initialTemplate;
+ case "thread": return getSub("thread");
+ case "thread.yield": return METHOD;
+ case "thread.sleep": return METHOD;
+ case "stream": return getSub("stream");
+ case "stream.homedir": return url2res("file:" + System.getProperty("user.home"));
+ case "stream.tempdir": 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 "net": return getSub("net");
+ case "net.rpc": return getSub("net.rpc");
+ case "net.rpc.xml": return METHOD;
+ case "net.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);
+ }