Examples of FormElementChangeListener


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

   * @param fav
   */
  public static void config(final YFavorit fav) {
    // build config
    FormBuilder f = new FormBuilder("fav.config");
    f.addElement("basic.name", new FormTextField(I18N.t("Name"), fav.getTitle()).addChangeListener(new FormElementChangeListener() {

      @Override
      public void stateChanged(FormElement form) {
        fav.setTitle(form.getContentAsString());

      }
    }));
    f.addElement("basic.icon",
        new FormIcon(I18N.t("Icon"), fav.getIcon(), IconCache.games).addChangeListener(new FormElementChangeListener() {

          @Override
          public void stateChanged(FormElement form) {
            fav.setIcon(form.getContentAsString());

          }
        }));
    // is dev?
    if (YLevel.IS_DEVELOPER) {
      f.addElement("basic.tab", new FormTextField(I18N.t("Tab"), fav.getTab()).addChangeListener(new FormElementChangeListener() {

        @Override
        public void stateChanged(FormElement form) {
          fav.setTab(form.getContentAsString());

View Full Code Here

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

    final FormSwitchVarSelector s2 = new FormSwitchVarSelector(e.getYecl().getProject(), I18N.t("bis"), e.getParameters(), 1,
        Type.SWITCH);

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

          @Override
          public void stateChanged(FormElement form) {
            if (c.getContentAsString().equals("0")) {
              // RGSSHelper.setNum(e.getParameters(), 0,
              // c.getContentAsString());
              RubyHelper.setNum(e.getParameters(), 1, form.getContentAsString());
              ((JSpinner) s2.getElement()).setValue(Integer.valueOf(form.getContentAsString()));
            }
          }
        }));

    // add 2. switch
    f.addElement("basic.s2", FormHelper.setEnabeldWhenRightElementSelect(c, s2, "1"));

    c.addChangeListener(new FormElementChangeListener() {

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

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

    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)));
View Full Code Here

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

    // add type
    f.addElement(
        "basic.me",
        CommandFormHelper.buildCodeIdChancer(e, "", new String[] { "242", "246", "247", "248", "251" }, new String[] { getTyp(242),
            getTyp(246), getTyp(247), getTyp(248), getTyp(251) })).setSorting(-1)
        .addChangeListener(new FormElementChangeListener() {

          @Override
          public void stateChanged(FormElement form) {
            f.getElement("basic.frames").setEnabled(
                "246".equals(form.getContentAsString()) || "242".equals(form.getContentAsString()));
View Full Code Here

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

                I18N.t("Programm Level"),
                "gui.level",
                String.valueOf(YLevel.TYP),
                new String[] { "0", "1", "2" },
                new String[] { YLevel.getName(YLevel.BEGINNER), YLevel.getName(YLevel.ADVANCED),
                    YLevel.getName(YLevel.DEVELOPER) }).addChangeListener(new FormElementChangeListener() {

              @Override
              public void stateChanged(FormElement form) {
                YLevel.load(Integer.valueOf(form.getContentAsString()));
View Full Code Here

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

   * @param id
   * @return
   */
  private static FormElement createField(final HashMap<String, String> data, String title, String value, final String id) {
    data.put(id, value);
    return new FormTextField(title, value).addChangeListener(new FormElementChangeListener() {

      @Override
      public void stateChanged(FormElement e) {
        data.put(id, e.getContentAsString());

View Full Code Here

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

    FormComboBox c = RubyForm.getComboBoxNum(I18N.t("Typ"), JavaHelper.numAry(0, 2), typs, e.getParameters(), 0);

    final FormGraphEle g = new FormGraphEle(I18N.t("Panorama"), e.getYecl().getProject(), RTP.PANORAMA, (RubyString) e.getParameters().get(1),
        e.getParameters(), 2);

    f.addElement("basic.typ", c.setSorting(-1).addChangeListener(new FormElementChangeListener() {

      @Override
      public void stateChanged(FormElement form) {
        if (form.getContentAsString().equals("0")) {
          g.setFolder(RTP.PANORAMA);
View Full Code Here

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

    // create panel
    FormBuilder f = new FormBuilder("simple.obj." + uid);
    ((SimpleObjectManagement) bom).buildInternContent(selectedObject, f);

    // add modification
    f.addChangeListener(new FormElementChangeListener() {

      @Override
      public void stateChanged(FormElement form) {
        selectedObject.setModified(true);
        setModified(true);
View Full Code Here

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

   * @param name
   * @param i
   * @return
   */
  public static FormTextField getString(final String name, final IRubyObject irb) {
    return (FormTextField) new FormTextField(name, RubyHelper.toString(irb)).addChangeListener(new FormElementChangeListener() {

      @Override
      public void stateChanged(FormElement form) {
        RubyHelper.setString(irb, form.getContentAsString());
      }
View Full Code Here

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

   * @param name
   * @param i
   * @return
   */
  public static FormTextField getStringFromAry(final String name, final RubyArray ra, final int pos) {
    return (FormTextField) new FormTextField(name, (String) ra.get(pos)).addChangeListener(new FormElementChangeListener() {

      @Override
      public void stateChanged(FormElement form) {
        ra.remove(pos);
        ra.add(pos, form.getContentAsString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.