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

Examples of de.yaams.maker.helper.gui.form.core.FormBuilder


    if (file == null || image == null) {
      return;
    }

    // build form
    final FormBuilder f = new FormBuilder("preview.graphic");
    f.addHeader("basic", new FormHeader("", null));
    f.addElement("basic.path", new FormTextField(I18N.t("Pfad"), file.getAbsolutePath()));
    f.addElement(
        "basic.size",
        new FormTextField(I18N.t("Größe"), I18N.t("{0}x{1}x{2}", image.getWidth(), image.getHeight(), image.getImage()
            .getAccelerationPriority())));

    YDialog.showForm(file.getName(), "graphic_info", f);
View Full Code Here


    }
    oldCode = e;

    try {
      // build panel
      FormBuilder f = new FormBuilder("event.code.list." + e.getCommand().getIcon());
      f.addHeader("basic", new FormHeader(I18N.t("Basic"), e.getCommand().getIcon()));

      // build it
      getSelectedObject().buildPanel(f);
      // add modifikation
      f.addChangeListener(new FormElementChangeListener() {

        @Override
        public void stateChanged(FormElement form) {
          e.setModified(true);
          e.setTitleCache(null);

        }
      });

      if (getSelectedObject().getCommand().isBeta() || YLevel.IS_DEVELOPER) {
        f.addHeader("warn", new FormHeader(I18N.t("Hinweis für die Benutzung"), "info").setSorting(8));
        if (getSelectedObject().getCommand().isBeta()) {
          f.addElement(
              "warn.info",
              new FormInfo("", I18N.t("Die Unterstützung von {0} ist noch experimentell. Es kann zu Problemen kommen.", e.getCommand().getName())));
        }
        if (YLevel.IS_DEVELOPER) {
          f.addElement("warn.code", RubyForm.getError(I18N.t("Code"), "@code", e.getObject()));
          f.addElement("warn.id", new FormInfo(I18N.t("ID"), e.getId()));
          f.addElement("warn.para", RubyForm.getError(I18N.t("Parameter"), "@parameters", e.getObject()));
          f.addElement("warn.indent", RubyForm.getError(I18N.t("Indent"), "@indent", e.getObject()));
        }
      }

      // display right the infos
      gui.setRight(f.getPanel(true));
    } catch (Throwable t) {
      YEx.info("Can not create Panel", t);
    }

  }
View Full Code Here

    // is something selected?
    if (getSelectedObject() == null) {
      return;
    }

    FormBuilder f = new FormBuilder("ressX.leftpanel");
    f.setCenter(preview);
    preview.setFile(getSelectedObject().getAbsolutePath());

    // add data?
    if (data != null) {

      String key = getSelectedFile().getName();

      addFormData(f, key, I18N.t("Autor"), "author");
      addFormData(f, key, I18N.t("Quelle"), "source");
      addFormData(f, key, I18N.t("Notizen"), "note");

      f.addButton("save", YFactory.b(I18N.t("Speichern"), "disk", new AE() {

        @Override
        public void run() {
          // save it
          FileHelper.saveXML(dataPath, data);

          // remove all modi
          for (RessInfoFile r : ary) {
            if (r.getData().containsKey("isModified"))
              r.getData().remove("isModified");
          }
        }
      }));
    }

    left.add(f.getPanel(true));
    left.invalidate();
    left.revalidate();
  }
View Full Code Here

   *
   * @see de.yaams.packandgo.programm.project.export.ExportAction#getPanel()
   */
  @Override
  public JComponent getPanel() {
    FormBuilder f = getMainPanel();

    f.addHeader("mac", new FormHeader(I18N.t("Mac spezifisch"), "mac"));
    // add path
    f.addElement("mac.name", YSettingHelper.text(project, I18N.t("App-Name"), "export." + icon + ".appname", project.getTitle()));

    return f.getPanel(true);
  }
View Full Code Here

   * Build main export panel
   *
   * @return
   */
  protected FormBuilder getMainPanel() {
    FormBuilder f = new FormBuilder("export." + getIcon());
    f.addHeader("basic", new FormHeader(I18N.t("Generelle Exportoptionen"), "export"));

    // add path
    f.addElement("basic.path", new FormFileSelectField(I18N.t("Pfad"), path, JFileChooser.SAVE_DIALOG, false, true)
        .addChangeListener(new FormElementChangeListener() {

          @Override
          public void stateChanged(FormElement form) {
            path = new File(form.getContentAsString());
            ProjectSett.set(project, "export." + icon + ".path", form.getContentAsString());

          }
        }));

    // add net version
    f.addElement(
        "basic.net",
        YSettingHelper.bool(project,
            I18N.t("Use optimated version. (Game is smaller, but need for the first run internet access.)"), "export." + icon
                + ".netversion", true));

    // add button
    f.addButton("export", YFactory.b(I18N.t("Start Export"), icon + "_arrow", new AE() {

      @Override
      public void run() {
        exportThread = new Thread(new Run() {

View Full Code Here

   *
   * @see de.yaams.packandgo.programm.project.export.ExportAction#getPanel()
   */
  @Override
  public JComponent getPanel() {
    FormBuilder f = getMainPanel();
    return f.getPanel(true);
  }
View Full Code Here

   *
   * @see de.yaams.packandgo.programm.project.export.ExportAction#getPanel()
   */
  @Override
  public JComponent getPanel() {
    FormBuilder f = new FormBuilder("export.xbox");
    f.addButton("xbox", YFactory.b(I18N.t("Please use GeeX"), "info", new AE() {

      @Override
      public void run() {
        SystemHelper.openUrl("http://www.geexpowered.com/");
      }
    }));

    return f.getPanel(true);
  }
View Full Code Here

   *
   * @see de.yaams.packandgo.programm.project.export.ExportAction#getPanel()
   */
  @Override
  public JComponent getPanel() {
    FormBuilder f = getMainPanel();
    return f.getPanel(true);
  }
View Full Code Here

      if (id > 0) {
        // build panel
        gContent.removeAll();

        // build it
        FormBuilder form = new FormBuilder("db." + getIcon());
        buildForm(form, id);

        // add modi
        form.addChangeListener(new FormElementChangeListener() {

          @Override
          public void stateChanged(FormElement form) {
            // set modifizied
            elements.get(id).setModified(true);
            setModified(true);

          }
        });

        // build it
        gContent.add(form.getPanel(true));
        gContent.invalidate();
        gContent.revalidate();
      } else {
        buildEmptyView();
      }
View Full Code Here

TOP

Related Classes of de.yaams.maker.helper.gui.form.core.FormBuilder

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.