Example usage for com.jgoodies.forms.layout CellConstraints CellConstraints

List of usage examples for com.jgoodies.forms.layout CellConstraints CellConstraints

Introduction

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

Prototype

public CellConstraints() 

Source Link

Document

Constructs a default instance of CellConstraints .

Usage

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

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    scrollPane1 = new JScrollPane();
    layerList = new JList();
    addBtn = new JButton();
    moveUpButton = new JButton();
    moveDownButton = new JButton();
    removeLayerButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    // 2014/*from   ww  w.  j  av  a  2s. com*/
    ColumnSpec aColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
    RowSpec aRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
    RowSpec bRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
    setLayout(new FormLayout(
            new ColumnSpec[] { aColumnSpec, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    FormFactory.DEFAULT_COLSPEC },
            new RowSpec[] { aRowSpec, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                    FormFactory.LINE_GAP_ROWSPEC, bRowSpec }));
    //      setLayout(new FormLayout(
    //            new ColumnSpec[]{
    //                        new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
    //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //                        FormFactory.DEFAULT_COLSPEC
    //            },
    //            new RowSpec[]{
    //                        new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW)
    //            }));

    //======== scrollPane1 ========
    {

        //---- layerList ----
        layerList.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                layerListValueChanged(e);
            }
        });
        scrollPane1.setViewportView(layerList);
    }
    add(scrollPane1, cc.xywh(1, 1, 1, 11));

    //---- addBtn ----
    addBtn.setText("Add Layer");
    addBtn.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            addBtnActionPerformed(e);
        }
    });
    add(addBtn, cc.xy(3, 3));

    //---- moveUpButton ----
    moveUpButton.setText("Move Up");
    moveUpButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            moveUpButtonActionPerformed(e);
        }
    });
    add(moveUpButton, cc.xy(3, 5));

    //---- moveDownButton ----
    moveDownButton.setText("Move Down");
    moveDownButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            moveDownButtonActionPerformed(e);
        }
    });
    add(moveDownButton, cc.xy(3, 7));

    //---- removeLayerButton ----
    removeLayerButton.setText("Remove Layer");
    removeLayerButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            removeLayerButtonActionPerformed(e);
        }
    });
    add(removeLayerButton, cc.xy(3, 9));
    // //GEN-END:initComponents
}

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

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    scrollPane1 = new JScrollPane();
    xHeader1 = new JXHeader();
    buttonBar = new JPanel();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle("About VERDI");
    setResizable(false);/*from   w  w w .j  a v a2  s.  c om*/
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

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

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout("default:grow", "default"));

            //======== scrollPane1 ========
            {

                //---- xHeader1 ----
                xHeader1.setTitle("Visual Environment For Rich Data Interpretation (VERDI)");
                xHeader1.setDescription("Version 1.0 06062007\n");
                scrollPane1.setViewportView(xHeader1);
            }
            contentPanel.add(scrollPane1, cc.xy(1, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            // 2014
            RowSpec[] aRowSpec = RowSpec.decodeSpecs("pref");
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC }, aRowSpec));
            //            buttonBar.setLayout(new FormLayout(
            //                  new ColumnSpec[] {
            //                     FormFactory.GLUE_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));
        }
        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.gui.AddFormulaPanel.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    btnDelete = new JButton();
    scrollPane1 = new JScrollPane();
    formulaList = new JList();
    fldFormula = new JTextField();
    btnAdd = new JButton();
    CellConstraints cc = new CellConstraints();

    // ======== this ========
    setBorder(new TitledBorder("Formulas"));
    // 2014//ww  w  .  j  av a 2s  . com
    ColumnSpec aColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
    RowSpec aRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
    setLayout(new FormLayout(
            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    aColumnSpec, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
            new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, aRowSpec,
                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));
    //      setLayout(new FormLayout(new ColumnSpec[] {
    //            FormFactory.DEFAULT_COLSPEC,
    //            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
    //                  FormSpec.DEFAULT_GROW),
    //            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //            FormFactory.DEFAULT_COLSPEC },
    //            new RowSpec[] {
    //                  FormFactory.DEFAULT_ROWSPEC,
    //                  FormFactory.LINE_GAP_ROWSPEC,
    //                  new RowSpec(RowSpec.FILL, Sizes.DEFAULT,
    //                        FormSpec.DEFAULT_GROW),
    //                  FormFactory.LINE_GAP_ROWSPEC,
    //                  FormFactory.DEFAULT_ROWSPEC }));

    // 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;

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

    // ======== scrollPane1 ========
    {
        scrollPane1.setViewportView(formulaList);
    }
    add(scrollPane1, cc.xywh(1, 3, 5, 1));
    add(fldFormula, cc.xywh(1, 5, 3, 1));

    // ---- btnAdd ----
    btnAdd.setText("Add");
    add(btnAdd, cc.xy(5, 5));

    formulaList.addMouseListener(new MouseAdapter() {
        public void mousePressed(MouseEvent evt) {
            if (evt.isPopupTrigger()) {
                JPopupMenu menu = new JPopupMenu();
                menu.add(addVariableToEditor).setEnabled(true);
                menu.show(evt.getComponent(), evt.getX(), evt.getY());
            }
        }

        public void mouseReleased(MouseEvent evt) {
            if (evt.isPopupTrigger()) {
                JPopupMenu menu = new JPopupMenu();
                menu.add(addVariableToEditor).setEnabled(true);
                menu.show(evt.getComponent(), evt.getX(), evt.getY());
            }
        }

        public void mouseClicked(MouseEvent evt) {
            //
        }
    });

    // JFormDesigner - End of component initialization
    // //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 ========
    {//from  w  ww.  ja  v a  2  s  .  c o  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.DomainPanel.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    piccoloMapPanel1 = new PiccoloMapPanel(context);
    CellConstraints cc = new CellConstraints();

    // ======== this ========
    setBorder(new TitledBorder("Domain"));
    // 2014//from   w w  w.ja va 2s  . c  om
    RowSpec[] aRowSpec = RowSpec.decodeSpecs("fill:default:grow");
    setLayout(new FormLayout(
            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
            aRowSpec));
    //      setLayout(new FormLayout(new ColumnSpec[] {
    //            FormFactory.DEFAULT_COLSPEC,
    //            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
    //                  FormSpec.DEFAULT_GROW),
    //            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //            FormFactory.DEFAULT_COLSPEC }, RowSpec
    //            .decodeSpecs("fill:default:grow")));
    add(piccoloMapPanel1, cc.xywh(1, 1, 5, 1));
    // //GEN-END:initComponents
    piccoloMapPanel1.addComponentListener(new ComponentAdapter() {
        public void componentResized(ComponentEvent e) {
            // resize the grid
            setDomainValues(currentElement);
        }
    });
}

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.  j  av a2  s  . c o  m
    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.HelpDialog.java

private void initComponents() throws URISyntaxException {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    scrollPane1 = new JScrollPane();
    xHeader1 = new JXHeader();
    buttonBar = new JPanel();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle("Help VERDI");
    setResizable(false);/*from w  w  w  . ja  v  a2s . co  m*/
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

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

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout("default:grow", "default"));

            //======== scrollPane1 ========
            {

                //---- xHeader1 ----
                //                HTML.Tag anchor = HTML.Tag.A;

                //               JLabel label = new JLabel("<html>Visual Environment For Rich Data Interpretation (VERDI)<br/><br/><a href=\"http://www.verdi-tool.org/verdiUserManual.htm\">HTML Version</a><br/><br/><a href=\"http://www.cmascenter.org/help/model_docs/verdi/1.4/VerdiUserManual.pdf\">PDF Version</a></html>");

                //               javax.swing.text.html.HTMLEditorKit
                //               JPanel editorPanePanel = new JPanel();
                //               JEditorPane editorPane = new JEditorPane();
                //               HTMLEditorKit htmlEditorKit = new HTMLEditorKit();
                //               htmlEditorKit.
                //               editorPane.setEditorKit() 
                //               editorPane.setEditable(false);
                //               java.net.URL helpURL = TextSamplerDemo.class.getResource(
                //                                               "TextSamplerDemoHelp.html");
                //                 editorPane.setText("<html>Visual Environment For Rich Data Interpretation (VERDI)<br/><br/><a href=\"http://www.verdi-tool.org/verdiUserManual.htm\">HTML Version</a><br/><br/><a href=\"http://www.cmascenter.org/help/model_docs/verdi/1.4/VerdiUserManual.pdf\">PDF Version</a></html>");

                //Put the editor pane in a scroll pane.
                //               JScrollPane editorScrollPane = new JScrollPane(editorPane);
                //               editorScrollPane.setVerticalScrollBarPolicy(
                //                               JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                //               editorScrollPane.setPreferredSize(new Dimension(250, 145));
                //               editorScrollPane.setMinimumSize(new Dimension(10, 10));               
                //               editorPanePanel.add(editorScrollPane);

                final URI uri = new URI(
                        "https://www.cmascenter.org/verdi/documentation/1.5/VerdiUserManual1.5.htm"); // 2014 VERDI 1.5 documentation
                // old URI was: "http://www.verdi-tool.org/verdiUserManual_URI_uri.htm"
                final URI uri2 = new URI(
                        "http://www.cmascenter.org/verdi/documentation/1.5/VerdiUserManual1.5.pdf"); // 2014 VERDI 1.5 documentation
                // old URI was: "http://www.cmascenter.org/help/model_docs/verdi/1.4/VerdiUserManual_URI_uri2.pdf"
                class OpenUrlAction implements ActionListener {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        open(uri);
                    }
                }
                class OpenUrlAction2 implements ActionListener {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        open(uri2);
                    }
                }
                JButton htmlLinkButton = new JButton();
                htmlLinkButton.setText("<HTML><FONT color=\"#000099\"><U>HTML Version</U></FONT></HTML>");
                htmlLinkButton.setHorizontalAlignment(SwingConstants.LEFT);
                htmlLinkButton.setBorderPainted(false);
                htmlLinkButton.setOpaque(false);
                htmlLinkButton.setBackground(Color.WHITE);
                htmlLinkButton.setToolTipText(uri.toString());
                htmlLinkButton.addActionListener(new OpenUrlAction());

                JButton pdfLinkButton = new JButton();
                pdfLinkButton.setText("<HTML><FONT color=\"#000099\"><U>PDF Version</U></FONT></HTML>");
                pdfLinkButton.setHorizontalAlignment(SwingConstants.LEFT);
                pdfLinkButton.setBorderPainted(false);
                pdfLinkButton.setOpaque(false);
                pdfLinkButton.setBackground(Color.WHITE);
                pdfLinkButton.setToolTipText(uri.toString());
                pdfLinkButton.addActionListener(new OpenUrlAction2());

                JPanel panel = new JPanel(new BorderLayout());
                panel.add(htmlLinkButton, BorderLayout.NORTH);
                panel.add(pdfLinkButton, BorderLayout.SOUTH);
                //               xHeader1.setTitle("<html>Visual Environment For Rich Data Interpretation (VERDI)<br/><br/><a href=\"http:// xHeader1 setTitle www.verdi-tool.org/verdiUserManual.htm\">HTML Version</a><br/><br/><a href=\"http://XHeader1 setTitle www.cmascenter.org/help/model_docs/verdi/1.4/VerdiUserManual.pdf\">PDF Version</a></html>"); // 2014 does not appear to be used
                //               xHeader1.setDescription("Version 1.0 06062007\n");
                scrollPane1.setViewportView(panel);
            }
            contentPanel.add(scrollPane1, cc.xy(1, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            // 2014
            RowSpec[] aRowSpec = RowSpec.decodeSpecs("pref");
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC }, aRowSpec));
            //            buttonBar.setLayout(new FormLayout(
            //                  new ColumnSpec[] {
            //                     FormFactory.GLUE_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));
        }
        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.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));/* w ww.  jav a2  s  . c  o 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  w  w w .  j ava 2 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
}

From source file:anl.verdi.plot.anim.AnimationPanel.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    label1 = compFactory.createLabel("Starting Time Step:");
    minSpinner = new JSpinner();
    label2 = compFactory.createLabel("Ending Time Step:");
    maxSpinner = new JSpinner();
    minDate = compFactory.createLabel("");
    movieChk = new JCheckBox();
    maxDate = compFactory.createLabel("");
    gifChk = new JCheckBox();
    gifFileLbl = new JLabel();
    gifFileBtn = new JButton();
    aviChk = new JCheckBox();
    aviChk.setEnabled(false);/*w w w .  j ava2 s .c o m*/
    aviFileLbl = new JLabel();
    aviFileBtn = new JButton();
    fileLbl = new JLabel();
    fileBtn = new JButton();
    separator1 = compFactory.createSeparator("");
    panel1 = new JPanel();
    startBtn = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(new TitledBorder("Animate Plot"));
    // 2014
    ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("max(pref;40dlu)");
    ColumnSpec bColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
    setLayout(new FormLayout(
            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    aColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec,
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.PREF_COLSPEC },
            new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PREF_ROWSPEC,
                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));
    //      setLayout(new FormLayout(
    //            new ColumnSpec[]{
    //                        FormFactory.DEFAULT_COLSPEC,
    //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //                        new ColumnSpec("max(pref;40dlu)"),
    //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //                        new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
    //                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
    //                        FormFactory.PREF_COLSPEC
    //            },
    //            new RowSpec[]{
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.PREF_ROWSPEC,
    //                        FormFactory.LINE_GAP_ROWSPEC,
    //                        FormFactory.DEFAULT_ROWSPEC
    //            }));
    add(label1, cc.xy(1, 1));
    add(minSpinner, cc.xy(3, 1));
    add(label2, cc.xy(1, 3));
    add(maxSpinner, cc.xy(3, 3));

    //---- minDate ----
    minDate.setFont(new Font("Tahoma", Font.BOLD, 11));
    add(minDate, cc.xywh(5, 1, 3, 1));

    //---- movieChk ----
    movieChk.setText("Make Movie");
    add(movieChk, cc.xy(1, 9));

    //---- maxDate ----
    maxDate.setFont(new Font("Tahoma", Font.BOLD, 11));
    add(maxDate, cc.xywh(5, 3, 3, 1));

    //---- gifChk ----
    gifChk.setText("Make Animated GIF");
    add(gifChk, cc.xy(1, 5));
    add(gifFileLbl, cc.xywh(3, 5, 3, 1));

    //---- aviChk ----
    aviChk.setText("Make AVI");
    add(aviChk, cc.xy(1, 7));
    add(aviFileLbl, cc.xywh(3, 7, 3, 1));

    //---- gifFileBtn ----
    gifFileBtn.setText("...");
    gifFileBtn.setMaximumSize(new Dimension(23, 23));
    gifFileBtn.setMinimumSize(new Dimension(23, 23));
    gifFileBtn.setPreferredSize(new Dimension(23, 23));
    gifFileBtn.setEnabled(false);
    add(gifFileBtn, cc.xy(7, 5));

    //---- aviFileBtn ----
    aviFileBtn.setText("...");
    aviFileBtn.setMaximumSize(new Dimension(23, 23));
    aviFileBtn.setMinimumSize(new Dimension(23, 23));
    aviFileBtn.setPreferredSize(new Dimension(23, 23));
    aviFileBtn.setEnabled(false);
    add(aviFileBtn, cc.xy(7, 7));

    //---- fileLbl ----
    fileLbl.setEnabled(false);
    add(fileLbl, cc.xywh(3, 9, 3, 1));

    //---- fileBtn ----
    fileBtn.setText("...");
    fileBtn.setEnabled(false);
    fileBtn.setMaximumSize(new Dimension(23, 23));
    fileBtn.setMinimumSize(new Dimension(23, 23));
    fileBtn.setPreferredSize(new Dimension(23, 23));
    add(fileBtn, cc.xy(7, 9));
    add(separator1, cc.xywh(1, 11, 7, 1));

    //======== panel1 ========
    {
        // 2014
        ColumnSpec cColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW);
        RowSpec[] aRowSpec = RowSpec.decodeSpecs("default");
        panel1.setLayout(new FormLayout(new ColumnSpec[] { cColumnSpec, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                FormFactory.DEFAULT_COLSPEC }, aRowSpec));
        //         panel1.setLayout(new FormLayout(
        //               new ColumnSpec[]{
        //                           new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
        //                           FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
        //                           FormFactory.DEFAULT_COLSPEC,
        //                           FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
        //                           FormFactory.DEFAULT_COLSPEC
        //               },
        //               RowSpec.decodeSpecs("default")));

        //---- startBtn ----
        startBtn.setText("Start");
        panel1.add(startBtn, cc.xy(5, 1));
    }
    add(panel1, cc.xywh(1, 13, 7, 1));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}