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

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


  public FormBuilder getMoreInfo() {
    FormBuilder b = new FormBuilder("plugin.moreinfo");
    b.addElement("basic.name", new FormInfo(I18N.t("Info"), getDesc()).setSorting(-1));
    b.addElement("basic.author", new FormInfo(I18N.t("Autor"), getElement("author", "unknown")));
    if (YLevel.IS_ADVANCED) {
      b.addElement("basic.folder", new FormTextField(I18N.t("Path"), path.getAbsolutePath()));
    }
    b.addElement("basic.status", new FormSwing(I18N.t("Status"), status));
    b.addElement("basic.hp", new FormTextField(I18N.t("Homepage"), getElement("homepage", "-")));
    b.addElement("basic.version", new FormInfo(I18N.t("Inst. Version"), getElement("version", "0")));
    b.addElement("basic.versiono", new FormInfo(I18N.t("Online Version"), getOnlineElement("version", "0")));
    return b;
  }
View Full Code Here


   * @param id
   * @param standard
   * @return
   */
  public static FormTextField text(final Project p, String title, final String id, String standard) {
    return (FormTextField) new FormTextField(title, p == null ? Setting.get(id, standard) : ProjectSett.get(p, id, standard))
        .addChangeListener(new FormElementChangeListener() {

          @Override
          public void stateChanged(FormElement form) {
            if (p == null) {
View Full Code Here

      f.addElement("basic.details", new FormTextArea(I18N.t("Ablauf"), "").setInfoTxt(I18N
          .t("Schreibe hier rein, was passiert ist, was du getan hast, wie es zu dem Fehler gekommen ist.")));

      // add details
      f.addHeader("error", new FormHeader(I18N.t("Details"), icon).setCollapsed(true));
      f.addElement("error.class", new FormTextField(I18N.t("Class"), t.getClass().toString()));
      f.addElement("error.mess", new FormTextField(I18N.t("Message"), YEx.toString(title, t, false)));
      f.addElement("error.stack", new FormTextArea(I18N.t("Stack"), Strings.stackStraceAsString(t)));

      task.setInstruction(I18N.t("{0}bericht einsenden", typ));
      task.setText(mess + (YLevel.IS_ADVANCED ? "<br>" + YEx.toString(title, t, false) : ""));
      task.setIcon(IconCache.get(icon, 64));
View Full Code Here

        // build form
        FormBuilder f = new FormBuilder("net.string");
        f.addElement("basic.help", new FormInfo("", I18N.t("Im 1. Feld steht der Link zur Seite. Den Link kopieren und mit einem "
            + "geeigneten Programm/Pc öffnen, danach im 2. Feld den Inhalt der  " + "Seite einfügen und Ok drücken"))
            .setSorting(-1));
        f.addElement("basic.source", new FormTextField("", link));
        f.addElement("basic.dest", new FormTextArea("", "").addValidator(new ValidatorNotEmpty()).setSorting(1));

        if (YDialog.showForm(I18N.t("Seite manuell anzeigen"), "open_web", f)) {
          return f.getElement("basic.dest").getContentAsString();
        }
        return null;
      } else {
        // build form
        FormBuilder f = new FormBuilder("net.download");
        f.addElement("basic.help",
            new FormInfo("", I18N.t("Im 1. Feld steht der Link zur Datei. Den Link kopieren und mit einem "
                + "geeigneten Programm/Pc runterladen, danach im 2. Feld die runtergeladene "
                + "Datei auswählen und Ok drücken")).setSorting(-1));
        f.addElement("basic.source", new FormTextField("", link));
        f.addElement("basic.dest", new FormFileSelectField("", null, JFileChooser.OPEN_DIALOG, false, false).setSorting(1));

        if (YDialog.showForm(I18N.t("Datei manuell runterladen"), "open_web", f)) {
          return new File(f.getElement("basic.dest").getContentAsString());
        }
View Full Code Here

   * @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

    // create Form
    final FormBuilder f = new FormBuilder("project");
    f.addElement("basic.folder", new FormFileSelectField(I18N.t("Ordner"), p == null ? null : p.getPath(), JFileChooser.OPEN_DIALOG, true, true))
        .addValidator(new ValidatorUmlaut());
    f.addElement("basic.name", new FormTextField(I18N.t("Name"), p == null ? "Project" : p.getTitle()));
    f.addElement("basic.icon", new FormIcon(I18N.t("Icon"), p == null ? IconCache.games[0] : p.getIcon(), IconCache.games));

    // build list for types
    String[] key = ProjectManagement.types.keySet().toArray(new String[ProjectManagement.types.size()]);
    String[] title = new String[key.length];
    for (int i = 0, l = key.length; i < l; i++) {
      title[i] = ProjectManagement.getType(key[i]).getTitle();
    }

    f.addElement("basic.type", new FormComboBox(I18N.t("Typ"), key, title).selectField(p == null ? null : p.getType().getType()));

    // add crypto
    if (YLevel.IS_ADVANCED) {
      f.addHeader("sec", new FormHeader(I18N.t("Sicherheit"), "lock").setCollapsed(true));

      // load infos
      final boolean cryp = p != null && p.getCache() != null && p.getCache().containsKey("projecttype");

      // add info
      if (p == null) {
        f.addElement("sec.info", new FormInfo("", I18N.t("Das Projekt kann erst verschlüsselt werden, wenn es erstellt wurde.")).setIcon("warn", 16));
      }

      // set it
      f.addElement(
          "sec.sec",
          new FormCheckbox(I18N.t("Projekt verschlüsseln"), cryp)
              .setInfoTxt(
                  "<html><strong>Vorgehen</strong><br>"
                      + "Wenn die Verschlüssungsfunktion aktiviert wurde, muss im nächsten Dialog der Name und das Password gewählt werden.<br>"
                      + "Wenn die Funktion deaktiviert wird, muss der Name und das Password eingegeben werden, wenn Sie noch nicht eingegeben wurden.<br>"
                      + "<br><strong>Hinweise</strong<br>"
                      + "Wenn das Projekt einmal entschlüsselt wurde, wird es erst wieder beim Beenden von YAams verschlüsselt. <br>"
                      + "Solange sind die Daten für jeden frei einsehbar. Die Verschlüsselung ist nur so gut, wie das Password & der Nutername sind.",
                  "help").setEnabled(p != null).addValidator(new ValidatorBase() {

                @Override
                public void isValide(YMessagesDialog y) {
                  boolean ncryp = Boolean.valueOf(form.getContentAsString());

                  // difference?
                  if (!y.hasErrors() && ncryp != cryp) {
                    // crypto it
                    if (ncryp) {

                      // ask for data
                      FormBuilder formb = new FormBuilder("project.sec");
                      formb.addElement("basic.name", new FormTextField(I18N.t("Name"), SystemUtils.USER_NAME));
                      formb.addElement("basic.pw", new FormTextField(I18N.t("Password"), p.getTitle()));

                      YDialog.showForm(I18N.t("Name & Password"), p.getIcon() + "_lock", formb);

                      // setit
                      p.getCache().put("projecttype", f.getElement("sec.typ").getContentAsString());
View Full Code Here

    f.addHeader("basic", new FormHeader(I18N.t("Basics"), "info").setColumn(4));

    f.addElement("basic.yaams", new FormInfo("", YAamsCore.TITLE));

    if (YLevel.IS_ADVANCED) {
      f.addElement("basic.path", new FormTextField(I18N.t("Optionen"), YAamsCore.programPath.getAbsolutePath()));
      f.addElement("basic.temp", new FormTextField(I18N.t("Temp"), YAamsCore.tmpFolder.getAbsolutePath()));
      f.addElement("basic.system", new FormInfo(I18N.t("System"), SystemUtils.OS_NAME + " " + SystemUtils.OS_VERSION + " "
          + SystemUtils.OS_ARCH));
      f.addElement("basic.log", new FormInfo(I18N.t("Log level"), Log.ger.getLevel().toString()));
      f.addElement("basic.ylevel", new FormInfo(I18N.t("Program level"), YLevel.getName(YLevel.TYP)));
      f.addElement("basic.java", new FormInfo(I18N.t("Java"), SystemUtils.JAVA_RUNTIME_NAME + " " + SystemUtils.JAVA_VENDOR + " "
View Full Code Here

   * @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

   * @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

   * @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

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

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.