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

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

Introduction

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

Prototype

ComponentSize DEFAULT

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

Click Source Link

Document

Use the maximum of all component sizes as column or row size; measures preferred sizes when asked for the preferred size and minimum sizes when asked for the minimum size.

Usage

From source file:org.antlr.works.dialog.FindAndReplaceDialog.java

License:BSD License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Open Source Project license - ANTLR (www.antlr.org)
    label1 = new JLabel();
    findField = new JTextField();
    label2 = new JLabel();
    replaceField = new JTextField();
    ignoreCaseButton = new JCheckBox();
    regexButton = new JCheckBox();
    optionsCombo = new JComboBox();
    replaceAllButton = new JButton();
    replaceButton = new JButton();
    replaceAndFindButton = new JButton();
    previousButton = new JButton();
    nextButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout(
            new ColumnSpec[] { new ColumnSpec(Sizes.DLUX5), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.NO_GROW),
                    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),
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.DLUX5) },
            new RowSpec[] { new RowSpec(Sizes.DLUY5), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    new RowSpec(Sizes.DLUY5) }));

    //---- label1 ----
    label1.setText("Find:");
    contentPane.add(label1, cc.xy(3, 3));
    contentPane.add(findField, cc.xywh(5, 3, 9, 1));

    //---- label2 ----
    label2.setText("Replace by:");
    contentPane.add(label2, cc.xy(3, 5));
    contentPane.add(replaceField, cc.xywh(5, 5, 9, 1));

    //---- ignoreCaseButton ----
    ignoreCaseButton.setText("Ignore case");
    contentPane.add(ignoreCaseButton, cc.xy(5, 7));

    //---- regexButton ----
    regexButton.setText("Regular expression");
    contentPane.add(regexButton, cc.xy(7, 7));

    //---- optionsCombo ----
    optionsCombo.setModel(//from w  ww .  j  a v a2  s .com
            new DefaultComboBoxModel(new String[] { "Contains", "Starts with", "Whole words", "Ends with" }));
    contentPane.add(optionsCombo, cc.xywh(11, 7, 3, 1));

    //---- replaceAllButton ----
    replaceAllButton.setText("Replace All");
    contentPane.add(replaceAllButton, cc.xy(3, 11));

    //---- replaceButton ----
    replaceButton.setText("Replace");
    contentPane.add(replaceButton, cc.xy(5, 11));

    //---- replaceAndFindButton ----
    replaceAndFindButton.setText("Replace & Find");
    contentPane.add(replaceAndFindButton, cc.xy(7, 11));

    //---- previousButton ----
    previousButton.setText("Previous");
    contentPane.add(previousButton, cc.xy(11, 11));

    //---- nextButton ----
    nextButton.setText("Next");
    contentPane.add(nextButton, cc.xy(13, 11));
    pack();
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.antlr.works.dialog.NewWizardDialog.java

License:BSD License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Ryan Paul Talusan
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label1 = new JLabel();
    grammarNameField = new JTextField();
    label2 = new JLabel();
    grammarTypeComboBox = new JComboBox();
    lexicalItemPanel = new JPanel();
    lexLeftPanel = new JPanel();
    cbIdentifier = new JCheckBox();
    cbInteger = new JCheckBox();
    cbFloat = new JCheckBox();
    cbComments = new JCheckBox();
    commentsPanel = new JPanel();
    cbSingleLine = new JCheckBox();
    cbMultiLine = new JCheckBox();
    lexRightPanel = new JPanel();
    cbString = new JCheckBox();
    stringPanel = new JPanel();
    singleQuoteRadio = new JRadioButton();
    doubleQuoteRadio = new JRadioButton();
    cbCharacters = new JCheckBox();
    cbWhiteSpace = new JCheckBox();
    wsPanel = new JPanel();
    cbTabChar = new JCheckBox();
    cbNewlineChar = new JCheckBox();
    cbCarriageReturnChar = new JCheckBox();
    buttonBar = new JPanel();
    okButton = new JButton();
    cancelButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle("New Grammar Wizard");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {/*from   w ww . j  a  va 2  s  . c  om*/
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.NO_GROW),
                            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.UNRELATED_GAP_ROWSPEC,
                            new RowSpec(RowSpec.TOP, Sizes.DEFAULT, RowSpec.DEFAULT_GROW) }));

            //---- label1 ----
            label1.setText("Grammar Name:");
            contentPanel.add(label1, cc.xy(3, 1));
            contentPanel.add(grammarNameField, cc.xywh(5, 1, 3, 1));

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

            //---- grammarTypeComboBox ----
            grammarTypeComboBox.setModel(new DefaultComboBoxModel(
                    new String[] { "Parser", "Lexer", "Tree Grammar", "Combined Grammar" }));
            grammarTypeComboBox.setSelectedIndex(3);
            grammarTypeComboBox.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent event) {
                    switch (grammarTypeComboBox.getSelectedIndex()) {
                    case GRAMMAR_TYPE_PARSER:
                    case GRAMMAR_TYPE_TREE_GRAMMAR:
                        cbIdentifier.setEnabled(false);
                        cbInteger.setEnabled(false);
                        cbFloat.setEnabled(false);
                        cbComments.setEnabled(false);
                        cbSingleLine.setEnabled(false);
                        cbMultiLine.setEnabled(false);
                        cbString.setEnabled(false);
                        cbCharacters.setEnabled(false);
                        cbWhiteSpace.setEnabled(false);
                        cbTabChar.setEnabled(false);
                        cbNewlineChar.setEnabled(false);
                        cbCarriageReturnChar.setEnabled(false);
                        break;
                    case GRAMMAR_TYPE_LEXER:
                    case GRAMMAR_TYPE_COMBINED_GRAMMAR:
                        cbIdentifier.setEnabled(true);
                        cbInteger.setEnabled(true);
                        cbFloat.setEnabled(true);
                        cbComments.setEnabled(true);
                        if (cbComments.isSelected()) {
                            cbSingleLine.setEnabled(true);
                            cbMultiLine.setEnabled(true);
                        }
                        cbString.setEnabled(true);
                        cbCharacters.setEnabled(true);
                        cbWhiteSpace.setEnabled(true);
                        if (cbWhiteSpace.isSelected()) {
                            cbTabChar.setEnabled(true);
                            cbNewlineChar.setEnabled(true);
                            cbCarriageReturnChar.setEnabled(true);
                        }
                        break;
                    }
                }
            });
            contentPanel.add(grammarTypeComboBox, cc.xy(5, 3));

            //======== lexicalItemPanel ========
            {
                lexicalItemPanel.setBorder(new TitledBorder(null, "Lexical Items",
                        TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION));
                lexicalItemPanel.setLayout(new FormLayout(
                        new ColumnSpec[] {
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { new RowSpec(RowSpec.TOP, Sizes.DEFAULT, RowSpec.DEFAULT_GROW) }));

                //======== lexLeftPanel ========
                {
                    lexLeftPanel.setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(ColumnSpec.DEFAULT, Sizes.dluX(10), FormSpec.NO_GROW),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                    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 }));

                    //---- cbIdentifier ----
                    cbIdentifier.setText("Identifier");
                    lexLeftPanel.add(cbIdentifier, cc.xywh(1, 1, 2, 1));

                    //---- cbInteger ----
                    cbInteger.setText("Integer");
                    lexLeftPanel.add(cbInteger, cc.xywh(1, 3, 2, 1));

                    //---- cbFloat ----
                    cbFloat.setText("Float");
                    lexLeftPanel.add(cbFloat, cc.xywh(1, 5, 2, 1));

                    //---- cbComments ----
                    cbComments.setText("Comments");
                    lexLeftPanel.add(cbComments, cc.xywh(1, 7, 2, 1));
                    cbComments.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent event) {
                            if (cbComments.isSelected()) {
                                cbSingleLine.setEnabled(true);
                                cbMultiLine.setEnabled(true);
                            } else {
                                cbSingleLine.setEnabled(false);
                                cbMultiLine.setEnabled(false);
                            }
                        }
                    });

                    //======== commentsPanel ========
                    {
                        commentsPanel.setBorder(new TitledBorder(null, null, TitledBorder.DEFAULT_JUSTIFICATION,
                                TitledBorder.DEFAULT_POSITION));
                        commentsPanel.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC },
                                new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                        FormFactory.DEFAULT_ROWSPEC }));

                        //---- cbSingleLine ----
                        cbSingleLine.setText("Single-line ( //... )");
                        cbSingleLine.setEnabled(false);
                        cbSingleLine.setSelected(true);
                        commentsPanel.add(cbSingleLine, cc.xy(1, 1));
                        cbSingleLine.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent event) {
                                if (!cbSingleLine.isSelected() && !cbMultiLine.isSelected()) {
                                    cbComments.setSelected(false);
                                    cbSingleLine.setEnabled(false);
                                    cbMultiLine.setEnabled(false);
                                    cbSingleLine.setSelected(true);
                                    cbMultiLine.setSelected(true);
                                }
                            }
                        });

                        //---- cbMultiLine ----
                        cbMultiLine.setText("Multi-line ( /* .. */ )");
                        cbMultiLine.setEnabled(false);
                        cbMultiLine.setSelected(true);
                        commentsPanel.add(cbMultiLine, cc.xy(1, 3));
                        cbMultiLine.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent event) {
                                if (!cbSingleLine.isSelected() && !cbMultiLine.isSelected()) {
                                    cbComments.setSelected(false);
                                    cbSingleLine.setEnabled(false);
                                    cbMultiLine.setEnabled(false);
                                    cbSingleLine.setSelected(true);
                                    cbMultiLine.setSelected(true);
                                }
                            }
                        });
                    }
                    lexLeftPanel.add(commentsPanel, cc.xy(2, 9));
                }
                lexicalItemPanel.add(lexLeftPanel, cc.xy(1, 1));

                //======== lexRightPanel ========
                {
                    lexRightPanel.setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(ColumnSpec.DEFAULT, Sizes.dluX(10), FormSpec.NO_GROW),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                    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 }));

                    //---- cbString ----
                    cbString.setText("String");
                    lexRightPanel.add(cbString, cc.xywh(1, 1, 2, 1));
                    cbString.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent event) {
                            if (cbString.isSelected()) {
                                singleQuoteRadio.setEnabled(true);
                                doubleQuoteRadio.setEnabled(true);
                            } else {
                                singleQuoteRadio.setEnabled(false);
                                doubleQuoteRadio.setEnabled(false);
                            }
                        }
                    });

                    //======== stringPanel ========
                    {
                        stringPanel.setBorder(new EtchedBorder());
                        stringPanel.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC },
                                new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                        FormFactory.DEFAULT_ROWSPEC }));

                        //---- singleQuoteRadio ----
                        singleQuoteRadio.setText("Single quotes ( 'sample string' )");
                        singleQuoteRadio.setEnabled(false);
                        stringPanel.add(singleQuoteRadio, cc.xy(1, 1));

                        //---- doubleQuoteRadio ----
                        doubleQuoteRadio.setText("Double quotes ( \"sample string\" )");
                        doubleQuoteRadio.setEnabled(false);
                        doubleQuoteRadio.setSelected(true);
                        stringPanel.add(doubleQuoteRadio, cc.xy(1, 3));
                    }
                    lexRightPanel.add(stringPanel, cc.xy(2, 3));

                    //---- cbCharacters ----
                    cbCharacters.setText("Character");
                    lexRightPanel.add(cbCharacters, cc.xywh(1, 5, 2, 1));

                    //---- cbWhiteSpace ----
                    cbWhiteSpace.setText("White Space");
                    lexRightPanel.add(cbWhiteSpace, cc.xywh(1, 7, 3, 1));

                    //======== wsPanel ========
                    {
                        wsPanel.setBorder(new EtchedBorder());
                        wsPanel.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC },
                                new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                        FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                        FormFactory.DEFAULT_ROWSPEC }));

                        //---- cbTabChar ----
                        cbTabChar.setText("Tab character ( /t )");
                        cbTabChar.setEnabled(false);
                        cbTabChar.setSelected(true);
                        wsPanel.add(cbTabChar, cc.xy(1, 1));

                        //---- cbNewlineChar ----
                        cbNewlineChar.setText("Newline character ( /n )");
                        cbNewlineChar.setEnabled(false);
                        cbNewlineChar.setSelected(true);
                        wsPanel.add(cbNewlineChar, cc.xy(1, 3));

                        //---- cbCarriageReturnChar ----
                        cbCarriageReturnChar.setText("Carriage-return character ( /r )");
                        cbCarriageReturnChar.setEnabled(false);
                        cbCarriageReturnChar.setSelected(true);
                        wsPanel.add(cbCarriageReturnChar, cc.xy(1, 5));
                    }
                    lexRightPanel.add(wsPanel, cc.xy(2, 9));
                }
                lexicalItemPanel.add(lexRightPanel, cc.xy(3, 1));
            }
            contentPanel.add(lexicalItemPanel, cc.xywh(3, 5, 5, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

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

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

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            buttonBar.add(cancelButton, cc.xy(4, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();

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

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);/*from  www .  j av a 2s .co m*/
    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.AssessmentManagement.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();
    contentPanel = new JPanel();
    panel1 = new JPanel();
    label2 = new JLabel();
    filterField = new JTextField();
    scrollPane1 = new JScrollPane();
    contentTable = new DomainSortableTable(AssessmentsSearchResult.class, filterField);
    buttonBar = new JPanel();
    button1 = new JButton();
    button2 = new JButton();
    reportsButton = new JButton();
    addRecordButton = new JButton();
    removeRecordButton = new JButton();
    doneButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);// w  ww  .j a v  a 2s .  c om
    Container contentPane = getContentPane();
    contentPane.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")));

            //======== 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("Administration");
                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("Assessment");
                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);

        //======== contentPanel ========
        {
            contentPanel.setOpaque(false);
            contentPanel
                    .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.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.UNRELATED_GAP_ROWSPEC }));

            //======== 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));
            }
            contentPanel.add(panel1, cc.xy(2, 2));

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

                //---- contentTable ----
                contentTable.setPreferredScrollableViewportSize(new Dimension(800, 400));
                contentTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        contentTableMouseClicked(e);
                    }
                });
                scrollPane1.setViewportView(contentTable);
            }
            contentPanel.add(scrollPane1, cc.xy(2, 4));

            //======== 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.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.GLUE_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                        RowSpec.decodeSpecs("pref")));

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

                //---- button2 ----
                button2.setText("List All");
                button2.setSelectedIcon(null);
                button2.setOpaque(false);
                button2.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        refreshActionPerformed();
                    }
                });
                buttonBar.add(button2, cc.xy(4, 1));

                //---- reportsButton ----
                reportsButton.setText("Reports");
                reportsButton.setOpaque(false);
                reportsButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        reportButtonActionPerformed(e);
                    }
                });
                buttonBar.add(reportsButton, cc.xy(6, 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(8, 1));

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

                //---- doneButton ----
                doneButton.setText("Done");
                doneButton.setOpaque(false);
                doneButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        doneButtonActionPerformed(e);
                    }
                });
                buttonBar.add(doneButton, cc.xy(14, 1));
            }
            contentPanel.add(buttonBar, cc.xy(2, 6));
        }
        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.ATDebugDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    tabbedPane1 = new JTabbedPane();
    panel2 = new JPanel();
    textField1 = new JTextField();
    textField2 = new JTextField();
    button6 = new JButton();
    button7 = new JButton();
    button8 = new JButton();
    scrollPane2 = new JScrollPane();
    textArea2 = new JTextArea();
    panel1 = new JPanel();
    button1 = new JButton();
    button3 = new JButton();
    button5 = new JButton();
    button4 = new JButton();
    button2 = new JButton();
    scrollPane1 = new JScrollPane();
    textArea1 = new JTextArea();
    panel3 = new ATDebugEditorFields();
    buttonBar = new JPanel();
    button9 = new JButton();
    button10 = new JButton();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

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

    //======== dialogPane ========
    {/*w w w.ja  v a 2 s. c  o m*/
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

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

            //======== tabbedPane1 ========
            {

                //======== panel2 ========
                {
                    panel2.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(80)),
                                    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,
                                    new RowSpec(RowSpec.FILL, Sizes.dluY(119), FormSpec.DEFAULT_GROW) }));

                    //---- textField1 ----
                    textField1.setText("20");
                    panel2.add(textField1, cc.xy(1, 1));

                    //---- textField2 ----
                    textField2.setText("5");
                    panel2.add(textField2, cc.xy(3, 1));

                    //---- button6 ----
                    button6.setText("Start Test");
                    button6.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            startLockTest(e);
                        }
                    });
                    panel2.add(button6, cc.xy(1, 3));

                    //---- button7 ----
                    button7.setText("Stop Test");
                    button7.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            stopLockTest(e);
                        }
                    });
                    panel2.add(button7, cc.xy(3, 3));

                    //---- button8 ----
                    button8.setText("Clear");
                    button8.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            clearLockTestOutput(e);
                        }
                    });
                    panel2.add(button8, cc.xy(7, 3));

                    //======== scrollPane2 ========
                    {
                        scrollPane2.setViewportView(textArea2);
                    }
                    panel2.add(scrollPane2, cc.xywh(1, 5, 7, 1));
                }
                tabbedPane1.addTab("Program Lock Test", panel2);

                //======== panel1 ========
                {
                    panel1.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,
                                    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,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }));

                    //---- button1 ----
                    button1.setText("Record to XML");
                    button1.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            button1ActionPerformed(e);
                        }
                    });
                    panel1.add(button1, cc.xy(1, 1));

                    //---- button3 ----
                    button3.setText("XML To Record");
                    button3.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            button3ActionPerformed(e);
                        }
                    });
                    panel1.add(button3, cc.xy(3, 1));

                    //---- button5 ----
                    button5.setText("Copy");
                    button5.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            button5ActionPerformed(e);
                        }
                    });
                    panel1.add(button5, cc.xy(5, 1));

                    //---- button4 ----
                    button4.setText("Save");
                    button4.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            button4ActionPerformed(e);
                        }
                    });
                    panel1.add(button4, cc.xy(7, 1));

                    //---- button2 ----
                    button2.setText("clear text");
                    button2.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            button2ActionPerformed(e);
                        }
                    });
                    panel1.add(button2, cc.xy(9, 1));

                    //======== scrollPane1 ========
                    {
                        scrollPane1.setViewportView(textArea1);
                    }
                    panel1.add(scrollPane1, cc.xywh(1, 3, 9, 3));
                }
                tabbedPane1.addTab("Export", panel1);

                tabbedPane1.addTab("ISO Date Test", panel3);

            }
            contentPanel.add(tabbedPane1, BorderLayout.CENTER);
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

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

            //---- button9 ----
            button9.setText("Set Record");
            button9.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    button9ActionPerformed(e);
                }
            });
            buttonBar.add(button9, cc.xy(2, 1));

            //---- button10 ----
            button10.setText("Save Record");
            button10.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    button10ActionPerformed(e);
                }
            });
            buttonBar.add(button10, cc.xy(4, 1));

            //---- okButton ----
            okButton.setText("OK");
            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);
    setSize(635, 360);
    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);/*  w ww .  j ava  2  s.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.ChangePasswordDialog.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();
    oldPasswordlabel = new JLabel();
    oldPassword = new JPasswordField();
    label2 = new JLabel();
    newPassword1 = new JPasswordField();
    label3 = new JLabel();
    newPassword2 = new JPasswordField();
    buttonBar = new JPanel();
    cancelButton = new JButton();
    changePasswordButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);/*from   www  .j av a2 s .  c o m*/
    setTitle("Change Password");
    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(
                                    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 }));

            //---- oldPasswordlabel ----
            oldPasswordlabel.setText("Old Password");
            contentPanel.add(oldPasswordlabel, cc.xy(1, 1));

            //---- oldPassword ----
            oldPassword.setColumns(15);
            contentPanel.add(oldPassword, cc.xy(3, 1));

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

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

            //---- label3 ----
            label3.setText("Repeat New Password");
            contentPanel.add(label3, cc.xy(1, 5));

            //---- newPassword2 ----
            newPassword2.setColumns(15);
            contentPanel.add(newPassword2, cc.xy(3, 5));
        }
        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.BUTTON_COLSPEC,
                            FormFactory.RELATED_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));

            //---- changePasswordButton ----
            changePasswordButton.setText("Change Password");
            changePasswordButton.setOpaque(false);
            changePasswordButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    changePasswordButtonActionPerformed(e);
                }
            });
            buttonBar.add(changePasswordButton, 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.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);/*from   www . j  av  a2  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 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);/*ww w .jav 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);//from ww w.j  ava 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());

        //======== 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
}