Package de.yaams.maker.helper.gui

Examples of de.yaams.maker.helper.gui.AE


   *
   * @param infoTxt
   *            the infoTxt to set
   */
  public FormElement setInfoTxt(final String infoTxt, final String icon) {
    this.infoTxt = YFactory.tb(infoTxt, icon, new AE() {

      @Override
      public void run() {
        YDialog.ok(header.getText(), infoTxt, null);
      }
View Full Code Here


      }

      // add save button?
      if (!withAutoSaveFunction && showSaveButton) {
        b.addUnrelatedGap();
        b.addButton(YFactory.b(T.r("form.save"), "disk", new AE() {

          @Override
          public void run() {

            // save all
View Full Code Here

   * @return the element
   */
  @Override
  public JComponent getElement(final boolean withSaveFunction) {
    if (withSaveFunction) {
      box.addActionListener(new AE() {

        @Override
        public void run() {
          // save it
          informListeners();
View Full Code Here

    this.title = title;
    id = icon;

    if (add) {
      // build toolbar
      toolbar.add(YFactory.tb(I18N.t("Create {0}", title), icon == null ? "add" : icon + "_add", new AE() {

        @Override
        public void run() {
          add();
        }
      }, size));
    }

    if (open) {
      // build toolbar
      toolbar.add(YFactory.tb(I18N.t("Open/Import {0}", title), size == 16 ? "folder" : icon + "_folder", new AE() {

        @Override
        public void run() {
          open();
        }
      }, size));
    }

    if (delete) {
      // build toolbar
      toolbar.add(YFactory.tb(I18N.t("Remove selected element"), icon == null ? "del" : icon + "_del", new AE() {

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

        }
      }, size));
    }

    if ((add || open || delete) && (info || config)) {
      toolbar.addSeparator();
    }

    if (info) {
      // build toolbar
      toolbar.add(YFactory.tb(I18N.t("Show more information about {0}.", title), "info", new AE() {

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

        }
      }, size));
    }

    if (config) {
      // build toolbar
      toolbar.add(YFactory.tb(I18N.t("Config {0}", title), "opts", new AE() {

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

        }
      }, size));
    }

    if (swap) {
      // build toolbar
      toolbar.addRight(YFactory.tb(I18N.t("Meve up", title), "up", new AE() {

        @Override
        public void run() {

          if (!canEdit()) {
            return;
          }
          if (list.getSelectedIndex() == 0) {
            swap(list.getSelectedIndex(), list.getModel().getSize() - 1);
          } else {
            swap(list.getSelectedIndex(), list.getSelectedIndex() - 1);
          }

        }
      }, size));
      // build toolbar
      toolbar.addRight(YFactory.tb(I18N.t("Move down", title), "down", new AE() {

        @Override
        public void run() {

          if (!canEdit()) {
View Full Code Here

  @Override
  protected JComponent getInternElement() {
    final JPanel p = new JPanel(new BorderLayout());
    p.add(super.getInternElement(), BorderLayout.CENTER);
    // add config button
    p.add(YFactory.tb(I18N.t("Öffne das ausgewählte Element im neuen Tab zum Konfigurieren."), "opts", new AE() {

      @Override
      public void run() {
        // open tab
        if (box.getSelectedIndex() == 0 && startFix == 0) {
View Full Code Here

   * @param icon
   * @param tabID
   */
  public void addElement(String title, String icon, final String tabID, boolean isSelected) {
    // build it
    BcbElement bcb = new BcbElement(title, icon, new AE() {

      @Override
      public void run() {
        // close tab

View Full Code Here

    main.add(new JSeparator(), BorderLayout.SOUTH);
    add(main, BorderLayout.CENTER);

    // build buttons
    buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 5));
    back = YFactory.b(T.r("wizard.back"), null, new AE() {

      @Override
      public void run() {
        // can switch?
        buildGui(actPage - 1);
      }
    });
    buttons.add(back);

    next = YFactory.b("", null, new AE() {

      @Override
      public void run() {
        buildGui(actPage + 1);
      }
View Full Code Here

    // build it
    buildGui(title, icon, nAry, true, false, true);

    // add help
    list.getToolbar().addRight(YFactory.tb(desc, "help", new AE() {

      @Override
      public void run() {
        YDialog.ok(title, desc, "help_" + icon);
View Full Code Here

   *
   * @param tileset
   * @param index
   */
  public FormTileset(final CTileset tileset, Project project, final int index) {
    super("", null, new AE() {

      @Override
      public void run() {
        // build form
        FormBuilder f = new FormBuilder("diamant.tile.detail");
View Full Code Here

            return;
          }

          // add run button
          if (ProjectSett.get(p, "run_showOnEveryTab", true) && tab.getToolbar() != null) {
            tab.getToolbar().add(YFactory.tb(I18N.t("Start ein Testspiel"), "monitor_opts", new AE() {

              @Override
              public void run() {
                runProject(p);

              }
            }));
          }
        }

      }
    });

    // add options
    // add run settings
    ExtentionManagement.add(ProjectOptionsTab.EXADD, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        ArrayList<BasisListElement> eles = (ArrayList<BasisListElement>) objects.get("list");

        // right project?
        if (!RGSSProjectHelper.is((Project) objects.get("project"), true, true)) {
          return;
        }

        // add it
        eles.add(new SplitActionListElement(I18N.t("Starte Spiel"), "", "monitor_opts") {

          @Override
          protected Component getComponent(final Project p) {

            // add settings
            FormBuilder f = new FormBuilder("testgame");
            f.getHeader("basic").setTitle(I18N.t("Starte Spiel")).setIcon("monitor_opts");
            f.addElement("basic.native",
                YSettingHelper.bool(p, I18N.t("Benutze native Engine, wenn möglich. (Game.exe)"), "run_native", true));

            // 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

TOP

Related Classes of de.yaams.maker.helper.gui.AE

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.