case "ui.font.wait": return METHOD;
case "ui.font.width": return METHOD;
case "ui.font.height": return METHOD;
- case "ui.font.sansserif": return Main.builtin.get(JSU.S("fonts/vera/Vera.ttf"));
- case "ui.font.monospace": return Main.builtin.get(JSU.S("fonts/vera/VeraMono.ttf"));
- case "ui.font.serif": return Main.builtin.get(JSU.S("fonts/vera/VeraSe.ttf"));
+ case "ui.font.sansserif": return Main.vera;
+ case "ui.font.monospace": return Main.vera;
+ case "ui.font.serif": return Main.vera;
case "ui.browser": return METHOD;
case "ui.mouse": return getSub(name);
case "ui.mouse.button":
// FEATURE: move this into builtin.xwar
public Blessing bless(JS b) throws JSExn { return new Ibex.Blessing(b, this, null, null); }
// JS:FIXME: This doesn't properly handle traps
- public static class Blessing extends JS.Obj {
+ public static class Blessing extends JS.Clone {
private Ibex ibex;
private Template t = null;
public JS parentkey = null;
public JS clonee;
private Basket.Map cache = new Basket.Hash();
public Blessing(JS clonee, Ibex ibex, Blessing parent, JS parentkey) throws JSExn {
- this.clonee = clonee; this.ibex = ibex; this.parentkey = parentkey; this.parent = parent; }
+ super(clonee); this.clonee = clonee; this.ibex = ibex; this.parentkey = parentkey; this.parent = parent; }
public JS get(JS key) throws JSExn {
if (JSU.isString(key) && JSU.toString(key).equals("")) return getStatic();
if (cache.get(key) != null) return (JS)cache.get(key);
- JS ret = new Blessing(clonee.get(key), ibex, this, key);
+ JS ret = new Blessing(super.get(key), ibex, this, key);
cache.put(key, ret);
return ret;
}
public static Blessing getBlessing(JS js) {
- // CHECKME: is unclone() good enough or do we need getClonee() in Cloneable?
while (js instanceof JS.Clone && !(js instanceof Blessing)) js = js.unclone();
if (!(js instanceof Blessing)) return null;
return (Blessing)js;
if (t == null) throw new JSExn("No such template " + JSU.str(parentkey));
return t;
}
- // JS:FIXME: Blessing shouldn't need to roll its own JS.Clone implementation
- //public InputStream getInputStream() throws JSExn, IOException { return clonee.getInputStream(); }
}
}