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

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

Introduction

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

Prototype

Alignment DEFAULT

To view the source code for com.jgoodies.forms.layout CellConstraints DEFAULT.

Click Source Link

Document

Use the column's or row's default alignment.

Usage

From source file:org.archiviststoolkit.dialog.AccessionLookup.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    mainHeaderPanel = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    contentPane = new JPanel();
    label3 = new JLabel();
    label4 = new JLabel();
    scrollPane1 = new JScrollPane();
    lookupTable = new DomainSortableTable(Resources.class, filterField);
    label1 = new JLabel();
    filterField = new JTextField();
    buttonBar = new JPanel();
    linkButton = new JButton();
    doneButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);/*w w  w.  j a va 2  s.com*/
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            thisWindowClosing();
        }
    });
    Container contentPane2 = getContentPane();
    contentPane2.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new BorderLayout());

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== mainHeaderPanel ========
            {
                mainHeaderPanel.setBackground(new Color(80, 35, 45));
                mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                mainHeaderPanel
                        .setLayout(
                                new FormLayout(
                                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW) },
                                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC,
                                                FormFactory.DEFAULT_ROWSPEC,
                                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Main Header");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.UNRELATED_GAP_COLSPEC },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Lookup Accession");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, BorderLayout.NORTH);

        //======== contentPane ========
        {
            contentPane.setBackground(new Color(231, 188, 251));
            contentPane.setOpaque(false);
            contentPane
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC,
                                            FormFactory.DEFAULT_COLSPEC,
                                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                    FormSpec.DEFAULT_GROW),
                                            FormFactory.UNRELATED_GAP_COLSPEC },
                                    new RowSpec[] { FormFactory.UNRELATED_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),
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.UNRELATED_GAP_ROWSPEC }));

            //---- label3 ----
            label3.setText("Double click on a Accession to select it.");
            contentPane.add(label3, cc.xywh(2, 2, 3, 1));

            //---- label4 ----
            label4.setText("Or hit enter if a Accession is highlighted.");
            contentPane.add(label4, cc.xywh(2, 4, 3, 1));

            //======== scrollPane1 ========
            {
                scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

                //---- lookupTable ----
                lookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300));
                lookupTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        lookupTableMouseClicked(e);
                    }
                });
                lookupTable.addKeyListener(new KeyAdapter() {
                    @Override
                    public void keyTyped(KeyEvent e) {
                        lookupTableKeyTyped(e);
                    }
                });
                scrollPane1.setViewportView(lookupTable);
            }
            contentPane.add(scrollPane1, cc.xywh(2, 6, 3, 1));

            //---- label1 ----
            label1.setText("Filter:");
            contentPane.add(label1, cc.xy(2, 8));
            contentPane.add(filterField, cc.xy(4, 8));

            //======== buttonBar ========
            {
                buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
                buttonBar.setBackground(new Color(231, 188, 251));
                buttonBar.setOpaque(false);
                buttonBar
                        .setLayout(new FormLayout(
                                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC,
                                        FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                                RowSpec.decodeSpecs("pref")));

                //---- linkButton ----
                linkButton.setText("Link");
                linkButton.setOpaque(false);
                linkButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        linkButtonActionPerformed();
                    }
                });
                buttonBar.add(linkButton, cc.xy(3, 1));

                //---- doneButton ----
                doneButton.setText("Close Window");
                doneButton.setOpaque(false);
                doneButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        doneButtonActionPerformed(e);
                    }
                });
                buttonBar.add(doneButton, cc.xy(7, 1));
            }
            contentPane.add(buttonBar, cc.xywh(2, 10, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
        }
        dialogPane.add(contentPane, BorderLayout.CENTER);
    }
    contentPane2.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.dialog.ApplicationAboutDialog.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label1 = new JLabel();
    viewLicesnseAgreement = new JLabel();
    label2 = new JLabel();
    scrollPane1 = new JScrollPane();
    textArea1 = new JTextArea();
    buttonBar = new JPanel();
    closeButton = new JButton();
    CellConstraints cc = new CellConstraints();

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

    //======== dialogPane ========
    {/*w w w  .  ja v a2s  .  c om*/
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default"),
                    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 }));

            //---- label1 ----
            label1.setIcon(new ImageIcon(
                    getClass().getResource("/org/archiviststoolkit/resources/images/ATLogo.jpg")));
            contentPanel.add(label1, cc.xy(1, 1));

            //---- viewLicesnseAgreement ----
            viewLicesnseAgreement.setText("<html><u>View license agreement</u></html>");
            viewLicesnseAgreement.setFont(new Font("Trebuchet MS", Font.PLAIN, 10));
            viewLicesnseAgreement.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    viewLicesnseAgreementMouseClicked(e);
                }
            });
            contentPanel.add(viewLicesnseAgreement,
                    cc.xywh(1, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //---- label2 ----
            label2.setText("Application Environment");
            label2.setFont(new Font("Trebuchet MS", Font.PLAIN, 12));
            contentPanel.add(label2, cc.xywh(1, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //======== scrollPane1 ========
            {
                scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

                //---- textArea1 ----
                textArea1.setRows(7);
                textArea1.setColumns(30);
                textArea1.setEditable(false);
                textArea1.setFocusable(false);
                textArea1.setDragEnabled(false);
                textArea1.setText(ApplicationFrame.gatherSystemInformation());
                scrollPane1.setViewportView(textArea1);
            }
            contentPanel.add(scrollPane1, cc.xywh(1, 7, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(new FormLayout("max(pref;39dlu):grow", "pref"));

            //---- closeButton ----
            closeButton.setText("Close");
            closeButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    closeButtonActionPerformed(e);
                }
            });
            buttonBar.add(closeButton, cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.dialog.BatchLocationCreation.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    panel2 = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    panel1 = new JPanel();
    contentPanel = new JPanel();
    label1 = new JLabel();
    building = new JTextField();
    label2 = new JLabel();
    floor = new JTextField();
    label3 = new JLabel();
    room = new JTextField();
    label4 = new JLabel();
    area = new JTextField();
    label12 = new JLabel();
    label13 = new JLabel();
    label14 = new JLabel();
    label5 = new JLabel();
    coordinate1Label = new JTextField();
    coordinate1Start = new JTextField();
    label6 = new JLabel();
    coordinate1End = new JTextField();
    label7 = new JLabel();
    coordinate2Label = new JTextField();
    coordinate2Start = new JTextField();
    label9 = new JLabel();
    coordinate2End = new JTextField();
    label8 = new JLabel();
    coordinate3Label = new JTextField();
    coordinate3Start = new JTextField();
    label10 = new JLabel();
    coordinate3End = new JTextField();
    label11 = new JLabel();
    repository = new JComboBox(new DefaultComboBoxModel(Repositories.getRepositoryList()));
    buttonBar = new JPanel();
    generateButton = new JButton();
    doneButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);//from   ww w.ja v  a  2s .  c o m
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                        FormFactory.LINE_GAP_ROWSPEC,
                        new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }));

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== panel2 ========
            {
                panel2.setBackground(new Color(80, 69, 57));
                panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel2.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Project Management");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                panel2.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel2, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.RELATED_GAP_COLSPEC },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Batch Location Creation");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, cc.xy(1, 1));

        //======== panel1 ========
        {
            panel1.setOpaque(false);
            panel1.setBorder(Borders.DLU4_BORDER);
            panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] {
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

            //======== contentPanel ========
            {
                contentPanel.setOpaque(false);
                contentPanel.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, 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.LABEL_COMPONENT_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        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.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC }));

                //---- label1 ----
                label1.setText("Building");
                ATFieldInfo.assignLabelInfo(label1, Locations.class, Locations.PROPERTYNAME_BUILDING);
                contentPanel.add(label1, cc.xy(1, 1));
                contentPanel.add(building, cc.xywh(3, 1, 9, 1));

                //---- label2 ----
                label2.setText("Floor");
                ATFieldInfo.assignLabelInfo(label2, Locations.class, Locations.PROPERTYNAME_FLOOR);
                contentPanel.add(label2, cc.xy(1, 3));
                contentPanel.add(floor, cc.xywh(3, 3, 9, 1));

                //---- label3 ----
                label3.setText("Room");
                ATFieldInfo.assignLabelInfo(label3, Locations.class, Locations.PROPERTYNAME_ROOM);
                contentPanel.add(label3, cc.xy(1, 5));
                contentPanel.add(room, cc.xywh(3, 5, 9, 1));

                //---- label4 ----
                label4.setText("Area");
                ATFieldInfo.assignLabelInfo(label4, Locations.class, Locations.PROPERTYNAME_AREA);
                contentPanel.add(label4, cc.xy(1, 7));
                contentPanel.add(area, cc.xywh(3, 7, 9, 1));

                //---- label12 ----
                label12.setText("Label");
                contentPanel.add(label12, cc.xy(3, 9));

                //---- label13 ----
                label13.setText("Start");
                contentPanel.add(label13, cc.xy(5, 9));

                //---- label14 ----
                label14.setText("End");
                contentPanel.add(label14, cc.xy(9, 9));

                //---- label5 ----
                label5.setText("Coordinate 1");
                contentPanel.add(label5, cc.xy(1, 11));

                //---- coordinate1Label ----
                coordinate1Label.setColumns(8);
                contentPanel.add(coordinate1Label, cc.xy(3, 11));

                //---- coordinate1Start ----
                coordinate1Start.setColumns(3);
                contentPanel.add(coordinate1Start, cc.xy(5, 11));

                //---- label6 ----
                label6.setText("-");
                contentPanel.add(label6, cc.xy(7, 11));

                //---- coordinate1End ----
                coordinate1End.setColumns(3);
                contentPanel.add(coordinate1End, cc.xy(9, 11));

                //---- label7 ----
                label7.setText("Coordinate 2");
                contentPanel.add(label7, cc.xy(1, 13));

                //---- coordinate2Label ----
                coordinate2Label.setColumns(8);
                contentPanel.add(coordinate2Label, cc.xy(3, 13));

                //---- coordinate2Start ----
                coordinate2Start.setColumns(3);
                contentPanel.add(coordinate2Start, cc.xy(5, 13));

                //---- label9 ----
                label9.setText("-");
                contentPanel.add(label9, cc.xy(7, 13));

                //---- coordinate2End ----
                coordinate2End.setColumns(3);
                contentPanel.add(coordinate2End, cc.xy(9, 13));

                //---- label8 ----
                label8.setText("Coordinate 3");
                contentPanel.add(label8, cc.xy(1, 15));

                //---- coordinate3Label ----
                coordinate3Label.setColumns(8);
                contentPanel.add(coordinate3Label, cc.xy(3, 15));

                //---- coordinate3Start ----
                coordinate3Start.setColumns(3);
                contentPanel.add(coordinate3Start, cc.xy(5, 15));

                //---- label10 ----
                label10.setText("-");
                contentPanel.add(label10, cc.xy(7, 15));

                //---- coordinate3End ----
                coordinate3End.setColumns(3);
                contentPanel.add(coordinate3End, cc.xy(9, 15));

                //---- label11 ----
                label11.setText("Repository");
                label11.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label11, Locations.class, Locations.PROPERTYNAME_REPOSITORY);
                contentPanel.add(label11, cc.xy(1, 17));

                //---- repository ----
                repository.setOpaque(false);
                repository.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                contentPanel.add(repository, cc.xywh(3, 17, 9, 1));
            }
            panel1.add(contentPanel, cc.xy(1, 1));

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

                //---- generateButton ----
                generateButton.setText("Generate");
                generateButton.setOpaque(false);
                generateButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        generateButtonActionPerformed(e);
                    }
                });
                buttonBar.add(generateButton, cc.xy(2, 1));

                //---- doneButton ----
                doneButton.setText("Done");
                doneButton.setOpaque(false);
                doneButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        doneButtonActionPerformed(e);
                    }
                });
                buttonBar.add(doneButton, cc.xy(4, 1));
            }
            panel1.add(buttonBar, cc.xywh(1, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
        }
        dialogPane.add(panel1, cc.xy(1, 3));
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.dialog.DigitalObjectLookup.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    mainHeaderPanel = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    contentPane = new JPanel();
    label3 = new JLabel();
    label4 = new JLabel();
    scrollPane1 = new JScrollPane();
    lookupTable = new DomainSortableTable();
    label1 = new JLabel();
    filterField = new JTextField();
    buttonBar = new JPanel();
    linkButton = new JButton();
    doneButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);//  ww  w .  j  a v  a  2  s.c om
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            thisWindowClosing();
        }
    });
    Container contentPane2 = getContentPane();
    contentPane2.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new BorderLayout());

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== mainHeaderPanel ========
            {
                mainHeaderPanel.setBackground(new Color(80, 35, 45));
                mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                mainHeaderPanel
                        .setLayout(
                                new FormLayout(
                                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW) },
                                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC,
                                                FormFactory.DEFAULT_ROWSPEC,
                                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Main Header");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.UNRELATED_GAP_COLSPEC },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Lookup Digital Object");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, BorderLayout.NORTH);

        //======== contentPane ========
        {
            contentPane.setBackground(new Color(231, 188, 251));
            contentPane.setOpaque(false);
            contentPane
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC,
                                            FormFactory.DEFAULT_COLSPEC,
                                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                    FormSpec.DEFAULT_GROW),
                                            FormFactory.UNRELATED_GAP_COLSPEC },
                                    new RowSpec[] { FormFactory.UNRELATED_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),
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.UNRELATED_GAP_ROWSPEC }));

            //---- label3 ----
            label3.setText("Double click on a Digital Object to select it.");
            contentPane.add(label3, cc.xywh(2, 2, 3, 1));

            //---- label4 ----
            label4.setText("Or hit enter if a Digital Object is highlighted.");
            contentPane.add(label4, cc.xywh(2, 4, 3, 1));

            //======== scrollPane1 ========
            {
                scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

                //---- lookupTable ----
                lookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300));
                lookupTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        lookupTableMouseClicked(e);
                    }
                });
                lookupTable.addKeyListener(new KeyAdapter() {
                    @Override
                    public void keyTyped(KeyEvent e) {
                        lookupTableKeyTyped(e);
                    }
                });
                scrollPane1.setViewportView(lookupTable);
            }
            contentPane.add(scrollPane1, cc.xywh(2, 6, 3, 1));

            //---- label1 ----
            label1.setText("Filter:");
            contentPane.add(label1, cc.xy(2, 8));
            contentPane.add(filterField, cc.xy(4, 8));

            //======== buttonBar ========
            {
                buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
                buttonBar.setBackground(new Color(231, 188, 251));
                buttonBar.setOpaque(false);
                buttonBar
                        .setLayout(new FormLayout(
                                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC,
                                        FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                                RowSpec.decodeSpecs("pref")));

                //---- linkButton ----
                linkButton.setText("Link");
                linkButton.setOpaque(false);
                linkButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        linkButtonActionPerformed();
                    }
                });
                buttonBar.add(linkButton, cc.xy(3, 1));

                //---- doneButton ----
                doneButton.setText("Close Window");
                doneButton.setOpaque(false);
                doneButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        doneButtonActionPerformed(e);
                    }
                });
                buttonBar.add(doneButton, cc.xy(7, 1));
            }
            contentPane.add(buttonBar, cc.xywh(2, 10, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
        }
        dialogPane.add(contentPane, BorderLayout.CENTER);
    }
    contentPane2.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.dialog.ErrorDialog.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    cardPanel = new JPanel();
    contentPanel = new JPanel();
    panel2 = new JPanel();
    label2 = new JLabel();
    label1 = new JLabel();
    errorMessageScrollPane2 = new JScrollPane();
    errorMessageBozo = new JTextArea();
    panel1 = new JPanel();
    toggleDetails = new JToggleButton();
    toggleDetailsLabel = new JLabel();
    errorTextScrollPane = new JScrollPane();
    errorText = new JTextArea();
    errorPanel = new JPanel();
    label3 = new JLabel();
    label4 = new JLabel();
    errorMessageScrollPane = new JScrollPane();
    errorMessage = new JTextArea();
    buttonBar = new JPanel();
    submitBugReport = new JButton();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);//from w ww.  ja v a  2  s.  c om
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new BorderLayout());

        //======== cardPanel ========
        {
            cardPanel.setOpaque(false);
            cardPanel.setLayout(new CardLayout());

            //======== contentPanel ========
            {
                contentPanel.setOpaque(false);
                contentPanel.setPreferredSize(new Dimension(682, 450));
                contentPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("max(default;600px):grow"),
                        new 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) }));

                //======== panel2 ========
                {
                    panel2.setOpaque(false);
                    panel2.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                            RowSpec.decodeSpecs("default")));

                    //---- label2 ----
                    label2.setIcon(new ImageIcon(
                            getClass().getResource("/org/archiviststoolkit/resources/images/bug.png")));
                    panel2.add(label2, cc.xy(1, 1));

                    //---- label1 ----
                    label1.setText("An error has occured");
                    panel2.add(label1, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));
                }
                contentPanel.add(panel2, cc.xy(1, 1));

                //======== errorMessageScrollPane2 ========
                {
                    errorMessageScrollPane2.setOpaque(false);
                    errorMessageScrollPane2.setBorder(null);

                    //---- errorMessageBozo ----
                    errorMessageBozo.setBackground(new Color(200, 205, 232));
                    errorMessageBozo.setBorder(null);
                    errorMessageBozo.setLineWrap(true);
                    errorMessageBozo.setWrapStyleWord(true);
                    errorMessageBozo.setRows(2);
                    errorMessageBozo.setEditable(false);
                    errorMessageScrollPane2.setViewportView(errorMessageBozo);
                }
                contentPanel.add(errorMessageScrollPane2, cc.xy(1, 3));

                //======== panel1 ========
                {
                    panel1.setOpaque(false);
                    panel1.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                            RowSpec.decodeSpecs("default")));

                    //---- toggleDetails ----
                    toggleDetails.setOpaque(false);
                    toggleDetails.setIcon(new ImageIcon(
                            getClass().getResource("/org/archiviststoolkit/resources/images/toggleDown.png")));
                    toggleDetails.setBorder(null);
                    toggleDetails.setSelectedIcon(new ImageIcon(
                            getClass().getResource("/org/archiviststoolkit/resources/images/toggleUp.png")));
                    toggleDetails.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            toggleDetailsActionPerformed();
                        }
                    });
                    panel1.add(toggleDetails, cc.xy(1, 1));

                    //---- toggleDetailsLabel ----
                    toggleDetailsLabel.setText("Show Details");
                    panel1.add(toggleDetailsLabel, cc.xy(3, 1));
                }
                contentPanel.add(panel1, cc.xy(1, 5));

                //======== errorTextScrollPane ========
                {
                    errorTextScrollPane
                            .setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

                    //---- errorText ----
                    errorText.setRows(15);
                    errorText.setLineWrap(true);
                    errorText.setEditable(false);
                    errorTextScrollPane.setViewportView(errorText);
                }
                contentPanel.add(errorTextScrollPane,
                        cc.xywh(1, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));
            }
            cardPanel.add(contentPanel, "bozo");

            //======== errorPanel ========
            {
                errorPanel.setOpaque(false);
                errorPanel.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }));

                //---- label3 ----
                label3.setIcon(new ImageIcon(
                        getClass().getResource("/org/archiviststoolkit/resources/images/error.png")));
                errorPanel.add(label3, cc.xy(1, 1));

                //---- label4 ----
                label4.setText("An error has occured");
                errorPanel.add(label4, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));

                //======== errorMessageScrollPane ========
                {
                    errorMessageScrollPane.setOpaque(false);
                    errorMessageScrollPane.setBorder(null);

                    //---- errorMessage ----
                    errorMessage.setBackground(new Color(200, 205, 232));
                    errorMessage.setBorder(null);
                    errorMessage.setLineWrap(true);
                    errorMessage.setWrapStyleWord(true);
                    errorMessage.setRows(4);
                    errorMessage.setEditable(false);
                    errorMessageScrollPane.setViewportView(errorMessage);
                }
                errorPanel.add(errorMessageScrollPane, cc.xywh(1, 3, 3, 1));
            }
            cardPanel.add(errorPanel, "error");
        }
        dialogPane.add(cardPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setOpaque(false);
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                    RowSpec.decodeSpecs("pref")));

            //---- submitBugReport ----
            submitBugReport.setText("Submit Bug Report");
            submitBugReport.setOpaque(false);
            submitBugReport.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    submitBugReportActionPerformed(e);
                }
            });
            buttonBar.add(submitBugReport, cc.xy(2, 1));

            //---- okButton ----
            okButton.setText("OK");
            okButton.setOpaque(false);
            okButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed(e);
                }
            });
            buttonBar.add(okButton, cc.xy(6, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
    toggleDetails.setSelected(true);
    toggleTextAndView();

}

From source file:org.archiviststoolkit.dialog.GeneralAdminDialog.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    dialogTitle = new JLabel();
    scrollPane1 = new JScrollPane();
    contentTable = new DomainSortableTable();
    buttonBar = new JPanel();
    batchAddButton = new JButton();
    addRecordButton = new JButton();
    removeRecordButton = new JButton();
    doneButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);//w  w  w. j a va2  s  .  com
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setOpaque(false);
            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),
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

            //---- dialogTitle ----
            dialogTitle.setText("dialogTitle");
            dialogTitle.setFont(new Font("Lucida Grande", Font.BOLD, 16));
            contentPanel.add(dialogTitle, cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

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

                //---- contentTable ----
                contentTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        contentTableMouseClicked(e);
                    }
                });
                scrollPane1.setViewportView(contentTable);
            }
            contentPanel.add(scrollPane1, cc.xy(1, 3));

            //======== buttonBar ========
            {
                buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
                buttonBar.setOpaque(false);
                buttonBar.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.GLUE_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                        RowSpec.decodeSpecs("pref")));

                //---- batchAddButton ----
                batchAddButton.setText("Batch Add");
                batchAddButton.setOpaque(false);
                batchAddButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        batchAddButtonActionPerformed(e);
                    }
                });
                buttonBar.add(batchAddButton, cc.xy(2, 1));

                //---- addRecordButton ----
                addRecordButton.setText("Add Record");
                addRecordButton.setOpaque(false);
                addRecordButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        addRecordButtonActionPerformed(e);
                    }
                });
                buttonBar.add(addRecordButton, cc.xy(6, 1));

                //---- removeRecordButton ----
                removeRecordButton.setText("Remove Records");
                removeRecordButton.setOpaque(false);
                removeRecordButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        removeRecordButtonActionPerformed(e);
                    }
                });
                buttonBar.add(removeRecordButton, cc.xy(8, 1));

                //---- doneButton ----
                doneButton.setText("Done");
                doneButton.setOpaque(false);
                doneButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        doneButtonActionPerformed(e);
                    }
                });
                buttonBar.add(doneButton, cc.xy(12, 1));
            }
            contentPanel.add(buttonBar, cc.xy(1, 5));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.dialog.JiraReportDialog.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    panel2 = new JPanel();
    label3 = new JLabel();
    label4 = new JLabel();
    label1 = new JLabel();
    summary = new JTextField();
    label2 = new JLabel();
    scrollPane1 = new JScrollPane();
    detailedDescription = new JTextArea();
    panel1 = new JPanel();
    label5 = new JLabel();
    emailAddress = new JTextField();
    label6 = new JLabel();
    fullName = new JTextField();
    buttonBar = new JPanel();
    cancelButton = new JButton();
    sendButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);//  w w  w .  j a v a2 s  .  com
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setOpaque(false);
            contentPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("max(default;600px):grow"),
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_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.DEFAULT_ROWSPEC }));

            //======== panel2 ========
            {
                panel2.setOpaque(false);
                panel2.setLayout(
                        new FormLayout(
                                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                                RowSpec.decodeSpecs("default")));

                //---- label3 ----
                label3.setIcon(new ImageIcon(
                        getClass().getResource("/org/archiviststoolkit/resources/images/bug.png")));
                panel2.add(label3, cc.xy(1, 1));

                //---- label4 ----
                label4.setText("Bug Reporter");
                label4.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
                panel2.add(label4, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));
            }
            contentPanel.add(panel2, cc.xy(1, 1));

            //---- label1 ----
            label1.setText("Please enter a brief summary...");
            label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            contentPanel.add(label1, cc.xy(1, 3));
            contentPanel.add(summary, cc.xy(1, 5));

            //---- label2 ----
            label2.setText("...and a detailed description");
            label2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            contentPanel.add(label2, cc.xy(1, 7));

            //======== scrollPane1 ========
            {
                scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

                //---- detailedDescription ----
                detailedDescription.setRows(20);
                detailedDescription.setLineWrap(true);
                scrollPane1.setViewportView(detailedDescription);
            }
            contentPanel.add(scrollPane1, cc.xy(1, 9));

            //======== panel1 ========
            {
                panel1.setOpaque(false);
                panel1.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC }));

                //---- label5 ----
                label5.setText("Email Address");
                panel1.add(label5, cc.xy(1, 1));
                panel1.add(emailAddress, cc.xy(3, 1));

                //---- label6 ----
                label6.setText("Full Name");
                panel1.add(label6, cc.xy(1, 3));
                panel1.add(fullName, cc.xy(3, 3));
            }
            contentPanel.add(panel1, cc.xy(1, 11));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setOpaque(false);
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                    RowSpec.decodeSpecs("pref")));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            cancelButton.setOpaque(false);
            cancelButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    cancelButtonActionPerformed(e);
                }
            });
            buttonBar.add(cancelButton, cc.xy(4, 1));

            //---- sendButton ----
            sendButton.setText("Send");
            sendButton.setOpaque(false);
            sendButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    sendButtonActionPerformed(e);
                }
            });
            buttonBar.add(sendButton, cc.xy(6, 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:org.archiviststoolkit.dialog.LocationAssignmentAccessions.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    mainHeaderPanel = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    contentPane = new JPanel();
    label1 = new JLabel();
    filterField = new JTextField();
    scrollPane1 = new JScrollPane();
    locationLookupTable = new DomainSortableTable(Locations.class, filterField);
    linkingPanel = new JPanel();
    label3 = new JLabel();
    label4 = new JLabel();
    noteContainerLabel = new JTextField();
    note = new JTextField();
    buttonBar = new JPanel();
    linkLocationButton = new JButton();
    createLocationButton = new JButton();
    doneButton = new JButton();
    selectPanel = new JPanel();
    buttonBar2 = new JPanel();
    selectButton = new JButton();
    cancelButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);//w ww . j a  v  a2 s.c o m
    Container contentPane2 = getContentPane();
    contentPane2.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new BorderLayout());

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== mainHeaderPanel ========
            {
                mainHeaderPanel.setBackground(new Color(80, 69, 57));
                mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                mainHeaderPanel
                        .setLayout(
                                new FormLayout(
                                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW) },
                                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC,
                                                FormFactory.DEFAULT_ROWSPEC,
                                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Main Header");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Location Lookup");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, BorderLayout.NORTH);

        //======== contentPane ========
        {
            contentPane.setBackground(new Color(231, 188, 251));
            contentPane.setOpaque(false);
            contentPane
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC,
                                            FormFactory.DEFAULT_COLSPEC,
                                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                    FormSpec.DEFAULT_GROW),
                                            FormFactory.UNRELATED_GAP_COLSPEC },
                                    new RowSpec[] { FormFactory.UNRELATED_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_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.UNRELATED_GAP_ROWSPEC }));

            //---- label1 ----
            label1.setText("Filter:");
            contentPane.add(label1, cc.xy(2, 2));
            contentPane.add(filterField, cc.xy(4, 2));

            //======== scrollPane1 ========
            {
                scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

                //---- locationLookupTable ----
                locationLookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300));
                locationLookupTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        subjectLookupTableMouseClicked(e);
                    }
                });
                locationLookupTable.addKeyListener(new KeyAdapter() {
                    @Override
                    public void keyTyped(KeyEvent e) {
                        locationLookupTableKeyTyped(e);
                    }
                });
                scrollPane1.setViewportView(locationLookupTable);
            }
            contentPane.add(scrollPane1, cc.xywh(2, 4, 3, 1));

            //======== linkingPanel ========
            {
                linkingPanel.setOpaque(false);
                linkingPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                        new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                FormFactory.DEFAULT_ROWSPEC }));

                //---- label3 ----
                label3.setText("Double click on a Location to add it to the record.");
                linkingPanel.add(label3, cc.xy(1, 1));

                //---- label4 ----
                label4.setText("Or hit enter if a Location is highlighted.");
                linkingPanel.add(label4, cc.xy(1, 3));

                //---- noteContainerLabel ----
                noteContainerLabel.setText("Note/Container information");
                noteContainerLabel.setOpaque(false);
                noteContainerLabel.setBorder(null);
                linkingPanel.add(noteContainerLabel, cc.xy(1, 5));
                linkingPanel.add(note, cc.xy(1, 7));

                //======== buttonBar ========
                {
                    buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
                    buttonBar.setBackground(new Color(231, 188, 251));
                    buttonBar.setOpaque(false);
                    buttonBar.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC,
                                    FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                            RowSpec.decodeSpecs("pref")));

                    //---- linkLocationButton ----
                    linkLocationButton.setText("Link");
                    linkLocationButton.setOpaque(false);
                    linkLocationButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            linkLocationButtonActionPerformed();
                        }
                    });
                    buttonBar.add(linkLocationButton, cc.xy(1, 1));

                    //---- createLocationButton ----
                    createLocationButton.setText("Create Location");
                    createLocationButton.setBackground(new Color(231, 188, 251));
                    createLocationButton.setOpaque(false);
                    createLocationButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            createLocationButtonActionPerformed(e);
                        }
                    });
                    buttonBar.add(createLocationButton, cc.xy(3, 1));

                    //---- doneButton ----
                    doneButton.setText("Close Window");
                    doneButton.setBackground(new Color(231, 188, 251));
                    doneButton.setOpaque(false);
                    doneButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            doneButtonActionPerformed(e);
                        }
                    });
                    buttonBar.add(doneButton, cc.xy(5, 1));
                }
                linkingPanel.add(buttonBar,
                        cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
            }
            contentPane.add(linkingPanel, cc.xywh(2, 6, 3, 1));

            //======== selectPanel ========
            {
                selectPanel.setOpaque(false);
                selectPanel.setLayout(new FormLayout("default:grow", "default"));

                //======== buttonBar2 ========
                {
                    buttonBar2.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
                    buttonBar2.setBackground(new Color(231, 188, 251));
                    buttonBar2.setOpaque(false);
                    buttonBar2
                            .setLayout(new FormLayout(
                                    new ColumnSpec[] { FormFactory.BUTTON_COLSPEC,
                                            FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                                    RowSpec.decodeSpecs("pref")));

                    //---- selectButton ----
                    selectButton.setText("Select");
                    selectButton.setOpaque(false);
                    selectButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            selectButtonActionPerformed();
                        }
                    });
                    buttonBar2.add(selectButton, cc.xy(1, 1));

                    //---- cancelButton ----
                    cancelButton.setText("Cancel");
                    cancelButton.setOpaque(false);
                    cancelButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            doneButtonActionPerformed(e);
                        }
                    });
                    buttonBar2.add(cancelButton, cc.xy(3, 1));
                }
                selectPanel.add(buttonBar2,
                        cc.xywh(1, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
            }
            contentPane.add(selectPanel, cc.xywh(2, 8, 3, 1));
        }
        dialogPane.add(contentPane, BorderLayout.CENTER);
    }
    contentPane2.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.dialog.LocationAssignmentResources.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    panel2 = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    contentPane = new JPanel();
    label3 = new JLabel();
    scrollPane1 = new JScrollPane();
    containerList = new JList();
    separator5 = new JSeparator();
    label1 = new JLabel();
    panel1 = new JPanel();
    label2 = new JLabel();
    filterField = new JTextField();
    scrollPane2 = new JScrollPane();
    locationLookupTable = new DomainSortableTable(Locations.class, filterField);
    buttonBar = new JPanel();
    assignLocation = new JButton();
    removeAssignedLocationButton = new JButton();
    createLocationButton = new JButton();
    doneButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);// w w  w.ja va2  s.  co m
    Container contentPane2 = getContentPane();
    contentPane2.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setMinimumSize(new Dimension(640, 836));
        dialogPane.setLayout(new BorderLayout());

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== panel2 ========
            {
                panel2.setBackground(new Color(73, 43, 104));
                panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel2.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Resources");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                panel2.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel2, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Assign Locations");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, BorderLayout.NORTH);

        //======== contentPane ========
        {
            contentPane.setBackground(new Color(231, 188, 251));
            contentPane.setMinimumSize(new Dimension(600, 600));
            contentPane.setOpaque(false);
            contentPane
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC,
                                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                    FormSpec.DEFAULT_GROW),
                                            FormFactory.UNRELATED_GAP_COLSPEC },
                                    new RowSpec[] { FormFactory.UNRELATED_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.UNRELATED_GAP_ROWSPEC }));

            //---- label3 ----
            label3.setText("Containers");
            contentPane.add(label3, cc.xy(2, 2));

            //======== scrollPane1 ========
            {
                scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
                scrollPane1.setPreferredSize(new Dimension(600, 300));

                //---- containerList ----
                containerList.setVisibleRowCount(20);
                scrollPane1.setViewportView(containerList);
            }
            contentPane.add(scrollPane1, cc.xy(2, 4));

            //---- separator5 ----
            separator5.setBackground(new Color(220, 220, 232));
            separator5.setForeground(new Color(147, 131, 86));
            separator5.setMinimumSize(new Dimension(1, 10));
            separator5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            contentPane.add(separator5, cc.xywh(1, 6, 3, 1));

            //---- label1 ----
            label1.setText("Locations");
            contentPane.add(label1, cc.xy(2, 7));

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

                //---- label2 ----
                label2.setText("Filter:");
                panel1.add(label2, cc.xy(1, 1));
                panel1.add(filterField, cc.xy(3, 1));
            }
            contentPane.add(panel1, cc.xy(2, 9));

            //======== scrollPane2 ========
            {
                scrollPane2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
                scrollPane2.setPreferredSize(new Dimension(600, 300));

                //---- locationLookupTable ----
                locationLookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300));
                scrollPane2.setViewportView(locationLookupTable);
            }
            contentPane.add(scrollPane2, cc.xy(2, 11));

            //======== buttonBar ========
            {
                buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
                buttonBar.setBackground(new Color(231, 188, 251));
                buttonBar.setOpaque(false);
                buttonBar.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                        RowSpec.decodeSpecs("pref")));

                //---- assignLocation ----
                assignLocation.setText("Add Location Link");
                assignLocation.setBackground(new Color(231, 188, 251));
                assignLocation.setOpaque(false);
                assignLocation.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        assignLocationButtonActionPerformed(e);
                    }
                });
                buttonBar.add(assignLocation, cc.xy(2, 1));

                //---- removeAssignedLocationButton ----
                removeAssignedLocationButton.setText("Remove Location Link");
                removeAssignedLocationButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        removeAssignedLocationButtonActionPerformed(e);
                    }
                });
                buttonBar.add(removeAssignedLocationButton, cc.xy(4, 1));

                //---- createLocationButton ----
                createLocationButton.setText("Create Location");
                createLocationButton.setBackground(new Color(231, 188, 251));
                createLocationButton.setOpaque(false);
                createLocationButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        createLocationButtonActionPerformed(e);
                    }
                });
                buttonBar.add(createLocationButton, cc.xy(6, 1));

                //---- doneButton ----
                doneButton.setText("Done");
                doneButton.setBackground(new Color(231, 188, 251));
                doneButton.setOpaque(false);
                doneButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        doneButtonActionPerformed(e);
                    }
                });
                buttonBar.add(doneButton, cc.xy(8, 1));
            }
            contentPane.add(buttonBar, cc.xywh(1, 13, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
        }
        dialogPane.add(contentPane, BorderLayout.CENTER);
    }
    contentPane2.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.dialog.NameAuthorityLookup.java

License:Open Source License

private void initComponents() {

    setModal(true);/*  w w  w .j av  a 2  s. co  m*/

    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    mainHeaderPanel = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    contentPane = new JPanel();
    label1 = new JLabel();
    nameLookup = new JTextField();
    scrollPane1 = new JScrollPane();
    namesLookupTable = new DomainSortableTable(Names.class, nameLookup);
    linkingPanel = new JPanel();
    label4 = new JLabel();
    label3 = new JLabel();
    label_function = new JLabel();
    function = new JComboBox();
    label_role = new JLabel();
    role = new JComboBox();
    label_form = new JLabel();
    form = new JComboBox();
    buttonBarLinking = new JPanel();
    linkButton = new JButton();
    createName = new JButton();
    doneButton = new JButton();
    selectPanel = new JPanel();
    selectButton = new JButton();
    doneButton2 = new JButton();
    CellConstraints cc = new CellConstraints();

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

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new BorderLayout());

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== mainHeaderPanel ========
            {
                mainHeaderPanel.setBackground(new Color(80, 69, 57));
                mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                mainHeaderPanel
                        .setLayout(
                                new FormLayout(
                                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW) },
                                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC,
                                                FormFactory.DEFAULT_ROWSPEC,
                                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Main Header");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Name Lookup");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, BorderLayout.NORTH);

        //======== contentPane ========
        {
            contentPane.setOpaque(false);
            contentPane
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC,
                                            FormFactory.DEFAULT_COLSPEC,
                                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                    FormSpec.DEFAULT_GROW),
                                            FormFactory.UNRELATED_GAP_COLSPEC },
                                    new RowSpec[] { FormFactory.UNRELATED_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_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.UNRELATED_GAP_ROWSPEC }));

            //---- label1 ----
            label1.setText("Filter:");
            contentPane.add(label1, cc.xy(2, 2));
            contentPane.add(nameLookup, cc.xy(4, 2));

            //======== scrollPane1 ========
            {
                scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

                //---- namesLookupTable ----
                namesLookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300));
                namesLookupTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        namesLookupTableMouseClicked(e);
                    }
                });
                namesLookupTable.addKeyListener(new KeyAdapter() {
                    @Override
                    public void keyTyped(KeyEvent e) {
                        namesLookupTableKeyTyped(e);
                    }
                });
                scrollPane1.setViewportView(namesLookupTable);
            }
            contentPane.add(scrollPane1, cc.xywh(2, 4, 3, 1));

            //======== linkingPanel ========
            {
                linkingPanel.setOpaque(false);
                linkingPanel
                        .setLayout(
                                new FormLayout(
                                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW) },
                                        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.DEFAULT_ROWSPEC }));

                //---- label4 ----
                label4.setText("Double click on a Name to add it to the record.");
                linkingPanel.add(label4, cc.xywh(1, 1, 3, 1));

                //---- label3 ----
                label3.setText("Or hit enter if a Term is highlighted.");
                linkingPanel.add(label3, cc.xywh(1, 3, 3, 1));

                //---- label_function ----
                label_function.setText("Function");
                linkingPanel.add(label_function, cc.xy(1, 5));

                //---- function ----
                function.setOpaque(false);
                function.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        functionActionPerformed(e);
                    }
                });
                linkingPanel.add(function, cc.xywh(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //---- label_role ----
                label_role.setText("Role");
                linkingPanel.add(label_role, cc.xy(1, 7));

                //---- role ----
                role.setOpaque(false);
                linkingPanel.add(role, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //---- label_form ----
                label_form.setText("Form Subdivision");
                linkingPanel.add(label_form, cc.xy(1, 9));

                //---- form ----
                form.setOpaque(false);
                linkingPanel.add(form, cc.xywh(3, 9, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //======== buttonBarLinking ========
                {
                    buttonBarLinking.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
                    buttonBarLinking.setBackground(new Color(231, 188, 251));
                    buttonBarLinking.setOpaque(false);
                    buttonBarLinking.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC,
                                    FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                            RowSpec.decodeSpecs("pref")));

                    //---- linkButton ----
                    linkButton.setText("Link");
                    linkButton.setOpaque(false);
                    linkButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            linkButtonActionPerformed();
                        }
                    });
                    buttonBarLinking.add(linkButton, cc.xy(1, 1));

                    //---- createName ----
                    createName.setText("Create Name");
                    createName.setBackground(new Color(231, 188, 251));
                    createName.setOpaque(false);
                    createName.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            createNameActionPerformed(e);
                        }
                    });
                    buttonBarLinking.add(createName, cc.xy(3, 1));

                    //---- doneButton ----
                    doneButton.setText("Close Window");
                    doneButton.setBackground(new Color(231, 188, 251));
                    doneButton.setOpaque(false);
                    doneButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            doneButtonActionPerformed(e);
                        }
                    });
                    buttonBarLinking.add(doneButton, cc.xy(5, 1));
                }
                linkingPanel.add(buttonBarLinking,
                        cc.xywh(1, 11, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
            }
            contentPane.add(linkingPanel, cc.xywh(2, 6, 3, 1));

            //======== selectPanel ========
            {
                selectPanel.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
                selectPanel.setBackground(new Color(231, 188, 251));
                selectPanel.setOpaque(false);
                selectPanel
                        .setLayout(new FormLayout(
                                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC,
                                        FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                                RowSpec.decodeSpecs("pref")));

                //---- selectButton ----
                selectButton.setText("Select");
                selectButton.setOpaque(false);
                selectButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        selectButtonActionPerformed();
                    }
                });
                selectPanel.add(selectButton, cc.xy(3, 1));

                //---- doneButton2 ----
                doneButton2.setText("Cancel");
                doneButton2.setBackground(new Color(231, 188, 251));
                doneButton2.setOpaque(false);
                doneButton2.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        doneButtonActionPerformed(e);
                    }
                });
                selectPanel.add(doneButton2, cc.xy(5, 1));
            }
            contentPane.add(selectPanel, cc.xywh(1, 8, 4, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
        }
        dialogPane.add(contentPane, BorderLayout.CENTER);
    }
    contentPane2.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}