Exemplo n.º 1
0
  public void cset(Interp ip, Object target, String optname, Thing optval) throws HeclException {
    HeclCanvas c = (HeclCanvas) target;

    if (optname.equals("-fullscreen")) {
      c.setFullScreenMode(HeclUtils.thing2bool(optval));
      return;
    }
    if (optname.equals("-autoflush")) {
      c.setAutoFlushMode(HeclUtils.thing2bool(optval));
      return;
    }
    if (optname.equals("-cmdbg")) {
      c.setCmdBgColor(new Color(WidgetInfo.toColor(optval)));
      return;
    }
    if (optname.equals("-cmdfg")) {
      c.setCmdFgColor(new Color(WidgetInfo.toColor(optval)));
      return;
    }
    if (optname.equals("-eventhandler")) {
      EventHandler h = null;
      if (optval.toString().length() > 0) h = new WidgetListener(ip, optval, c);
      c.setEventHandler(h);
      return;
    }
    super.cset(ip, target, optname, optval);
  }