Package com.jgoodies.forms.builder

Examples of com.jgoodies.forms.builder.DefaultFormBuilder


     * @param window
     * @return panel
     */
    private JComponent buildAttributePanel(final WindowInterface window) {
        FormLayout layout = new FormLayout("10dlu,p:grow,10dlu", "");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        builder.setLeadingColumnOffset(1);
        builder.appendRow(new RowSpec("top:10dlu"));
        builder.nextLine();

        if (components != null) {
            Set<Head> heads = components.keySet();

            for (Head head : heads) {
                builder.append(buildComponentPanel(head));
                builder.nextLine();
            }
        }

        builder.appendRow(new RowSpec("top:5dlu"));
        return builder.getPanel();
    }
View Full Code Here


     * @param label
     * @return panel
     */
    private JPanel buildComponentPanel(final Head head) {
        FormLayout layout = new FormLayout("10dlu,p,3dlu,max(90;p),5dlu,p,3dlu,p,10dlu", "");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        // DefaultFormBuilder builder = new DefaultFormBuilder(layout,new
        // FormDebugPanel());
        builder.setBorder(BorderFactory.createBevelBorder(1));

        Map<String, JComponent> comps;
        Set<String> attLabels;
        builder.setLeadingColumnOffset(1);
        builder.appendRow(new RowSpec("top:5dlu"));
        builder.nextLine();
        JLabel aLabel = new JLabel(head.getNameString());
        builder.append(aLabel, 8);
        builder.nextLine();
        comps = components.get(head);
        if (comps != null) {
            attLabels = comps.keySet();

            for (String attLabel : attLabels) {
                builder.append(attLabel, comps.get(attLabel));
                if (attLabel.equalsIgnoreCase("Antall")) {
                    builder.nextLine();
                }
            }
        }
        builder.appendRow(new RowSpec("top:5dlu"));
        builder.nextLine();

        return builder.getPanel();
    }
View Full Code Here

            weekStop = 53;
            columnLayout = "p,p,p,";
        }

        FormLayout layout = new FormLayout(columnLayout, "");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        YearWeek currentYearWeek = new YearWeek();
        currentYearWeek.setYear(yearWeek.getYear());

        builder.appendRow(new RowSpec("center:3dlu"));
        builder.nextRow();

        int weekCounter = 0;
        List<Supplier> suppliers = viewHandler.getSuppliers(yearWeek,productAreaGroup);
        for (Supplier supplier : suppliers) {
            weekCounter = 0;
            for (int i = weekStart; i <= weekStop; i++) {
                weekCounter++;
                currentYearWeek.setWeek(i);

                builder.appendRow(new RowSpec("fill:p"));
                builder.append(viewHandler.getAssemblyTeamOrderView(supplier,
                        currentYearWeek, weekCounter, starting,productAreaGroup).buildPanel(
                        window, supplierRowSizes.get(supplier)));
            }
        }

        return builder.getPanel();
    }
View Full Code Here

        for (int i = 0; i <= 2; i++) {
            layoutBuffer.append("150dlu,p,");
        }
        layoutBuffer.append("150dlu");
        FormLayout layout = new FormLayout(layoutBuffer.toString(), "");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        int weekStart = yearWeek.getWeek() - 1;
        int weekStop = yearWeek.getWeek() + 1;
        if (weekStart == 0) {
            weekStart = 1;
        }
        if (weekStop == 54) {
            weekStop = 53;
        }
        for (int j = weekStart; j <= weekStop; j++) {
            builder.append("Uke " + j);
        }
        return builder.getPanel();
    }
View Full Code Here

        return builder.getPanel();
    }

    private JPanel buildAssemblyTeamPanel(final boolean starting, final YearWeek yearWeek1) {
        FormLayout layout = new FormLayout("80dlu", "");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        int counter = 0;

        List<Supplier> suppliers = viewHandler.getSuppliers(yearWeek1,productAreaGroup);
        for (Supplier supplier : suppliers) {
            counter++;
            int maxOrderSize = viewHandler.getMaxNumbersOfOrders(supplier,
                    yearWeek1, starting,productAreaGroup);
            if (maxOrderSize == 0) {
                maxOrderSize = 1;
            }

            int rowSize = (25 * maxOrderSize) + 30;

            supplierRowSizes.put(supplier, rowSize);

            String rowSizeSpec = "center:" + rowSize + "dlu";
            builder.appendRow(new RowSpec(rowSizeSpec));
            builder.append(new JLabel(supplier.getSupplierName()));
        }
        builder.appendRow(new RowSpec("top:15dlu"));
        return builder.getPanel();
    }
View Full Code Here

    }

    private JPanel buildTransportPanelTransports(final WindowInterface window) {
        FormLayout layout = new FormLayout("fill:p:grow", "");

        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        int number = 0;
        for (Transport transport : transportList) {
            number++;
            builder.append(viewHandler.getTransportView(transport).buildPanel(window, number,
                    productAreaGroup));
        }
        builder.nextLine();

        return builder.getPanel();
    }
View Full Code Here

   */
  @Override
  protected JComponent buildEditPanel(WindowInterface window) {
    FormLayout layout = new FormLayout("10dlu,p,p,50dlu,20dlu,,20dlu", "");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.appendRow(new RowSpec("bottom:20dlu"));
    builder.setLeadingColumnOffset(1);
    builder.nextColumn();
    builder.append("Navn:", textFieldName);
    builder.nextLine();
    builder.append("Beskrivelse:", textFieldDescription, 2);
    builder.nextLine();
    builder.append(
        ButtonBarFactory.buildCenteredBar(buttonSave, buttonCancel), 5);

    builder.appendRow(new RowSpec("5dlu"));
    return new IconFeedbackPanel(validationResultModel, builder.getPanel());
  }
View Full Code Here

   */
  public JDialog buildDialog() {
    initComponents();
    FormLayout layout = new FormLayout("p,30dlu,p,30dlu,p,3dlu,p", "");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.setDefaultDialogBorder();
    CellConstraints cc = new CellConstraints();

    builder.append(labelIcon);
    builder.append("Starter " + systemName);
    builder.append("Versjon:");
    builder.append(currentVersion);
    builder.appendRow(builder.getLineGapSpec());
    builder.nextLine();
    builder.add(progressBar, cc.xyw(builder.getColumn(), builder.getRow(),
        7));

    JDialog dialog = new JDialog();
    dialog.setTitle("Produksjon og transport - Ugland Bygg");

    dialog.setResizable(false);

    dialog.add(builder.getPanel());
    dialog.setModal(false);
    dialog.pack();

    return dialog;
  }
View Full Code Here

   */
  @Override
  protected JComponent buildEditPanel(WindowInterface window) {
    FormLayout layout = new FormLayout("10dlu,p,p,50dlu,20dlu,,20dlu", "");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.appendRow(new RowSpec("bottom:20dlu"));
    builder.setLeadingColumnOffset(1);
    builder.nextColumn();
    builder.append("Navn:", textFieldName);
    builder.nextLine();
    builder.append("Beskrivelse:", textFieldDescription, 2);
    builder.nextLine();
    builder.append(
        ButtonBarFactory.buildCenteredBar(buttonSave, buttonCancel), 5);

    builder.appendRow(new RowSpec("5dlu"));
    return new IconFeedbackPanel(validationResultModel, builder.getPanel());
  }
View Full Code Here

  }

  private JPanel buildCollieListPanel(WindowInterface window) {
    initComponents(window);
    FormLayout layout = new FormLayout("fill:90dlu,3dlu, fill:90dlu", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    // DefaultFormBuilder builder = new DefaultFormBuilder(new
    // FormDebugPanel(), layout);
    List<Colli> colliList = viewHandler.getColliList();
    Collections.sort(colliList);//, viewHandler.getColliComparator());
    for (Colli colli : colliList) {
      builder.append(viewHandler.getColliView(colli,window).buildPanel(window));
    }
    builder.appendRow(new RowSpec("top:1dlu"));
    builder.nextLine();

    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.