- case "toback": if (parent == null && getSurface() != null && toBoolean(value)) { getSurface().toBack(); }
- case "tofront": if (parent == null && getSurface() != null && toBoolean(value)) { getSurface().toFront(); }
- case "redirect": if (redirect == this) redirect = (Box)value; else Log.log(this, "redirect can only be set once");
- case "font": font = value == null ? null : Font.getFont((Res)value, font == null ? 10 : font.pointsize); MARK_RESIZE; dirty();
- case "fontsize": font = Font.getFont(font == null ? null : font.res, toInt(value)); MARK_RESIZE; dirty();
- case "x": if (parent==null && Surface.fromBox(this)!=null) { CHECKSET_INT(x); } else { if (test(PACKED) && parent != null) return; CHECKSET_INT(x); dirty(); MARK_RESIZE; dirty(); }
- case "y": if (parent==null && Surface.fromBox(this)!=null) { CHECKSET_INT(y); } else { if (test(PACKED) && parent != null) return; CHECKSET_INT(y); dirty(); MARK_RESIZE; dirty(); }
- case "KeyPressed": return; // prevent stuff from hitting the Hash
- case "KeyReleased": return; // prevent stuff from hitting the Hash
- case "PosChange": return; // prevent stuff from hitting the Hash
- case "SizeChange": return; // prevent stuff from hitting the Hash
- case "childadded": return; // prevent stuff from hitting the Hash
- case "childremoved": return; // prevent stuff from hitting the Hash
- case "thisbox": {
- if (value != null) break;
- if (parent != null) { parent.removeChild(parent.indexNode(this)); return; }
- Surface surface = Surface.fromBox(this);
- if (surface != null) surface.dispose(true);
- }
- default: super.put(name, value);
+ case "redirect": if (redirect == this) redirect = (Box)value; else Log.info(this, "redirect can only be set once");
+ case "font":
+ if(!(value instanceof Stream)) throw new JSExn("You can only put streams to the font property");
+ font = value == null ? null : Font.getFont((Stream)value, font == null ? 10 : font.pointsize);
+ MARK_RESIZE;
+ dirty();
+ case "fontsize": font = Font.getFont(font == null ? null : font.stream, toInt(value)); MARK_RESIZE; dirty();
+ case "x": if (parent==null && Surface.fromBox(this)!=null) { CHECKSET_INT(x); } else { if (test(PACKED) && parent != null) return; dirty(); CHECKSET_INT(x); dirty(); MARK_RESIZE; dirty(); }
+ case "y": if (parent==null && Surface.fromBox(this)!=null) { CHECKSET_INT(y); } else { if (test(PACKED) && parent != null) return; dirty(); CHECKSET_INT(y); dirty(); MARK_RESIZE; dirty(); }
+ case "titlebar":
+ if (getSurface() != null && value != null) getSurface().setTitleBarText(JS.toString(value));
+ super.put(name,value);
+
+ case "Press1": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Press2": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Press3": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Release1": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Release2": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Release3": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Click1": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Click2": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Click3": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "DoubleClick1": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "DoubleClick2": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "DoubleClick3": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "KeyPressed": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "KeyReleased": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Move": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Enter": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+ case "Leave": if (!test(STOP_UPWARD_PROPAGATION) && parent != null) parent.putAndTriggerTraps(name, value);
+
+ case "_Move": propagateDownward(name, value, false);
+ case "_Press1": propagateDownward(name, value, false);
+ case "_Press2": propagateDownward(name, value, false);
+ case "_Press3": propagateDownward(name, value, false);
+ case "_Release1": propagateDownward(name, value, false);
+ case "_Release2": propagateDownward(name, value, false);
+ case "_Release3": propagateDownward(name, value, false);
+ case "_Click1": propagateDownward(name, value, false);
+ case "_Click2": propagateDownward(name, value, false);
+ case "_Click3": propagateDownward(name, value, false);
+ case "_DoubleClick1": propagateDownward(name, value, false);
+ case "_DoubleClick2": propagateDownward(name, value, false);
+ case "_DoubleClick3": propagateDownward(name, value, false);
+ case "_KeyPressed": propagateDownward(name, value, false);
+ case "_KeyReleased": propagateDownward(name, value, false);
+
+ case "PosChange": return;
+ case "SizeChange": return;
+ case "childadded": return;
+ case "childremoved": return;
+
+ case "thisbox": if (value == null) removeSelf();
+
+ default: super.put(name, value);