Package de.yaams.maker.helper.gui.form

Examples of de.yaams.maker.helper.gui.form.FormEmpty


  public void buildPanel(FormBuilder f, EventCode e) {

    f.getHeader("basic").setColumn(4);
    // add time
    CommandFormHelper.addFrameSupport(f, e, 1).setSorting(-2);
    f.addElement("basic.dummy", new FormEmpty().setSorting(-1));

    RubyForm.addColor(f, "basic.color", e.getParameters().get(0));

  }
View Full Code Here


    c.selectField(RubyHelper.toInt(e.getParameters().get(0)) == RubyHelper.toInt(e.getParameters().get(1)) ? "0" : "1");

    f.getHeader("basic").setColumn(4);

    f.addElement("basic.type", c.setSorting(-1));
    f.addElement("basic.type2", new FormEmpty().setSorting(-1));

    // add switch
    f.addElement("basic.v1", new FormSwitchVarSelector(e.getYecl().getProject(), I18N.t("Setze"), e.getParameters(), 0, Type.VARIABLE)
        .addChangeListener(new FormElementChangeListener() {

          @Override
          public void stateChanged(FormElement form) {
            if (c.getContentAsString().equals("0")) {
              RubyHelper.setNum(e.getParameters(), 1, c.getContentAsString());
            }
          }
        }));

    // add 2. switch
    f.addElement("basic.v2", FormHelper.setEnabeldWhenRightElementSelect(c,
        new FormSwitchVarSelector(e.getYecl().getProject(), I18N.t("bis"), e.getParameters(), 1, Type.VARIABLE), "1"));

    c.addChangeListener(new FormElementChangeListener() {

      @Override
      public void stateChanged(FormElement form) {
        if (c.getContentAsString().equals("0")) {
          RubyHelper.setNum(e.getParameters(), 1, RubyHelper.toInt(e.getParameters().get(0)));
        }

      }
    });

    // add operator
    f.addElement("basic.operator", RubyForm.getComboBoxNum(I18N.t("Operator"), JavaHelper.numAry(5), oTit, e.getParameters(), 2).setSorting(1));

    // add values

    f.addHeader("value", new FormHeader("Value", "variable").setColumn(4));

    // selector
    FormComboBox fcb = RubyForm.getComboBoxNum(I18N.t("Typ"), JavaHelper.numAry(7),
        new String[] { "Value", "Variable", "Random", RGSS1Helper.getName(Type.ITEM), "Actor", "Enemy", "Spirit", "Other" }, e.getParameters(), 3);
    f.addElement("value.atyp", fcb);
    f.addElement("value.atyp1", new FormEmpty());

    // value
    f.addElement("value.bvalue", FormHelper.setEnabeldWhenRightElementSelect(fcb, RubyForm.getNumber(I18N.t("Wert"), e.getParameters(), 4), "0"));

    // variable
    f.addElement("value.bvar", FormHelper.setEnabeldWhenRightElementSelect(fcb,
        new FormSwitchVarSelector(e.getYecl().getProject(), I18N.t("Variable"), e.getParameters(), 4, Type.VARIABLE), "1"));

    // random
    f.addElement("value.crand", FormHelper.setEnabeldWhenRightElementSelect(fcb, RubyForm.getNumber(I18N.t("Random"), e.getParameters(), 4), "2"));
    f.addElement("value.crand2", FormHelper.setEnabeldWhenRightElementSelect(fcb, RubyForm.getNumber(I18N.t("-"), e.getParameters(), 5), "2"));

    // item
    f.addElement("value.ditem", FormHelper.setEnabeldWhenRightElementSelect(fcb, new FormDBComboBox(RGSS1Helper.getName(Type.ITEM), e.getYecl()
        .getProject(), Type.ITEM, e.getParameters(), 4, false).setInfoTxt(I18N.t("Anzahl des Gegenstandes im Inventar der Party")), "3"));
    f.addElement("value.ditem2", new FormEmpty());

    // actor
    f.addElement("value.eactor", FormHelper.setEnabeldWhenRightElementSelect(fcb, new FormDBComboBox(I18N.t("Actor"), e.getYecl().getProject(), Type.ACTOR,
        e.getParameters(), 4, false), "4"));
    f.addElement("value.eactor2",
View Full Code Here

        new FormDBComboBox(RGSS1Helper.getName(Type.ACTOR), e.getYecl().getProject(), Type.ACTOR, e.getParameters(), 0, false));

    // add typ
    f.addElement("basic.add",
        RubyForm.getComboBoxNum("", new String[] { "0", "1" }, new String[] { "Füge hinzu", "Entferne" }, e.getParameters(), 1));
    f.addElement("basic.add2", new FormEmpty());

    // add typ
    f.addElement(
        "basic.typ",
        RubyForm.getBooleanAsInt(I18N.t("Im Startstatus (Init)"), e.getParameters(), 2)
View Full Code Here

    // add actor
    c = RubyForm.getBoolean(RGSS1Helper.getName(Type.SWITCH), condition, "@switch_valid");
    form.addElement("cond.switch_a", c);
    form.addElement("cond.switch_id", FormHelper.setEnabeldWhenRightElementSelect(c, new FormSwitchVarSelector(project,
        I18N.t("Is on"), condition, "@switch_id", Type.SWITCH), "true"));
    form.addElement("cond.switch_id2", new FormEmpty());
    c.informListeners();

    // add code
    form.setCenter(new YEventCommandList(page.getInstanceVariable("@list"), project, null));
  }
View Full Code Here

        "@switch1_id", Type.SWITCH), "true"));
    v.informListeners();

    // add switch 2
    v = RubyForm.getBoolean("Switch 2", cond, "@switch2_valid");
    form.addElement("cond.s2", new FormEmpty());
    form.addElement("cond.s23", new FormEmpty());
    form.addElement("cond.s24", v);
    form.addElement("cond.s25", FormHelper.setEnabeldWhenRightElementSelect(v, new FormSwitchVarSelector(project, "", cond,
        "@switch2_id", Type.SWITCH), "true"));
    v.informListeners();

    // add variable
    v = RubyForm.getBoolean("Variable", cond, "@variable_valid");
    form.addElement("cond.v3", v);
    form.addElement("cond.v4", FormHelper.setEnabeldWhenRightElementSelect(v, new FormSwitchVarSelector(project, "", cond,
        "@variable_id", Type.VARIABLE), "true"));
    form.addElement("cond.v5",
        FormHelper.setEnabeldWhenRightElementSelect(v, RubyForm.getNumber(">=", cond, "@variable_value"), "true"));
    v.informListeners();

    // graphic
    RubyObject graph = (RubyObject) page.getInstanceVariable("@graphic");

    form.addHeader("graphic", new FormHeader(I18N.t("Graphic"), "graphic").setColumn(4).setCollapsed(true));

    // add select
    FormComboBox gS = new FormComboBox(I18N.t("Typ"), new String[] { "1", "0" }, new String[] { "Tile", "Character" });
    gS.selectField(RubyHelper.toInt(graph.getInstanceVariable("@tile_id")) == 0 ? "1" : "0");
    form.addElement("graphic.typ", gS.setSorting(-2));

    // add tile
    form.addElement("graphic.tile",
        FormHelper.setEnabeldWhenRightElementSelect(gS, RubyForm.getNumber(I18N.t("Tile"), graph, "@tile_id").setSorting(-1), "1"));

    // add char
    form.addElement("graphic.char", FormHelper.setEnabeldWhenRightElementSelect(gS, new FormGraphEle(I18N.t("Char"), project,
        RTP.CHARACTER, graph, "@character_name", "@character_hue"), "0"));
    form.addElement("graphic.char2", new FormEmpty());
    form.addElement("graphic.charpatt", FormHelper.setEnabeldWhenRightElementSelect(gS,
        RubyForm.getNumber(I18N.t("Pattern"), graph, "@pattern").setMinMax(0, 3, 1), "0"));
    form.addElement(
        "graphic.chardir",
        FormHelper.setEnabeldWhenRightElementSelect(
View Full Code Here

      // add elements
      if (e > i) {
        form.addElement("ele." + i + "ele", new FormTable(RGSS1Helper.get(getProject(), Type.ELEMENT).get(i).getName(), eTable, i,
            0));
      } else {
        form.addElement("ele." + i + "ele", new FormEmpty());
      }

      // add status
      if (s > i) {
        form.addElement("ele." + i + "stat", new FormTable(RGSS1Helper.get(getProject(), Type.STATUS).get(i).getName(), sTable, i,
            0));
      } else {
        form.addElement("ele." + i + "stat", new FormEmpty());
      }
    }

  }
View Full Code Here

      // add elements
      if (e > i) {
        form.addElement("ele." + i + "ele", new FormTable(RGSS1Helper.get(getProject(), Type.ELEMENT).get(i).getName(), eTable, i,
            0).setMinMax(0, 6, 1));
      } else {
        form.addElement("ele." + i + "ele", new FormEmpty());
      }

      // add status
      if (s > i) {
        form.addElement("ele." + i + "stat", new FormTable(RGSS1Helper.get(getProject(), Type.STATUS).get(i).getName(), sTable, i,
            0).setMinMax(0, 6, 1));
      } else {
        form.addElement("ele." + i + "stat", new FormEmpty());
      }
    }

    // build panel
    form.setCenter(new EnemyActionPanel(project, act.getInstanceVariable("@actions")));
View Full Code Here

            RubyForm.getComboBoxNum(I18N.t("is"), JavaHelper.numAry(6), new String[] { "==", ">=", "<=", ">", "<", "!=" }, e.getParameters(), 4),
            "1").setSorting(1));
    FormComboBox v = RubyForm.getComboBoxNum(I18N.t("as"), JavaHelper.numAry(2), new String[] { RGSS1Helper.getName(Type.VARIABLE), "Wert" },
        e.getParameters(), 2);
    f.addElement("variable.value", FormHelper.setEnabeldWhenRightElementSelect(c, v, "1").setSorting(2));
    f.addElement("variable.empty", new FormEmpty().setSorting(3));
    f.addElement(
        "variable.varvalue",
        FormHelper.addEnableLister(
            new FormSwitchVarSelector(e.getYecl().getProject(), RGSS1Helper.getName(Type.VARIABLE), e.getParameters(), 3, Type.VARIABLE), v, "0",
            c, "1").setSorting(4));
View Full Code Here

TOP

Related Classes of de.yaams.maker.helper.gui.form.FormEmpty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.