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

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


        }
      }));

      f.addElement("basic." + id + "_detail", new FormSwing("", i.getStatusMessage()));
      f.addElement("basic." + id + "_moreinfo", new FormButton(I18N.t("Details"), i.getImg(), new AE() {

        @Override
        public void run() {
          YDialog.showForm(i.getTitle(), i.getImg(), i.getMoreInfo());
View Full Code Here


    // form
    FormBuilder f = new FormBuilder("project.left");

    // add basics
    f.addHeader("main", new FormHeader(YAamsCore.NAME, "yaams").setSorting(-2));
    f.addElement("main.opts", new FormButton(I18N.t("Options"), "opts", new AE() {

      @Override
      public void run() {
        YaFrame.open(HomeTab.OPTIONS);

      }
    }));
    f.addElement("main.plugins", new FormButton(I18N.t("Plugins"), "plugin", new AE() {

      @Override
      public void run() {
        BasicTabEvent.openPlugin();

      }
    }).setSorting(1));
    f.addElement("main.feedback", new FormButton(I18N.t("Feedback"), "mail_web", new AE() {

      @Override
      public void run() {
        BasicTabEvent.openFeedback();

      }
    }).setSorting(2));

    // has project?
    if (p != null) {

      // main elements
      f.getHeader("basic").setTitle(p.getTitle()).setIcon(p.getIcon()).setCollapsed(true).setSorting(-1);
      f.addElement("basic.type", new FormInfo(I18N.t("Typ"), p.getType().getTitle()));

      // aktions
      f.addHeader("action", new FormHeader(I18N.t("Aktionen"), "mouse"));
      f.addElement("action.tab", new FormButton(I18N.t("Im Tab öffnen"), "tab_arrow", new AE() {

        @Override
        public void run() {
          doubleClick();

        }
      }).setSorting(-2));
      f.addElement("action.edit", new FormButton(I18N.t("Konfigurieren"), "opts", new AE() {

        @Override
        public void run() {
          config();

        }
      }).setSorting(-1));
      f.addElement("action.del", new FormButton(I18N.t("Löschen"), "trash", new AE() {

        @Override
        public void run() {
          del();

        }
      }));

      // add addons
      p.getType().leftForm(f, p);

      // show
      ppanel.setLeft(f.getPanel(true));
    } else {
      f.getHeader("basic").setTitle("Erste Schritte").setIcon("help");
      // aktions
      f.addElement("basic.add", new FormButton(I18N.t("Erstellen"), "project_add", new AE() {

        @Override
        public void run() {
          add();

        }
      }));
      f.addElement("basic.open", new FormButton(I18N.t("Importieren"), "folder", new AE() {

        @Override
        public void run() {
          open();
View Full Code Here

                e.getParameters(), 5).setSorting(1), "201"));

    // add map
    f.addHeader("map", new FormHeader(I18N.t("Spezifisch"), "map"));
    f.addElement("map.map",
        FormHelper.setEnabeldWhenRightElementSelect(d, new FormButton(getPos(e, I18N.t("Neue Position")), "map", new AE() {

          @Override
          public void run() {

            // load
View Full Code Here

      if (!f.containsHeader(c.getGroup())) {
        f.addHeader(c.getGroup(), new FormHeader(c.getGroup(), c.getIcon()).setColumn(8));
      }

      // add it
      f.addElement(c.getGroup() + "." + c.getId(), new FormButton(c.getName(), c.getIcon(), new AE() {

        @Override
        public void run() {
          // add it
          c.createNew(e.getYecl(), e.getIndent());
View Full Code Here

            // add display
            f.addElement("basic.button",
                YSettingHelper.bool(p, I18N.t("Zeige 'Start ein Testspiel' auf jedem Tab."), "run_showOnEveryTab", true));

            // add display
            f.addElement("basic.play", new FormButton(I18N.t("Starte Spiel"), "monitor_opts", new AE() {

              @Override
              public void run() {
                runProject(p);
View Full Code Here

        // add buttons
        for (int i = 0, l = id.length; i < l; i++) {
          boolean e = isRTPinstalled(id[i], rgss[i]) != null;
          final String key = "rtp." + rgss[i] + "_" + id[i];
          final int j = i;
          f.addElement(key, new FormButton(I18N.t(e ? "RTP {0} ist installiert" : "RTP {0} installieren", name[j]), e ? "rtp_ok"
              : "rtp_add", e ? null : new AE() {

            @Override
            public void run() {
              if (RTP.installRTP(id[j], rgss[j])) {
View Full Code Here

            form.addElement("basic.name", ftf);

            // build rtp
            // RTP.

            form.addElement("basic.button", new FormButton(I18N.t("In Game.ini speichern"), "disk", new AE() {

              @Override
              public void run() {
                FileReader f = null;
                try {
                  // load it
                  f = new FileReader(RGSSProjectHelper.getGameIniFile(project));

                  // build game ini
                  Ini ini = new Ini();

                  ini.load();

                  Ini.Section section = ini.get("Game");

                  // add it
                  section.add("Title", ftf.getContentAsString());
                  section.add("RTP1", ftf.getContentAsString());
                  section.add("RTP2", ftf.getContentAsString());
                  section.add("RTP3", ftf.getContentAsString());

                  // save
                  ini.store(RGSSProjectHelper.getGameIniFile(project));

                } catch (Throwable t) {
                  YEx.info("Can not save " + RGSSProjectHelper.getGameIniFile(project), t);
                } finally {
                  if (f != null) {
                    try {
                      f.close();
                    } catch (IOException e) {
                      YEx.info("Can not close " + f, e);
                    }
                  }
                }

              }
            }).setSorting(2));

            // add party
            form.addHeader("party", new FormHeader(I18N.t("Party"), "hero"));
            form.addElement("party.hero", new FormDBList(project, Type.ACTOR, system.getInstanceVariable("@party_members"),
                I18N.t("Wähle die Helden für die Party aus")));
            // add map
            form.addElement(
                "party.pos",
                new FormButton(I18N.t(I18N.t("Start Position {0} - {1}/{2}", RubyHelper.toInt(system, "@start_map_id"),
                    RubyHelper.toInt(system, "@start_x"), RubyHelper.toInt(system, "@start_y"))), "map", new AE() {

                  @Override
                  public void run() {
                    // load
View Full Code Here

    // add overview
    if (events.size() > 0) {
      form.addHeader("overview", new FormHeader(I18N.t("Alle Events"), "events"));
      for (final String key : events.keySet()) {
        // add button
        form.addElement("overview." + key, new FormButton(I18N.t("{0} ({1}x{2})", gEn(key), gEx(key), gEy(key)), "event", new AE() {

          @Override
          public void run() {
            setSelect(gEx(key), gEy(key));
          }
        }));
      }
    }

    // has event?
    if (events.containsKey(key)) {
      final RubyObject event = events.get(key);

      // add elements
      form.addElement("basic.name", RubyForm.getString(I18N.t("Name"), "@name", event));
      form.addElement("basic.id", new FormInfo("ID", event.getInstanceVariable("@id")));
      form.addElement("caction.edit", new FormButton(I18N.t("Editieren"), "edit", new AE() {

        @Override
        public void run() {
          YaFrame.open(EventTab.getId(project, mapID, RubyHelper.toInt(event.getInstanceVariable("@id"))));

        }
      }));
      form.addElement("caction.zdel", new FormButton(I18N.t("Löschen"), "trash", new AE() {

        @Override
        public void run() {
          deleteSelectedEvent();

        }
      }));

    } else {
      form.addElement("caction.add", new FormButton(I18N.t("Neues Event"), "event_add", new AE() {

        @Override
        public void run() {
          createNewEvent();
View Full Code Here

TOP

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

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.