Package com.jgoodies.forms.builder

Examples of com.jgoodies.forms.builder.DefaultFormBuilder


    public JPanel buildMainPanel() {
        FormLayout layout = new FormLayout
            ("right:pref, 4dlu, fill:pref, 8dlu, right:pref, 4dlu, fill:pref", // 4dlu, left:pref, 4dlu",
             "");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);

        builder.appendSeparator(Globals.lang("Field sizes"));

        // We use this list to build an alphabetical list of field names:
        TreeSet<String> fields = new TreeSet<String>();
        // We use this map to remember which slider represents which field name:
        sliders.clear();
        for (int i=0, len=BibtexFields.numberOfPublicFields(); i<len; i++)
        {
            fields.add(BibtexFields.getFieldName(i));
        }
        fields.remove("bibtexkey"); // bibtex key doesn't need weight.
        // Here is the place to add other fields:

        // --------------

        for (Iterator<String> i=fields.iterator(); i.hasNext();) {
            String field = i.next();
            builder.append(field);
            int weight = (int)(100*BibtexFields.getFieldWeight(field)/GUIGlobals.MAX_FIELD_WEIGHT) ;
            //System.out.println(weight);
            JSlider slider = new JSlider(0, 100, weight);//,);
            sliders.put(slider, new SliderInfo(field, weight));
            builder.append(slider);
        }
        builder.appendSeparator();

        return builder.getPanel();

    }
View Full Code Here


    public void storeSettings() {
        Globals.prefs.put("citeCommandEmacs", citeCommand.getText());
    }

    private void initSettingsPanel() {
        DefaultFormBuilder builder = new DefaultFormBuilder(
                new FormLayout("left:pref, 4dlu, fill:pref", ""));
        builder.append(Globals.lang("Cite command") + ":");
        builder.append(citeCommand);
        settings = builder.getPanel();
    }
View Full Code Here

    }

    private void layoutComponents() {
        final FormLayout layout = new FormLayout(
                "right:min, 2dlu, fill:pref:grow");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout,
                                                            RES.getBundle(),
                                                            this);
        builder.setComponentFactory(CustomFormsComponentFactory.getInstance());

        builder.appendSeparator(RES.get("site.deployment.title"));
        builder.append(RES.get("site.address"), siteAddressField);
        builder.append(RES.get("site.directory"), siteDirectoryField);

        builder.appendSeparator(RES.get("dist.deployment.title"));
        builder.append(RES.get("dist.address"), distributionAddressField);
        builder.append(RES.get("dist.directory"), distributionDirectoryField);
    }
View Full Code Here

     *
     * @return panel
     */
    protected JPanel createDirectoriesPanel() {
        final FormLayout layout = new FormLayout("right:min, 2dlu, fill:pref:grow");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        builder.setComponentFactory(CustomFormsComponentFactory.getInstance());

        //
        //repository
        //
        builder.appendSeparator(RES.get("src.dirs.title"));
        builder.append(RES.get("java.src.dir"), sourceDirField);
        builder.append(RES.get("aspect.src.dir"), aspectSourceDirField);
        builder.appendSeparator(RES.get("conf.dirs.title"));
        return builder.getPanel();
    }
View Full Code Here

    private void layoutComponents() {
        final String cols = "fill:min:grow";
        final String rows = "top:min, top:min, top:min, fill:min:grow";
        final FormLayout layout = new FormLayout(cols, rows);
        DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
        builder.setComponentFactory(CustomFormsComponentFactory.getInstance());

        UIUtils.installBorder(dirsPanel);

        builder.appendSeparator(RES.get("test.dirs.title"));
        builder.append(dirsPanel);
        builder.appendSeparator(RES.get("test.patterns.title"));
        builder.append(resources);
    }
View Full Code Here

     *
     * @return panel
     */
    protected JPanel createDirectoriesPanel() {
        final FormLayout layout = new FormLayout("right:min, 2dlu, fill:pref:grow");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        builder.setComponentFactory(CustomFormsComponentFactory.getInstance());

        builder.append(RES.get("test.src.dir"), testsSourceDirField);
        return builder.getPanel();
    }
View Full Code Here

        Bindings.bind(browseUrl, model.getValueModel("url"));
    }

    private JPanel createRepositoryPanel() {
        final FormLayout layout = new FormLayout("right:min, 2dlu, fill:pref:grow");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        builder.setComponentFactory(CustomFormsComponentFactory.getInstance());

        //
        //repository
        //
        builder.appendSeparator(RES.get("repository.title"));
        builder.append(RES.get("scm.anonymous.connection"), anonymousConnection);
        builder.append(RES.get("scm.developer.connection"), developerConnection);
        builder.append(RES.get("scm.browse.url"), browseUrl);
        builder.appendSeparator(RES.get("versions.title"));
        return builder.getPanel();
    }
View Full Code Here

            });

            //layout components
            final String cols = "right:min, 2dlu, fill:min:grow, 2dlu, fill:min";
            final FormLayout layout = new FormLayout(cols);
            final DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
            builder.setComponentFactory(CustomFormsComponentFactory.getInstance());
            builder.append(RES.get("maven.home.label"), mavenHomeField, guessMavenHomeButton);
            builder.append(RES.get("maven.options.label"), mavenOptionsField, 3);
            builder.append(" ", offlineCheckBox, 3);
        }
View Full Code Here

    initComponents(window);
    initComponentAnnotations();
    initEventHandling();
    FormLayout layout = new FormLayout(
        "10dlu,p,p,100dlu,3dlu,p,p,20dlu,10dlu", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.setLeadingColumnOffset(1);
    builder.appendRow(new RowSpec("top:10dlu"));
    builder.nextLine();
   
    String metric = article.getMetric();
    if(metric!=null){
      metric="("+metric+")";
    }else{
      metric="";
    }

    if (article != null) {
      builder.append(articleName + " - antall:"+metric, textFieldNumberOf);
      if (showOrder) {
        builder.append("Rekkef�lge:", textFieldOrder);
      }
      builder.nextLine();
    }
    if (textFields != null) {
      Set<String> labels = textFields.keySet();
      for (String label : labels) {
        builder.append(label, textFields.get(label));
        if (showOrder) {
          builder.append("Rekkef�lge:", textFieldDialogOrders
              .get(label));
        }
        builder.nextLine();
      }
      labels = checkBoxes.keySet();

      for (String label : labels) {
        builder.append(label, checkBoxes.get(label));
        if (showOrder) {
          builder.append("Rekkef�lge:", textFieldDialogOrders
              .get(label));
        }
        builder.nextLine();
      }

      labels = comboBoxes.keySet();

      for (String label : labels) {
        builder.append(label, comboBoxes.get(label));
        if (showOrder) {
          builder.append("Rekkef�lge:", textFieldDialogOrders
              .get(label));
        }
        builder.nextLine();
      }
    }

    builder.append(ButtonBarFactory.buildCenteredBar(buttonOk), 8);
    builder.appendRow(new RowSpec("top:5dlu"));

    return new IconFeedbackPanel(validationResultModel, builder.getPanel());
  }
View Full Code Here

   */
  public JComponent buildPanel(WindowInterface window, int rowSize) {
    initComponents(window);

    FormLayout layout = new FormLayout("150dlu", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    // DefaultFormBuilder builder = new DefaultFormBuilder(new
    // FormDebugPanel(),layout);

    int rowCount = tableOrders.getRowCount();
    if (rowCount == 0) {
      rowCount = 1;
    }
    int tableSize = rowSize;
    String rowSizeSpec = "fill:" + tableSize + "dlu:grow";
    builder.appendRow(new RowSpec(rowSizeSpec));
    builder.append(new JScrollPane(tableOrders));
    return builder.getPanel();
  }
View Full Code Here

TOP

Related Classes of com.jgoodies.forms.builder.DefaultFormBuilder

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.