Beispiel #1
0
 public Thing cmdCode(Interp interp, Thing[] argv) throws HeclException {
   Properties p = WidgetInfo.defaultProps(Canvas.class);
   p.setProps(argv, 1);
   HeclCanvas w = new HeclCanvas(HeclUtils.thing2bool(p.getProp(WidgetInfo.NSUPPRESSKEYS)));
   p.delProp(WidgetInfo.NTITLE);
   p.delProp(WidgetInfo.NSUPPRESSKEYS);
   return ObjectThing.create(setInstanceProperties(interp, w, p));
 }
Beispiel #2
0
 public static Properties defaultProps(Class c) {
   Properties p = new Properties();
   Vector v = (Vector) widgetprops.get(c);
   int n = v.size();
   for (int i = 0; i < n; ++i) {
     WidgetProp wp = (WidgetProp) v.elementAt(i);
     p.setProp(wp.name, wp.defaultvalue);
   }
   return p;
 }