Example usage for com.jgoodies.forms.layout ColumnSpec decodeSpecs

List of usage examples for com.jgoodies.forms.layout ColumnSpec decodeSpecs

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout ColumnSpec decodeSpecs.

Prototype

public static ColumnSpec[] decodeSpecs(String encodedColumnSpecs) 

Source Link

Document

Parses and splits encoded column specifications using the default LayoutMap and returns an array of ColumnSpec objects.

Usage

From source file:DownloadHistoryDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Open Source Project license - unknown
    ResourceBundle bundle = ResourceBundle.getBundle("DownloadHistoryDialog");
    JPanel dialogPane = new JPanel();
    JPanel contentPanel = new JPanel();
    JPanel panel1 = new JPanel();
    combobox = new JComboBox();
    JLabel labelFilter = new JLabel();
    fieldFilter = new JTextField();
    JScrollPane scrollPane2 = new JScrollPane();
    table = new JXTable();
    JXButtonPanel buttonBar = new JXButtonPanel();
    clearHistoryBtn = new JButton();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {/*www.j av a 2  s.  c  o  m*/
        dialogPane.setBorder(Borders.DIALOG);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {

            //======== panel1 ========
            {
                panel1.setBorder(new TitledBorder(bundle.getString("panel1.border")));

                //---- labelFilter ----
                labelFilter.setText(bundle.getString("labelFilter.text"));
                labelFilter.setLabelFor(fieldFilter);

                PanelBuilder panel1Builder = new PanelBuilder(new FormLayout(
                        new ColumnSpec[] { ColumnSpec.decode("max(pref;80dlu)"),
                                FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                                FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)),
                                FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        RowSpec.decodeSpecs("default")), panel1);

                panel1Builder.add(combobox, cc.xy(1, 1));
                panel1Builder.add(labelFilter, cc.xy(3, 1));
                panel1Builder.add(fieldFilter, cc.xy(5, 1));
            }

            //======== scrollPane2 ========
            {
                scrollPane2.setViewportView(table);
            }

            PanelBuilder contentPanelBuilder = new PanelBuilder(
                    new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                            new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }),
                    contentPanel);

            contentPanelBuilder.add(panel1, cc.xy(1, 1));
            contentPanelBuilder.add(scrollPane2, cc.xy(1, 3));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0));

            //---- clearHistoryBtn ----
            clearHistoryBtn.setText(bundle.getString("clearHistoryBtn.text"));

            //---- okButton ----
            okButton.setText(bundle.getString("okButton.text"));

            PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout(
                    new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                            FormSpecs.UNRELATED_GAP_COLSPEC, ColumnSpec.decode("max(pref;55dlu)") },
                    RowSpec.decodeSpecs("fill:pref")), buttonBar);

            buttonBarBuilder.add(clearHistoryBtn, cc.xy(1, 1));
            buttonBarBuilder.add(okButton, cc.xy(5, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:UserPreferencesDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Open Source Project license - unknown
    ResourceBundle bundle = ResourceBundle.getBundle("UserPreferencesDialog");
    JPanel dialogPane = new JPanel();
    JPanel contentPanel = new JPanel();
    toolbar = new JButtonBar();
    panelCard = new JPanel();
    JPanel panelGeneral = new JPanel();
    JPanel panelGeneralSettings = new JPanel();
    checkShowIconInSystemTray = new JCheckBox();
    JPanel panelAlarm = new JPanel();
    JPanel panelWhenAlarmGoesOff = new JPanel();
    JPanel panelAlarmDefaults = new JPanel();
    JPanel panelPlugins = new JPanel();
    JTabbedPane pluginTabbedPane = new JTabbedPane();
    JPanel pluginPanelSettings = new JPanel();
    JScrollPane scrollPane1 = new JScrollPane();
    pluginTable = new JXTable();
    JXButtonPanel pluginsButtonPanel = new JXButtonPanel();
    JLabel labelPluginInfo = new JLabel();
    popmenuButton = ComponentFactory.getPopdownButton();
    btnPluginOptions = new JButton();
    JPanel pluginPanelUpdates = new JPanel();
    check4PluginUpdatesAutomatically = new JCheckBox();
    JLabel labelAfterDetectUpdate = new JLabel();
    comboHowToUpdate = new JComboBox();
    checkDownloadNotExistingPlugins = new JCheckBox();
    JLabel labelCheckForUpdateEvery = new JLabel();
    spinnerUpdateHour = new JSpinner();
    JLabel labelHours = new JLabel();
    JLabel labelUpdateFromServer = new JLabel();
    comboPluginServers = new JComboBox();
    btnResetDefaultPluginServer = new JButton();
    JLabel labelManualCheck = new JLabel();
    buttonBar = new JXButtonPanel();
    btnOK = new JButton();
    btnCancel = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle(bundle.getString("this.title"));
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {//w w  w.  j  a  v  a 2  s .  c om
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new BorderLayout());

            //======== toolbar ========
            {
                toolbar.setBorder(LineBorder.createBlackLineBorder());
                toolbar.setLayout(null);
            }
            contentPanel.add(toolbar, BorderLayout.NORTH);

            //======== panelCard ========
            {
                panelCard.setLayout(new CardLayout());

                //======== panelGeneral ========
                {
                    panelGeneral.setBorder(Borders.TABBED_DIALOG);

                    //======== panelGeneralSettings ========
                    {
                        panelGeneralSettings.setBorder(
                                new TitledBorder(null, bundle.getString("panelGeneralSettings.border"),
                                        TitledBorder.LEADING, TitledBorder.TOP));

                        //---- checkShowIconInSystemTray ----
                        checkShowIconInSystemTray.setText(bundle.getString("checkShowIconInSystemTray.text"));

                        PanelBuilder panelGeneralSettingsBuilder = new PanelBuilder(new FormLayout(
                                new ColumnSpec[] {
                                        new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW),
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC },
                                RowSpec.decodeSpecs("default")), panelGeneralSettings);

                        panelGeneralSettingsBuilder.add(checkShowIconInSystemTray, cc.xy(3, 1));
                    }

                    PanelBuilder panelGeneralBuilder = new PanelBuilder(
                            new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                                    new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                            FormSpecs.RELATED_GAP_ROWSPEC,
                                            new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW) }),
                            panelGeneral);

                    panelGeneralBuilder.add(panelGeneralSettings, cc.xy(1, 1));
                }
                panelCard.add(panelGeneral, "CARD1");

                //======== panelAlarm ========
                {
                    panelAlarm.setBorder(Borders.TABBED_DIALOG);

                    //======== panelWhenAlarmGoesOff ========
                    {
                        panelWhenAlarmGoesOff.setBorder(
                                new TitledBorder(null, bundle.getString("panelWhenAlarmGoesOff.border"),
                                        TitledBorder.LEADING, TitledBorder.TOP));

                        PanelBuilder panelWhenAlarmGoesOffBuilder = new PanelBuilder(
                                new FormLayout(new ColumnSpec[] {
                                        new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW),
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                        new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC },
                                        new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC,
                                                FormSpecs.NARROW_LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,
                                                FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,
                                                FormSpecs.DEFAULT_ROWSPEC }),
                                panelWhenAlarmGoesOff);
                        ((FormLayout) panelWhenAlarmGoesOff.getLayout())
                                .setColumnGroups(new int[][] { { 9, 11 } });

                    }

                    //======== panelAlarmDefaults ========
                    {
                        panelAlarmDefaults
                                .setBorder(new TitledBorder(null, bundle.getString("panelAlarmDefaults.border"),
                                        TitledBorder.LEADING, TitledBorder.TOP));

                        PanelBuilder panelAlarmDefaultsBuilder = new PanelBuilder(new FormLayout(
                                new ColumnSpec[] {
                                        new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW),
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                                        FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC },
                                new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.NARROW_LINE_GAP_ROWSPEC,
                                        FormSpecs.DEFAULT_ROWSPEC, FormSpecs.NARROW_LINE_GAP_ROWSPEC,
                                        FormSpecs.DEFAULT_ROWSPEC, FormSpecs.NARROW_LINE_GAP_ROWSPEC,
                                        FormSpecs.DEFAULT_ROWSPEC }),
                                panelAlarmDefaults);

                    }

                    PanelBuilder panelAlarmBuilder = new PanelBuilder(new FormLayout(
                            ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC,
                                    FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }),
                            panelAlarm);

                    panelAlarmBuilder.add(panelWhenAlarmGoesOff, cc.xy(1, 1));
                    panelAlarmBuilder.add(panelAlarmDefaults, cc.xy(1, 3));
                }
                panelCard.add(panelAlarm, "CARD2");

                //======== panelPlugins ========
                {
                    panelPlugins.setBorder(Borders.TABBED_DIALOG);

                    //======== pluginTabbedPane ========
                    {

                        //======== pluginPanelSettings ========
                        {
                            pluginPanelSettings.setBorder(
                                    new CompoundBorder(new EmptyBorder(4, 4, 4, 4), new EtchedBorder()));
                            pluginPanelSettings.setLayout(new BorderLayout());

                            //======== scrollPane1 ========
                            {
                                scrollPane1.setViewportView(pluginTable);
                            }
                            pluginPanelSettings.add(scrollPane1, BorderLayout.CENTER);

                            //======== pluginsButtonPanel ========
                            {
                                pluginsButtonPanel.setBorder(new EmptyBorder(4, 4, 4, 4));

                                //---- labelPluginInfo ----
                                labelPluginInfo.setText(bundle.getString("labelPluginInfo.text"));

                                //---- popmenuButton ----
                                popmenuButton.setText(bundle.getString("popmenuButton.text"));

                                //---- btnPluginOptions ----
                                btnPluginOptions.setText(bundle.getString("btnPluginOptions.text"));

                                PanelBuilder pluginsButtonPanelBuilder = new PanelBuilder(new FormLayout(
                                        new ColumnSpec[] { FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                                FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW),
                                                FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                                FormSpecs.DEFAULT_COLSPEC, FormSpecs.UNRELATED_GAP_COLSPEC,
                                                FormSpecs.DEFAULT_COLSPEC,
                                                FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                                FormSpecs.UNRELATED_GAP_COLSPEC },
                                        RowSpec.decodeSpecs("default")), pluginsButtonPanel);

                                pluginsButtonPanelBuilder.add(labelPluginInfo, cc.xy(3, 1));
                                pluginsButtonPanelBuilder.add(popmenuButton, cc.xy(5, 1));
                                pluginsButtonPanelBuilder.add(btnPluginOptions, cc.xy(7, 1));
                            }
                            pluginPanelSettings.add(pluginsButtonPanel, BorderLayout.SOUTH);
                        }
                        pluginTabbedPane.addTab(bundle.getString("pluginPanelSettings.tab.title"),
                                pluginPanelSettings);

                        //======== pluginPanelUpdates ========
                        {
                            pluginPanelUpdates.setBorder(new CompoundBorder(new EmptyBorder(4, 4, 4, 4),
                                    new TitledBorder(bundle.getString("pluginPanelUpdates.border"))));

                            //---- check4PluginUpdatesAutomatically ----
                            check4PluginUpdatesAutomatically
                                    .setText(bundle.getString("check4PluginUpdatesAutomatically.text"));

                            //---- labelAfterDetectUpdate ----
                            labelAfterDetectUpdate.setText(bundle.getString("labelAfterDetectUpdate.text"));

                            //---- checkDownloadNotExistingPlugins ----
                            checkDownloadNotExistingPlugins
                                    .setText(bundle.getString("checkDownloadNotExistingPlugins.text"));

                            //---- labelCheckForUpdateEvery ----
                            labelCheckForUpdateEvery.setText(bundle.getString("labelCheckForUpdateEvery.text"));

                            //---- labelHours ----
                            labelHours.setText(bundle.getString("labelHours.text"));

                            //---- labelUpdateFromServer ----
                            labelUpdateFromServer.setText(bundle.getString("labelUpdateFromServer.text"));
                            labelUpdateFromServer.setLabelFor(comboPluginServers);

                            //---- comboPluginServers ----
                            comboPluginServers.setEditable(true);

                            //---- btnResetDefaultPluginServer ----
                            btnResetDefaultPluginServer
                                    .setText(bundle.getString("btnResetDefaultPluginServer.text"));

                            //---- labelManualCheck ----
                            labelManualCheck.setText(bundle.getString("labelManualCheck.text"));

                            PanelBuilder pluginPanelUpdatesBuilder = new PanelBuilder(new FormLayout(
                                    new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC,
                                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                            new ColumnSpec(Sizes
                                                    .bounded(Sizes.MINIMUM, Sizes.dluX(30), Sizes.dluX(30))),
                                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                            new ColumnSpec(ColumnSpec.FILL,
                                                    Sizes.bounded(Sizes.DEFAULT, Sizes.dluX(50),
                                                            Sizes.dluX(75)),
                                                    FormSpec.DEFAULT_GROW),
                                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                                            FormSpecs.UNRELATED_GAP_COLSPEC },
                                    new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                                            FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                                            FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                                            FormSpecs.DEFAULT_ROWSPEC, FormSpecs.UNRELATED_GAP_ROWSPEC,
                                            FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                                            FormSpecs.UNRELATED_GAP_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                                            FormSpecs.DEFAULT_ROWSPEC }),
                                    pluginPanelUpdates);

                            pluginPanelUpdatesBuilder.add(check4PluginUpdatesAutomatically,
                                    cc.xywh(1, 1, 5, 1));
                            pluginPanelUpdatesBuilder.add(labelAfterDetectUpdate,
                                    cc.xywh(1, 3, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                            pluginPanelUpdatesBuilder.add(comboHowToUpdate,
                                    cc.xywh(5, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
                            pluginPanelUpdatesBuilder.add(checkDownloadNotExistingPlugins, cc.xywh(1, 5, 5, 1));
                            pluginPanelUpdatesBuilder.add(labelCheckForUpdateEvery,
                                    cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                            pluginPanelUpdatesBuilder.add(spinnerUpdateHour, cc.xy(3, 7));
                            pluginPanelUpdatesBuilder.add(labelHours, cc.xy(5, 7));
                            pluginPanelUpdatesBuilder.add(labelUpdateFromServer,
                                    cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                            pluginPanelUpdatesBuilder.add(comboPluginServers, cc.xywh(3, 9, 3, 1));
                            pluginPanelUpdatesBuilder.add(btnResetDefaultPluginServer, cc.xy(7, 9));
                            pluginPanelUpdatesBuilder.add(labelManualCheck, cc.xywh(1, 13, 7, 1));
                        }
                        pluginTabbedPane.addTab(bundle.getString("pluginPanelUpdates.tab.title"),
                                pluginPanelUpdates);

                    }

                    PanelBuilder panelPluginsBuilder = new PanelBuilder(
                            new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                                    new RowSpec[] {
                                            new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                            FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("5px") }),
                            panelPlugins);

                    panelPluginsBuilder.add(pluginTabbedPane, cc.xy(1, 1));
                }
                panelCard.add(panelPlugins, "CARD6");
            }
            contentPanel.add(panelCard, BorderLayout.CENTER);
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_PAD);
            buttonBar.setCyclic(true);

            //---- btnOK ----
            btnOK.setText(bundle.getString("btnOK.text"));

            //---- btnCancel ----
            btnCancel.setText(bundle.getString("btnCancel.text"));

            PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout(
                    new ColumnSpec[] { FormSpecs.GLUE_COLSPEC, ColumnSpec.decode("max(pref;42dlu)"),
                            FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.PREF_COLSPEC },
                    RowSpec.decodeSpecs("pref")), buttonBar);
            ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 2, 4 } });

            buttonBarBuilder.add(btnOK, cc.xy(2, 1));
            buttonBarBuilder.add(btnCancel, cc.xy(4, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:anl.verdi.area.AreaFilePanel.java

private void initComponents() {
    Logger.debug("in AreaFilePanel.initComponents");
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    areaFilesPanel = new JPanel();
    areaFiles = new JPanel();
    btnAdd = new JButton();
    btnDelete = new JButton();
    scrollPaneAreaFiles = new JScrollPane();
    areaFileList = new JList();
    areasPanel = new JPanel();
    scrollPane6 = new JScrollPane();
    areaList = new JList();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setLayout(new FormLayout("pref:grow", "fill:default:grow"));

    //======== areaFilesPanel ========
    {/*  w w w.j a v  a2s.c  o  m*/
        areaFilesPanel.setBorder(null);
        // 2014 - underlying jgoodies class changed
        ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("pref:grow");
        RowSpec[] aRowSpec = RowSpec.decodeSpecs("fill:max(pref;125dlu):grow");
        areaFilesPanel.setLayout(new FormLayout(aColumnSpec,
                new RowSpec[] { new RowSpec(Sizes.dluY(108)), new RowSpec(Sizes.dluY(92)),
                        FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PREF_ROWSPEC,
                        FormFactory.LINE_GAP_ROWSPEC, aRowSpec[0] }));

        //         areaFilesPanel.setLayout(new FormLayout(
        //               ColumnSpec.decodeSpecs("pref:grow"),
        //               new RowSpec[] {
        //                  new RowSpec(Sizes.dluY(108)),
        //                  new RowSpec(Sizes.dluY(92)),
        //                  FormFactory.PREF_ROWSPEC,
        //                  FormFactory.LINE_GAP_ROWSPEC,
        //                  FormFactory.PREF_ROWSPEC,
        //                  FormFactory.LINE_GAP_ROWSPEC,
        //                  new RowSpec("fill:max(pref;125dlu):grow")
        //               }));

        //======== areaFiles ========
        {
            areaFiles.setBorder(new TitledBorder("Area Files"));
            // 2014
            ColumnSpec bColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
            RowSpec bRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
            areaFiles.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, bColumnSpec },
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, bRowSpec }));
            //            areaFiles.setLayout(new FormLayout(
            //                  new ColumnSpec[] {
            //                        FormFactory.DEFAULT_COLSPEC,
            //                        FormFactory.RELATED_GAP_COLSPEC,
            //                        FormFactory.DEFAULT_COLSPEC,
            //                        new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW)
            //                  },
            //                  new RowSpec[] {
            //                        FormFactory.DEFAULT_ROWSPEC,
            //                        FormFactory.RELATED_GAP_ROWSPEC,
            //                        new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW)
            //                  }));

            // 2014 set up file names
            String verdiHome = Tools.getVerdiHome(); // 2014 new method for reading in an image file
            String separator = "/"; // use forward slash only for constructor ImageIcon(String filename);
            String pathName = verdiHome + separator + "plugins" + separator + "core" + separator + "icons"
                    + separator;

            //---- btnAdd ----
            String filePlus = new String(pathName + "plus.png");
            //            btnAdd.setIcon(new ImageIcon(getClass().getResource("/plus.png")));
            btnAdd.setIcon(new ImageIcon(filePlus));
            btnAdd.setToolTipText("Add Area File");
            areaFiles.add(btnAdd, cc.xy(1, 1));

            //---- btnDelete ----
            String fileMinus = new String(pathName + "Minus.png");
            //            btnDelete.setIcon(new ImageIcon(getClass().getResource("/minus.png")));
            btnDelete.setIcon(new ImageIcon(fileMinus));
            btnDelete.setToolTipText("Delete Area File");
            areaFiles.add(btnDelete, cc.xy(3, 1));

            //======== scrollPaneAreaFiles ========
            {

                //---- areaFileList ----
                areaFileList.setSelectedIndex(0);
                areaFileList.setMaximumSize(new Dimension(300, 100));
                areaFileList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
                areaFileList.setPrototypeCellValue("RADM_CONC_!");
                scrollPaneAreaFiles.setViewportView(areaFileList);
            }
            areaFiles.add(scrollPaneAreaFiles, cc.xywh(1, 3, 4, 1));
        }
        areaFilesPanel.add(areaFiles, cc.xy(1, 1));

        //======== areasPanel ========
        {
            areasPanel.setBorder(new TitledBorder("Areas"));
            areasPanel.setLayout(new BorderLayout());

            //======== scrollPane6 ========
            {

                //---- areaList ----
                areaList.setPrototypeCellValue("O3[1]");
                scrollPane6.setViewportView(areaList);
            }
            areasPanel.add(scrollPane6, BorderLayout.CENTER);
        }
        areaFilesPanel.add(areasPanel, cc.xywh(1, 2, 1, 6));
    }
    add(areaFilesPanel, cc.xy(1, 1));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:anl.verdi.area.target.FormulaDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    separator2 = compFactory.createSeparator("View Area Values for the Selected Formulas");
    label2 = new JLabel();
    radioButton1 = new JRadioButton();
    radioButton2 = new JRadioButton();
    label1 = new JLabel();
    scrollPane1 = new JScrollPane();
    formulaList = new JList();
    buttonBar = new JPanel();
    separator1 = new JSeparator();
    errorMessage = new JLabel();
    okButton = new JButton();
    cancelButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);//from w  w w  .j  av  a 2 s  .co  m
    setTitle("Area Information");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setMinimumSize(new Dimension(445, 400));
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setPreferredSize(new Dimension(400, 75));
            contentPanel.setMinimumSize(new Dimension(423, 75));

            // 2014 - underlyaing jgoodies class changed
            ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("min(min;5dlu):grow");
            ColumnSpec[] bColumnSpec = ColumnSpec.decodeSpecs("max(min;75dlu)");

            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.PREF_COLSPEC, aColumnSpec[0],
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec[0],
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC }));
            //            contentPanel.setLayout(new FormLayout(
            //                  new ColumnSpec[] {
            //                        FormFactory.DEFAULT_COLSPEC,
            //                        FormFactory.PREF_COLSPEC,
            //                        new ColumnSpec("min(min;5dlu):grow"),
            //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
            //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
            //                        FormFactory.DEFAULT_COLSPEC,
            //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
            //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
            //                        FormFactory.RELATED_GAP_COLSPEC,
            //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
            //                        new ColumnSpec("max(min;75dlu)"),
            //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
            //                        FormFactory.DEFAULT_COLSPEC
            //                  },
            //                  new RowSpec[] {
            //                        FormFactory.DEFAULT_ROWSPEC,
            //                        FormFactory.LINE_GAP_ROWSPEC,
            //                        FormFactory.DEFAULT_ROWSPEC,
            //                        FormFactory.LINE_GAP_ROWSPEC,
            //                        FormFactory.DEFAULT_ROWSPEC
            //                  }));
            contentPanel.add(separator2, cc.xywh(1, 1, 13, 1));

            //---- label2 ----
            label2.setText("Areas:");
            contentPanel.add(label2, cc.xy(1, 3));

            //---- radioButton1 ----
            radioButton1.setText("Selected");
            radioButton1.setSelected(true);
            contentPanel.add(radioButton1, cc.xy(2, 3));

            //---- radioButton2 ----
            radioButton2.setText("All");
            contentPanel.add(radioButton2, cc.xywh(3, 3, 9, 1));

            //---- label1 ----
            label1.setText("Formulas:");
            contentPanel.add(label1, cc.xy(1, 5));
        }
        dialogPane.add(contentPanel, BorderLayout.NORTH);

        //======== scrollPane1 ========
        {
            scrollPane1.setMinimumSize(new Dimension(300, 400));
            scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
            scrollPane1.setPreferredSize(new Dimension(350, 200));
            scrollPane1.setMaximumSize(new Dimension(1000, 1000));

            //---- formulaList ----
            formulaList.setMinimumSize(new Dimension(300, 200));
            formulaList.setMaximumSize(new Dimension(300, 500));
            formulaList.setPreferredSize(new Dimension(300, 200));
            scrollPane1.setViewportView(formulaList);
        }
        dialogPane.add(scrollPane1, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setPreferredSize(new Dimension(181, 60));
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC,
                            FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                    new RowSpec[] { new RowSpec(Sizes.dluY(15)), FormFactory.PREF_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));
            buttonBar.add(separator1, cc.xywh(2, 1, 9, 1));

            //---- errorMessage ----
            errorMessage
                    .setFont(errorMessage.getFont().deriveFont(errorMessage.getFont().getStyle() | Font.BOLD));
            buttonBar.add(errorMessage, cc.xywh(2, 2, 6, 1));

            //---- okButton ----
            okButton.setText("OK");
            buttonBar.add(okButton, cc.xy(8, 2));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            buttonBar.add(cancelButton, cc.xy(10, 2));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    setSize(375, 345);
    setLocationRelativeTo(getOwner());

    //---- buttonGroup1 ----
    ButtonGroup buttonGroup1 = new ButtonGroup();
    buttonGroup1.add(radioButton1);
    buttonGroup1.add(radioButton2);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:anl.verdi.gis.FastTileLayerEditor.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    separator1 = compFactory.createSeparator("Manage Layers");
    layerEditorPanel1 = new FastTileLayerPanel();
    buttonBar = new JPanel();
    okButton = new JButton();
    cancelButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);// w w w.  j av  a2  s  .  c om
    setTitle("Manage Layers");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            // 2014
            ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("default:grow");
            RowSpec aRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
            contentPanel.setLayout(new FormLayout(aColumnSpec,
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, aRowSpec }));
            //            contentPanel.setLayout(new FormLayout(
            //                  ColumnSpec.decodeSpecs("default:grow"),
            //                  new RowSpec[] {
            //                     FormFactory.DEFAULT_ROWSPEC,
            //                     FormFactory.LINE_GAP_ROWSPEC,
            //                     new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW)
            //                  }));
            contentPanel.add(separator1, cc.xy(1, 1));
            contentPanel.add(layerEditorPanel1, cc.xy(1, 3));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            // 2014
            RowSpec[] bRowSpec = RowSpec.decodeSpecs("pref");
            buttonBar
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC,
                                            FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                                    bRowSpec));
            //            buttonBar.setLayout(new FormLayout(
            //                  new ColumnSpec[] {
            //                     FormFactory.GLUE_COLSPEC,
            //                     FormFactory.BUTTON_COLSPEC,
            //                     FormFactory.RELATED_GAP_COLSPEC,
            //                     FormFactory.BUTTON_COLSPEC
            //                  },
            //                  RowSpec.decodeSpecs("pref")));

            //---- okButton ----
            okButton.setText("OK");
            okButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed(e);
                }
            });
            buttonBar.add(okButton, cc.xy(2, 1));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            cancelButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    cancelButtonActionPerformed(e);
                }
            });
            buttonBar.add(cancelButton, cc.xy(4, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // //GEN-END:initComponents
}

From source file:anl.verdi.gis.LayerEditor.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    separator1 = compFactory.createSeparator("Manage Layers");
    layerEditorPanel1 = new LayerEditorPanel();
    buttonBar = new JPanel();
    okButton = new JButton();
    cancelButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);/* w  w  w  .  j a va  2s.  co  m*/
    setTitle("Manage Layers");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            // 2014
            ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("default:grow");
            RowSpec aRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
            contentPanel.setLayout(new FormLayout(aColumnSpec,
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, aRowSpec }));
            //            contentPanel.setLayout(new FormLayout(
            //                  ColumnSpec.decodeSpecs("default:grow"),
            //                  new RowSpec[] {
            //                     FormFactory.DEFAULT_ROWSPEC,
            //                     FormFactory.LINE_GAP_ROWSPEC,
            //                     new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW)
            //                  }));
            contentPanel.add(separator1, cc.xy(1, 1));
            contentPanel.add(layerEditorPanel1, cc.xy(1, 3));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            // 2014
            RowSpec[] bRowSpec = RowSpec.decodeSpecs("pref");
            buttonBar
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC,
                                            FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                                    bRowSpec));
            //            buttonBar.setLayout(new FormLayout(
            //                  new ColumnSpec[] {
            //                     FormFactory.GLUE_COLSPEC,
            //                     FormFactory.BUTTON_COLSPEC,
            //                     FormFactory.RELATED_GAP_COLSPEC,
            //                     FormFactory.BUTTON_COLSPEC
            //                  },
            //                  RowSpec.decodeSpecs("pref")));

            //---- okButton ----
            okButton.setText("OK");
            okButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed(e);
                }
            });
            buttonBar.add(okButton, cc.xy(2, 1));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            cancelButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    cancelButtonActionPerformed(e);
                }
            });
            buttonBar.add(cancelButton, cc.xy(4, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // //GEN-END:initComponents
}

From source file:anl.verdi.gui.DataSetPanel.java

private void initComponents() {
    Logger.debug("in DataSetPanel initComponents");
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dataSetPanel = new JPanel();
    dataSets = new JPanel();
    btnAdd = new JButton();
    btnDelete = new JButton();
    btnAddRemote = new JButton();
    scrollPaneDataset = new JScrollPane();
    dataList = new JList();
    variablesPanel = new JPanel();
    scrollPane6 = new JScrollPane();
    variableList = new JList();
    timePanel = new TimePanel();
    layerPanel1 = new LayerPanel();
    domainPanel1 = new DomainPanel();
    CellConstraints cc = new CellConstraints();

    // ======== this ========
    setLayout(new FormLayout("pref:grow", "fill:default:grow"));

    // ======== dataSetPanel ========
    {//ww  w .  jav a  2s.co m
        dataSetPanel.setBorder(null);
        // 2014
        RowSpec[] aRowSpec = RowSpec.decodeSpecs("fill:max(pref;125dlu):grow");
        ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("pref:grow");
        dataSetPanel.setLayout(new FormLayout(aColumnSpec,
                new RowSpec[] { new RowSpec(Sizes.dluY(108)), new RowSpec(Sizes.dluY(92)),
                        FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PREF_ROWSPEC,
                        FormFactory.LINE_GAP_ROWSPEC, aRowSpec[0] }));
        //         dataSetPanel.setLayout(new FormLayout(ColumnSpec
        //               .decodeSpecs("pref:grow"), new RowSpec[] {
        //               new RowSpec(Sizes.dluY(108)), new RowSpec(Sizes.dluY(92)),
        //               FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
        //               FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
        //               new RowSpec("fill:max(pref;125dlu):grow") }));

        // ======== dataSets ========
        {
            dataSets.setBorder(new TitledBorder("Datasets"));
            // 2014
            ColumnSpec cColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
            RowSpec cRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
            dataSets.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, cColumnSpec },
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, cRowSpec }));
            //            dataSets.setLayout(new FormLayout(new ColumnSpec[] {
            //                  FormFactory.DEFAULT_COLSPEC,
            //                  FormFactory.RELATED_GAP_COLSPEC,
            //                  FormFactory.DEFAULT_COLSPEC,
            //                  FormFactory.RELATED_GAP_COLSPEC,
            //                  FormFactory.DEFAULT_COLSPEC,
            //                  new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
            //                        FormSpec.DEFAULT_GROW) }, new RowSpec[] {
            //                  FormFactory.DEFAULT_ROWSPEC,
            //                  FormFactory.RELATED_GAP_ROWSPEC,
            //                  new RowSpec(RowSpec.FILL, Sizes.DEFAULT,
            //                        FormSpec.DEFAULT_GROW) }));

            String verdiHome = Tools.getVerdiHome(); // 2014 new method for reading in an image file
            String separator = "/"; // use forward slash only for constructor ImageIcon(String filename);
            String pathName = verdiHome + separator + "plugins" + separator + "core" + separator + "icons"
                    + separator;

            // ---- btnAdd ----
            String filePlus = new String(pathName + "plus.png");
            //            btnAdd.setIcon(new ImageIcon(getClass().getResource("/plus.png")));
            btnAdd.setIcon(new ImageIcon(filePlus));
            btnAdd.setToolTipText("Add local dataset");
            dataSets.add(btnAdd, cc.xy(1, 1));

            // ---- btnDelete ----
            String fileMinus = new String(pathName + "minus.png");
            //            btnDelete.setIcon(new ImageIcon(getClass().getResource("/minus.png")));
            btnDelete.setIcon(new ImageIcon(fileMinus));
            btnDelete.setToolTipText("Remove local dataset");
            dataSets.add(btnDelete, cc.xy(3, 1));

            // ---- btnAddRemote ----
            String filePlusRemote = new String(pathName + "plus-remote.png");
            //            btnAddRemote.setIcon(new ImageIcon(getClass().getResource("/plus-remote.png")));
            btnAddRemote.setIcon(new ImageIcon(filePlusRemote));
            btnAddRemote.setToolTipText("Add remote dataset");
            dataSets.add(btnAddRemote, cc.xy(5, 1));

            // ======== scrollPaneDataset ========
            {

                // ---- dataList ----
                dataList.setSelectedIndex(0);
                dataList.setMaximumSize(new Dimension(300, 100));
                dataList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
                dataList.setPrototypeCellValue("RADM_CONC_!");
                scrollPaneDataset.setViewportView(dataList);
            }
            dataSets.add(scrollPaneDataset, cc.xywh(1, 3, 6, 1));
        }
        dataSetPanel.add(dataSets, cc.xy(1, 1));

        // ======== variablesPanel ========
        {
            variablesPanel.setBorder(new TitledBorder("Variables"));
            variablesPanel.setLayout(new BorderLayout(2, 5));

            // ======== scrollPane6 ========
            {

                // ---- variableList ----
                variableList.setPrototypeCellValue("O3[1]");
                scrollPane6.setViewportView(variableList);
            }

            variablesPanel.add(new JLabel("Double-click to add the variable as a formula."),
                    BorderLayout.NORTH);
            variablesPanel.add(scrollPane6, BorderLayout.CENTER);
        }
        dataSetPanel.add(variablesPanel, cc.xy(1, 2));
        dataSetPanel.add(timePanel, cc.xy(1, 3));
        dataSetPanel.add(layerPanel1, cc.xy(1, 5));
        dataSetPanel.add(domainPanel1, cc.xy(1, 7));
    }
    add(dataSetPanel, cc.xy(1, 1));
    // //GEN-END:initComponents
}

From source file:anl.verdi.gui.FormulasPanel.java

private void initComponents() {
    Logger.debug("in FormulasPanel initComponents");
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    addFormulaPanel = new AddFormulaPanel();
    timePanel1 = new TimePanel();
    layerPanel1 = new LayerPanel();
    domainPanel1 = new DomainPanel();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setPreferredSize(new Dimension(274, 700));
    setMinimumSize(new Dimension(146, 600));
    // 2014/*from   w w  w . ja v  a2s  .  com*/
    RowSpec[] aRowSpec = RowSpec.decodeSpecs("fill:max(pref;125dlu):grow");
    ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("default:grow");
    setLayout(new FormLayout(aColumnSpec,
            new RowSpec[] { FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PREF_ROWSPEC,
                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    aRowSpec[0] }));
    //      setLayout(new FormLayout(
    //            ColumnSpec.decodeSpecs("default:grow"),
    //            new RowSpec[]{
    //                        FormFactory.PREF_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.PREF_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.PREF_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        new RowSpec("fill:max(pref;125dlu):grow")
    //            }));
    add(addFormulaPanel, cc.xy(1, 1));
    add(timePanel1, cc.xy(1, 3));
    add(layerPanel1, cc.xy(1, 5));
    add(domainPanel1, cc.xy(1, 7));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:anl.verdi.gui.LayerPanel.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    chkEnable = new JCheckBox();
    label1 = compFactory.createLabel("Min:");
    minSpinner = new JSpinner();
    label2 = compFactory.createLabel("Max:");
    maxSpinner = new JSpinner();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(new TitledBorder("Layers"));

    // 2014 - underlying jgoodies class changed
    ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("max(default;10dlu)");
    ColumnSpec[] bColumnSpec = ColumnSpec.decodeSpecs("max(pref;30dlu)");
    ColumnSpec cColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW);
    setLayout(new FormLayout(
            new ColumnSpec[] { aColumnSpec[0], FormFactory.DEFAULT_COLSPEC,
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec[0],
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, cColumnSpec },
            new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));
    //      setLayout(new FormLayout(
    //            new ColumnSpec[] {
    //               new ColumnSpec("max(default;10dlu)"),
    //               FormFactory.DEFAULT_COLSPEC,
    //               FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //               new ColumnSpec("max(pref;30dlu)"),
    //               FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //               new ColumnSpec(ColumnSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW)
    //            },
    //            new RowSpec[] {
    //               FormFactory.DEFAULT_ROWSPEC,
    //               FormFactory.LINE_GAP_ROWSPEC,
    //               FormFactory.DEFAULT_ROWSPEC,
    //               FormFactory.LINE_GAP_ROWSPEC,
    //               FormFactory.DEFAULT_ROWSPEC
    //            }));

    //---- chkEnable ----
    chkEnable.setText("Use Layer Range");
    add(chkEnable, cc.xywh(1, 1, 6, 1));
    add(label1, cc.xy(2, 3));//from  w ww . ja v  a 2  s  .co m
    add(minSpinner, cc.xy(4, 3));
    add(label2, cc.xy(2, 5));
    add(maxSpinner, cc.xy(4, 5));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:anl.verdi.gui.TimePanel.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    chkEnable = new JCheckBox();
    label1 = compFactory.createLabel("Min:");
    minSpinner = new JSpinner();
    minDate = compFactory.createLabel("");
    label2 = compFactory.createLabel("Max:");
    maxSpinner = new JSpinner();
    maxDate = compFactory.createLabel("");
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(new TitledBorder("Time Steps"));
    // 2014 - underlying jgoodies class changed
    ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("max(min;10dlu)");
    ColumnSpec[] bColumnSpec = ColumnSpec.decodeSpecs("max(pref;40dlu)");
    ColumnSpec cColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);

    setLayout(new FormLayout(
            new ColumnSpec[] { aColumnSpec[0], FormFactory.DEFAULT_COLSPEC,
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec[0],
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, cColumnSpec },
            new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

    //---- chkEnable ----
    chkEnable.setText("Use Time Range");
    add(chkEnable, cc.xywh(1, 1, 6, 1));
    add(label1, cc.xy(2, 3));//from  ww  w.  jav a2 s .  c  o  m
    add(minSpinner, cc.xy(4, 3));

    //---- minDate ----
    minDate.setFont(new Font("Tahoma", Font.BOLD, 11));
    add(minDate, cc.xy(6, 3));
    add(label2, cc.xy(2, 5));
    add(maxSpinner, cc.xy(4, 5));

    //---- maxDate ----
    maxDate.setFont(new Font("Tahoma", Font.BOLD, 11));
    add(maxDate, cc.xy(6, 5));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}