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.swing.StandardQueryEditor.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    gradientPanel1 = new JGradientPanel();
    headerLabel = new JLabel();
    contentPanel = new JPanel();
    label2 = new JLabel();
    subjectTerm = new JTextField();
    label12 = new JLabel();
    subjectTermType = new JComboBox();
    label13 = new JLabel();
    subjectSource = new JTextField();
    label14 = new JLabel();
    scrollPane1 = new JScrollPane();
    subjectScopeNote = new JTextArea();
    buttonPanel = new JPanel();
    cancelButton = new JButton();
    okButton = new JButton();
    label8 = new JLabel();
    label9 = new JLabel();
    gradientPanel2 = new JGradientPanel();
    auditLabel = new JLabel();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    setBackground(new Color(231, 188, 251));
    setModal(true);//  ww w . ja  v  a 2s . com
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout(ColumnSpec.decodeSpecs("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 }));

    //======== gradientPanel1 ========
    {
        gradientPanel1.setBackground(new Color(229, 211, 237));
        gradientPanel1.setBackground2(new Color(204, 204, 255));
        gradientPanel1.setDirection(JGradientPanel.WEST);
        gradientPanel1.setLayout(new FormLayout("default:grow", "35px"));

        //---- headerLabel ----
        headerLabel.setText("Subjects");
        headerLabel.setFont(new Font("Lucida Grande", Font.BOLD, 14));
        gradientPanel1.add(headerLabel, new CellConstraints(1, 1, 1, 1, CellConstraints.FILL,
                CellConstraints.DEFAULT, new Insets(0, 10, 0, 0)));
    }
    contentPane.add(gradientPanel1, cc.xy(1, 1));

    //======== contentPanel ========
    {
        contentPanel.setBorder(Borders.DLU4_BORDER);
        contentPanel.setBackground(new Color(231, 188, 251));
        contentPanel.setLayout(new FormLayout(
                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                        new ColumnSpec("max(default;400px):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 }));

        //---- label2 ----
        label2.setText("Subject Term");
        contentPanel.add(label2, cc.xy(1, 1));
        contentPanel.add(subjectTerm, cc.xy(3, 1));

        //---- label12 ----
        label12.setText("Subject Term Type");
        contentPanel.add(label12, cc.xy(1, 3));

        //---- subjectTermType ----
        subjectTermType.setBackground(new Color(231, 188, 251));
        contentPanel.add(subjectTermType, cc.xy(3, 3));

        //---- label13 ----
        label13.setText("Source");
        contentPanel.add(label13, cc.xy(1, 5));
        contentPanel.add(subjectSource, cc.xy(3, 5));

        //---- label14 ----
        label14.setText("Scope Note");
        label14.setVerticalAlignment(SwingConstants.TOP);
        contentPanel.add(label14, cc.xywh(1, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));

        //======== scrollPane1 ========
        {
            scrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            scrollPane1.setMaximumSize(new Dimension(32767, 100));

            //---- subjectScopeNote ----
            subjectScopeNote.setRows(4);
            subjectScopeNote.setLineWrap(true);
            subjectScopeNote.setTabSize(20);
            subjectScopeNote.setWrapStyleWord(true);
            scrollPane1.setViewportView(subjectScopeNote);
        }
        contentPanel.add(scrollPane1, cc.xy(3, 7));
    }
    contentPane.add(contentPanel, cc.xy(1, 3));

    //======== buttonPanel ========
    {
        buttonPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));
        buttonPanel.setLayout(new FormLayout("default, default", "default, default"));

        //---- cancelButton ----
        cancelButton.setIcon(
                new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/cancel.jpg")));
        buttonPanel.add(cancelButton, cc.xy(1, 1));

        //---- okButton ----
        okButton.setIcon(
                new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/ok.jpg")));
        buttonPanel.add(okButton, cc.xy(2, 1));

        //---- label8 ----
        label8.setText("Cancel");
        label8.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
        buttonPanel.add(label8, cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- label9 ----
        label9.setText("OK");
        label9.setFont(new Font("Lucida Grande", Font.PLAIN, 10));
        buttonPanel.add(label9, cc.xywh(2, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
    }
    contentPane.add(buttonPanel, cc.xywh(1, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

    //======== gradientPanel2 ========
    {
        gradientPanel2.setBackground(new Color(229, 211, 237));
        gradientPanel2.setBackground2(new Color(204, 204, 255));
        gradientPanel2.setDirection(JGradientPanel.EAST);
        gradientPanel2.setLayout(new FormLayout("default:grow", "35px"));

        //---- auditLabel ----
        auditLabel.setText("created | modified");
        gradientPanel2.add(auditLabel, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT,
                CellConstraints.DEFAULT, new Insets(0, 10, 0, 0)));
    }
    contentPane.add(gradientPanel2, cc.xy(1, 7));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
    WindowAdapter windowAdapter = new WindowAdapter() {
        public void windowClosing(final WindowEvent windowEvent) {
            myIsDialogCancelled = true;

            setVisible(false);
        }
    };

    addWindowListener(windowAdapter);

}

From source file:org.archiviststoolkit.swing.VersionMismatch.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    panel1 = new JPanel();
    message = new JLabel();
    downLoadNewVersion = new JLabel();
    contactAdmin = new JLabel();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBackground(new Color(200, 205, 232));
    setForeground(Color.white);//from  w  w  w  . j a  va  2  s.  co m
    setModal(true);
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("default:grow", "fill:default:grow"));

    //======== panel1 ========
    {
        panel1.setBorder(Borders.DLU4_BORDER);
        panel1.setBackground(new Color(200, 205, 232));
        panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC,
                        FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                        FormFactory.DEFAULT_ROWSPEC }));

        //---- message ----
        message.setText("sdfsf");
        message.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        panel1.add(message, cc.xy(1, 1));

        //---- downLoadNewVersion ----
        downLoadNewVersion.setText("<html><u>Download Latest Version</u></html>");
        downLoadNewVersion.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        downLoadNewVersion.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                downLoadNewVersionMouseClicked(e);
            }
        });
        panel1.add(downLoadNewVersion, cc.xywh(1, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- contactAdmin ----
        contactAdmin.setText("Please contact your AT administrator to upgrade the database.");
        panel1.add(contactAdmin, cc.xywh(1, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
    }
    contentPane.add(panel1, cc.xy(1, 1));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.columba.addressbook.gui.dialog.contact.ContactEditorDialog.java

License:Mozilla Public License

private void layoutComponents() {
    CellConstraints cc = new CellConstraints();

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

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

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

            // ======== tabbedPane2 ========
            {
                tabbedPane2.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

                // ======== contactPanel ========
                {
                    contactPanel.setBorder(Borders.DIALOG_BORDER);
                    contactPanel.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                    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,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    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.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    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.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW) }));
                    ((FormLayout) contactPanel.getLayout())
                            .setRowGroups(new int[][] { { 7, 9, 11, 17, 19, 25, 27 } });

                    // ======== panel7 ========
                    {
                        panel7.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[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                        FormFactory.LINE_GAP_ROWSPEC,
                                        new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                        FormFactory.LINE_GAP_ROWSPEC,
                                        new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW) }));
                        ((FormLayout) panel7.getLayout()).setRowGroups(new int[][] { { 1, 3, 5 } });

                        // ---- pictureButton ----

                        panel7.add(pictureButton, cc.xywh(1, 1, 1, 5));

                        // ---- fullnameButton ----
                        formattedNameButton.setText(bundle.getString("formattedNameButton.text"));
                        panel7.add(formattedNameButton, cc.xy(3, 1));
                        panel7.add(formattedNameTextField, cc.xy(5, 1));

                        // ---- nicknameLabel ----
                        nicknameLabel.setText(bundle.getString("nicknameLabel.text"));
                        nicknameLabel.setLabelFor(nicknameTextField);
                        panel7.add(nicknameLabel,
                                cc.xywh(7, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                        panel7.add(nicknameTextField, cc.xy(9, 1));

                        // ---- fileunderLabel ----
                        fileunderLabel.setText(bundle.getString("fileunderLabel.text"));
                        fileunderLabel.setLabelFor(fileunderComboBox);
                        panel7.add(fileunderLabel,
                                cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                        panel7.add(fileunderComboBox, cc.xy(5, 3));

                        panel7.add(whereLabel,
                                cc.xywh(7, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                        panel7.add(whereComboBox, cc.xy(9, 3));
                        // ---- categoriesButton ----
                        categoriesButton.setText(bundle.getString("categoriesButton.text"));
                        panel7.add(categoriesButton, cc.xy(3, 5));
                        panel7.add(categoriesTextField, cc.xywh(5, 5, 5, 1));
                    }
                    contactPanel.add(panel7, cc.xywh(1, 1, 7, 1));
                    contactPanel.add(emailSeparator, cc.xywh(1, 5, 7, 1));
                    contactPanel.add(emailComboBox1, cc.xy(1, 7));

                    // ---- emailTextField1 ----
                    emailTextField1.setColumns(20);
                    contactPanel.add(emailTextField1, cc.xy(3, 7));
                    contactPanel.add(emailComboBox2, cc.xy(5, 7));

                    // ---- emailTextField2 ----
                    emailTextField2.setColumns(20);
                    contactPanel.add(emailTextField2, cc.xy(7, 7));
                    contactPanel.add(emailComboBox3, cc.xy(1, 9));

                    // ---- emailTextField3 ----
                    emailTextField3.setColumns(20);
                    contactPanel.add(emailTextField3, cc.xy(3, 9));
                    contactPanel.add(emailComboBox4, cc.xy(5, 9));

                    // ---- emailTextField4 ----
                    emailTextField4.setColumns(20);
                    contactPanel.add(emailTextField4, cc.xy(7, 9));

                    // ---- preferHtmlCheckBox ----
                    preferHtmlCheckBox.setText(bundle.getString("preferHtmlCheckBox.text"));
                    contactPanel.add(preferHtmlCheckBox, cc.xy(3, 11));
                    contactPanel.add(telephoneSeparator, cc.xywh(1, 15, 7, 1));
                    contactPanel.add(telephoneComboBox1, cc.xy(1, 17));

                    // ---- telephoneTextField1 ----
                    telephoneTextField1.setColumns(20);
                    contactPanel.add(telephoneTextField1, cc.xy(3, 17));
                    contactPanel.add(telephoneComboBox2, cc.xy(5, 17));

                    // ---- telephoneTextField2 ----
                    telephoneTextField2.setColumns(20);
                    contactPanel.add(telephoneTextField2, cc.xy(7, 17));
                    contactPanel.add(telephoneComboBox3, cc.xy(1, 19));

                    // ---- telephoneTextField3 ----
                    telephoneTextField3.setColumns(20);
                    contactPanel.add(telephoneTextField3, cc.xy(3, 19));
                    contactPanel.add(telephoneComboBox4, cc.xy(5, 19));

                    // ---- telephoneTextField4 ----
                    telephoneTextField4.setColumns(20);
                    contactPanel.add(telephoneTextField4, cc.xy(7, 19));
                    contactPanel.add(imSeparator, cc.xywh(1, 23, 7, 1));
                    contactPanel.add(imComboBox1, cc.xy(1, 25));

                    // ---- imTextField1 ----
                    imTextField1.setColumns(20);
                    contactPanel.add(imTextField1, cc.xy(3, 25));
                    contactPanel.add(imComboBox2, cc.xy(5, 25));

                    // ---- imTextField2 ----
                    imTextField2.setColumns(20);
                    contactPanel.add(imTextField2, cc.xy(7, 25));
                    contactPanel.add(imComboBox3, cc.xy(1, 27));

                    // ---- imTextField3 ----
                    imTextField3.setColumns(20);
                    contactPanel.add(imTextField3, cc.xy(3, 27));
                    contactPanel.add(imComboBox4, cc.xy(5, 27));

                    // ---- imTextField4 ----
                    imTextField4.setColumns(20);
                    contactPanel.add(imTextField4, cc.xy(7, 27));
                }
                tabbedPane2.addTab(bundle.getString("contactPanel.tab.title"), contactPanel);

                // ======== personalInfoPanel ========
                {
                    personalInfoPanel.setBorder(Borders.DIALOG_BORDER);
                    personalInfoPanel.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                    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.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    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.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    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.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));
                    ((FormLayout) personalInfoPanel.getLayout())
                            .setRowGroups(new int[][] { { 3, 5, 7, 9, 15, 17, 19, 25 } });
                    personalInfoPanel.add(webAddressSeparator, cc.xywh(1, 1, 7, 1));

                    // ---- homepageLabel ----
                    homepageLabel.setText(bundle.getString("homepageLabel.text"));
                    homepageLabel.setLabelFor(homepageTextField);
                    personalInfoPanel.add(homepageLabel,
                            cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ======== panel1 ========
                    {
                        panel1.setLayout(
                                new FormLayout(
                                        new ColumnSpec[] {
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW),
                                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                                new ColumnSpec(ColumnSpec.CENTER, Sizes.DEFAULT,
                                                        FormSpec.NO_GROW) },
                                        RowSpec.decodeSpecs("fill:default")));

                        // ---- homepageTextField ----
                        homepageTextField.setColumns(20);
                        panel1.add(homepageTextField, cc.xy(1, 1));

                        // ---- homepageButton ----

                        panel1.add(homepageButton, cc.xy(3, 1));
                    }
                    personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1));

                    // ---- weblogLabel ----
                    weblogLabel.setText(bundle.getString("weblogLabel.text"));
                    weblogLabel.setLabelFor(weblogTextField);
                    personalInfoPanel.add(weblogLabel,
                            cc.xywh(1, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

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

                        // ---- weblogTextField ----
                        weblogTextField.setColumns(20);
                        panel5.add(weblogTextField, cc.xy(1, 1));

                        // ---- weblogButton ----

                        panel5.add(weblogButton, cc.xy(3, 1));
                    }
                    personalInfoPanel.add(panel5, cc.xywh(3, 5, 5, 1));

                    // ---- calendarLabel ----
                    calendarLabel.setText(bundle.getString("calendarLabel.text"));
                    calendarLabel.setLabelFor(calendarTextField);
                    personalInfoPanel.add(calendarLabel,
                            cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

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

                        // ---- calendarTextField ----
                        calendarTextField.setColumns(20);
                        panel6.add(calendarTextField, cc.xy(1, 1));

                        // ---- calendarButton ----
                        panel6.add(calendarButton, cc.xy(3, 1));
                    }
                    personalInfoPanel.add(panel6, cc.xywh(3, 7, 5, 1));

                    // ---- freebusyLabel ----
                    freebusyLabel.setText(bundle.getString("freebusyLabel.text"));
                    freebusyLabel.setLabelFor(freebusyTextField);
                    personalInfoPanel.add(freebusyLabel,
                            cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

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

                        // ---- freebusyTextField ----
                        freebusyTextField.setColumns(20);
                        panel8.add(freebusyTextField, cc.xy(1, 1));

                        // ---- freebusyButton ----

                        panel8.add(freebusyButton, cc.xy(3, 1));
                    }
                    personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1));
                    personalInfoPanel.add(jobSeparator, cc.xywh(1, 13, 7, 1));

                    // ---- professionLabel ----
                    professionLabel.setText(bundle.getString("professionLabel.text"));
                    professionLabel.setLabelFor(professionTextField);
                    personalInfoPanel.add(professionLabel,
                            cc.xywh(1, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ---- professionTextField ----
                    professionTextField.setColumns(20);
                    personalInfoPanel.add(professionTextField, cc.xy(3, 15));

                    // ---- titleLabel ----
                    titleLabel.setText(bundle.getString("titleLabel.text"));
                    titleLabel.setLabelFor(titleTextField);
                    personalInfoPanel.add(titleLabel,
                            cc.xywh(5, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ---- titleTextField ----
                    titleTextField.setColumns(20);
                    personalInfoPanel.add(titleTextField, cc.xy(7, 15));

                    // ---- companyLabel ----
                    companyLabel.setText(bundle.getString("companyLabel.text"));
                    companyLabel.setLabelFor(companyTextField);
                    personalInfoPanel.add(companyLabel,
                            cc.xywh(1, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ---- companyTextField ----
                    companyTextField.setColumns(20);
                    personalInfoPanel.add(companyTextField, cc.xy(3, 17));

                    // ---- departmentLabel ----
                    departmentLabel.setText(bundle.getString("departmentLabel.text"));
                    departmentLabel.setLabelFor(departmentTextField);
                    personalInfoPanel.add(departmentLabel,
                            cc.xywh(5, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ---- departmentTextField ----
                    departmentTextField.setColumns(20);
                    personalInfoPanel.add(departmentTextField, cc.xy(7, 17));

                    // ---- managerLabel ----
                    managerLabel.setText(bundle.getString("managerLabel.text"));
                    managerLabel.setLabelFor(managerTextField);
                    personalInfoPanel.add(managerLabel,
                            cc.xywh(1, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ---- managerTextField ----
                    managerTextField.setColumns(20);
                    personalInfoPanel.add(managerTextField, cc.xy(3, 19));

                    // ---- officeLabel ----
                    officeLabel.setText(bundle.getString("officeLabel.text"));
                    officeLabel.setLabelFor(officeTextField);
                    personalInfoPanel.add(officeLabel,
                            cc.xywh(5, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ---- officeTextField ----
                    officeTextField.setColumns(10);
                    personalInfoPanel.add(officeTextField, cc.xy(7, 19));
                    personalInfoPanel.add(miscellaneousSeparator, cc.xywh(1, 23, 7, 1));

                    // ---- birthdayLabel ----
                    birthdayLabel.setText(bundle.getString("birthdayLabel.text"));
                    personalInfoPanel.add(birthdayLabel,
                            cc.xywh(1, 25, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ======== panel9 ========
                    {
                        panel9.setLayout(new FormLayout(
                                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                                RowSpec.decodeSpecs("fill:default")));

                        // ---- birthdayCheckBox ----
                        birthdayCheckBox.setSelected(false);
                        panel9.add(birthdayCheckBox, cc.xy(1, 1));

                        // ---- birthdayDatePicker ----
                        birthdayDatePicker.setEnabled(false);
                        panel9.add(birthdayDatePicker, cc.xy(3, 1));
                    }
                    personalInfoPanel.add(panel9, cc.xywh(3, 25, 5, 1));
                    birthdayLabel.setLabelFor(panel9);

                    // ---- notesLabel ----
                    notesLabel.setText(bundle.getString("notesLabel.text"));
                    notesLabel.setLabelFor(notesTextArea);
                    personalInfoPanel.add(notesLabel,
                            cc.xywh(1, 27, 1, 1, CellConstraints.RIGHT, CellConstraints.TOP));

                    // ======== scrollPane3 ========
                    {
                        scrollPane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);

                        // ---- notesTextArea ----
                        notesTextArea.setRows(5);
                        notesTextArea.setColumns(20);
                        notesTextArea.setTabSize(4);
                        scrollPane3.setViewportView(notesTextArea);
                    }
                    personalInfoPanel.add(scrollPane3, cc.xywh(3, 27, 5, 1));
                }
                tabbedPane2.addTab(bundle.getString("personalInfoPanel.tab.title"), personalInfoPanel);

                // ======== mailingAddressPanel ========
                {
                    mailingAddressPanel.setBorder(Borders.DIALOG_BORDER);
                    mailingAddressPanel.setLayout(new FormLayout(
                            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                    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.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    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.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    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.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC,
                                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                                    FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));
                    mailingAddressPanel.add(privateSeparator, cc.xywh(1, 1, 7, 1));

                    // ---- privateAddressLabel ----
                    privateAddressLabel.setText(bundle.getString("privateAddressLabel.text"));
                    privateAddressLabel.setLabelFor(privateAddressTextArea);
                    mailingAddressPanel.add(privateAddressLabel,
                            cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ======== scrollPane1 ========
                    {
                        scrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                        scrollPane1.setViewportView(privateAddressTextArea);
                    }
                    mailingAddressPanel.add(scrollPane1, cc.xywh(3, 3, 1, 3));

                    // ---- privateCityLabel ----
                    privateCityLabel.setText(bundle.getString("privateCityLabel.text"));
                    privateCityLabel.setLabelFor(privateCityTextField);
                    mailingAddressPanel.add(privateCityLabel,
                            cc.xywh(5, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ---- privateCityTextField ----
                    privateCityTextField.setColumns(5);
                    mailingAddressPanel.add(privateCityTextField, cc.xy(7, 3));

                    // ---- privateZipPostalCodeLabel ----
                    privateZipPostalCodeLabel.setText(bundle.getString("privateZipPostalCodeLabel.text"));
                    privateZipPostalCodeLabel.setLabelFor(privateZipPostalCodeTextField);
                    mailingAddressPanel.add(privateZipPostalCodeLabel,
                            cc.xywh(5, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(privateZipPostalCodeTextField, cc.xy(7, 5));

                    // ---- label1 ----
                    label1.setText(bundle.getString("streetLabel.text"));
                    label1.setLabelFor(privateStreetTextField);
                    mailingAddressPanel.add(label1,
                            cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(privateStreetTextField, cc.xy(3, 7));

                    // ---- privateStateProvinceCountyLabel ----
                    privateStateProvinceCountyLabel
                            .setText(bundle.getString("privateStateProvinceCountyLabel.text"));
                    privateStateProvinceCountyLabel.setLabelFor(privateStateProvinceCountyTextField);
                    mailingAddressPanel.add(privateStateProvinceCountyLabel,
                            cc.xywh(5, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(privateStateProvinceCountyTextField, cc.xy(7, 7));

                    // ---- privatePOBoxLabel ----
                    privatePOBoxLabel.setText(bundle.getString("privatePOBoxLabel.text"));
                    privatePOBoxLabel.setLabelFor(privatePOBoxTextField);
                    mailingAddressPanel.add(privatePOBoxLabel,
                            cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(privatePOBoxTextField, cc.xy(3, 9));

                    // ---- privateCountryLabel ----
                    privateCountryLabel.setText(bundle.getString("privateCountryLabel.text"));
                    privateCountryLabel.setLabelFor(privateCountryTextField);
                    mailingAddressPanel.add(privateCountryLabel,
                            cc.xywh(5, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(privateCountryTextField, cc.xy(7, 9));
                    mailingAddressPanel.add(workSeparator, cc.xywh(1, 13, 7, 1));

                    // ---- workAddressLabel ----
                    workAddressLabel.setText(bundle.getString("workAddressLabel.text"));
                    workAddressLabel.setLabelFor(workAddressTextArea);
                    mailingAddressPanel.add(workAddressLabel,
                            cc.xywh(1, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ======== scrollPane2 ========
                    {
                        scrollPane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                        scrollPane2.setViewportView(workAddressTextArea);
                    }
                    mailingAddressPanel.add(scrollPane2, cc.xywh(3, 15, 1, 3));

                    // ---- workCityLabel ----
                    workCityLabel.setText(bundle.getString("workCityLabel.text"));
                    workCityLabel.setLabelFor(workCityTextField);
                    mailingAddressPanel.add(workCityLabel,
                            cc.xywh(5, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ---- workCityTextField ----
                    workCityTextField.setColumns(5);
                    mailingAddressPanel.add(workCityTextField, cc.xy(7, 15));

                    // ---- workZipPostalCodeLabel ----
                    workZipPostalCodeLabel.setText(bundle.getString("workZipPostalCodeLabel.text"));
                    workZipPostalCodeLabel.setLabelFor(workZipPostalCodeTextField);
                    mailingAddressPanel.add(workZipPostalCodeLabel,
                            cc.xywh(5, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(workZipPostalCodeTextField, cc.xy(7, 17));

                    // ---- label2 ----
                    label2.setText(bundle.getString("streetLabel.text"));
                    label2.setLabelFor(workStreetTextField);
                    mailingAddressPanel.add(label2,
                            cc.xywh(1, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(workStreetTextField, cc.xy(3, 19));

                    // ---- workStateProvinceCountyLabel ----
                    workStateProvinceCountyLabel.setText(bundle.getString("workStateProvinceCountyLabel.text"));
                    workStateProvinceCountyLabel.setLabelFor(workStateProvinceCountyTextField);
                    mailingAddressPanel.add(workStateProvinceCountyLabel,
                            cc.xywh(5, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(workStateProvinceCountyTextField, cc.xy(7, 19));

                    // ---- workPOBoxLabel ----
                    workPOBoxLabel.setText(bundle.getString("workPOBoxLabel.text"));
                    workPOBoxLabel.setLabelFor(workPOBoxTextField);
                    mailingAddressPanel.add(workPOBoxLabel,
                            cc.xywh(1, 21, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(workPOBoxTextField, cc.xy(3, 21));

                    // ---- workCountryLabel ----
                    workCountryLabel.setText(bundle.getString("workCountryLabel.text"));
                    workCountryLabel.setLabelFor(workCountryTextField);
                    mailingAddressPanel.add(workCountryLabel,
                            cc.xywh(5, 21, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(workCountryTextField, cc.xy(7, 21));
                    mailingAddressPanel.add(otherSeparator, cc.xywh(1, 25, 7, 1));

                    // ---- otherAddressLabel ----
                    otherAddressLabel.setLabelFor(otherAddressTextArea);
                    mailingAddressPanel.add(otherAddressLabel,
                            cc.xywh(1, 27, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

                    // ======== scrollPane4 ========
                    {
                        scrollPane4.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                        scrollPane4.setViewportView(otherAddressTextArea);
                    }
                    mailingAddressPanel.add(scrollPane4, cc.xywh(3, 27, 1, 3));

                    // ---- otherCityLabel ----
                    otherCityLabel.setText(bundle.getString("otherCityLabel.text"));
                    otherCityLabel.setLabelFor(otherCityTextField);
                    mailingAddressPanel.add(otherCityLabel,
                            cc.xywh(5, 27, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(otherCityTextField, cc.xy(7, 27));

                    // ---- otherZipPostalCodeLabel ----
                    otherZipPostalCodeLabel.setText(bundle.getString("otherZipPostalCodeLabel.text"));
                    otherZipPostalCodeLabel.setLabelFor(otherZipPostalCodeTextField);
                    mailingAddressPanel.add(otherZipPostalCodeLabel,
                            cc.xywh(5, 29, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(otherZipPostalCodeTextField, cc.xy(7, 29));

                    // ---- label3 ----
                    label3.setText(bundle.getString("streetLabel.text"));
                    label3.setLabelFor(otherStreetTextField);
                    mailingAddressPanel.add(label3,
                            cc.xywh(1, 31, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(otherStreetTextField, cc.xy(3, 31));

                    // ---- otherStateProvinceCountyLabel ----
                    otherStateProvinceCountyLabel
                            .setText(bundle.getString("otherStateProvinceCountyLabel.text"));
                    otherStateProvinceCountyLabel.setLabelFor(otherStateProvinceCountyTextField);
                    mailingAddressPanel.add(otherStateProvinceCountyLabel,
                            cc.xywh(5, 31, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(otherStateProvinceCountyTextField, cc.xy(7, 31));

                    // ---- otherPOBoxLabel ----
                    otherPOBoxLabel.setText(bundle.getString("otherPOBoxLabel.text"));
                    otherPOBoxLabel.setLabelFor(otherPOBoxTextField);
                    mailingAddressPanel.add(otherPOBoxLabel,
                            cc.xywh(1, 33, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(otherPOBoxTextField, cc.xy(3, 33));

                    // ---- otherCountryLabel ----
                    otherCountryLabel.setText(bundle.getString("otherCountryLabel.text"));
                    otherCountryLabel.setLabelFor(otherCountryTextField);
                    mailingAddressPanel.add(otherCountryLabel,
                            cc.xywh(5, 33, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
                    mailingAddressPanel.add(otherCountryTextField, cc.xy(7, 33));
                }
                tabbedPane2.addTab(bundle.getString("mailingAddressPanel.tab.title"), mailingAddressPanel);

            }
            contentPane.add(tabbedPane2, BorderLayout.NORTH);
        }
        dialogPane.add(contentPane, 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(bundle.getString("okButton.text"));
            buttonBar.add(okButton, cc.xy(2, 1));

            // ---- cancelButton ----
            cancelButton.setText(bundle.getString("cancelButton.text"));
            buttonBar.add(cancelButton, cc.xy(4, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane2.add(dialogPane, BorderLayout.CENTER);
}

From source file:org.columba.calendar.ui.dialog.EditEventDialog.java

License:Mozilla Public License

private JPanel createPanel1() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout(
            "3dlu,FILL:DEFAULT:NONE,3dlu,FILL:DEFAULT:GROW(1.0),3dlu,FILL:DEFAULT:NONE,3dlu,FILL:DEFAULT:NONE",
            "3dlu,CENTER:DEFAULT:NONE,3dlu,CENTER:DEFAULT:NONE,3dlu,CENTER:DEFAULT:NONE,3dlu,CENTER:DEFAULT:NONE,3dlu,FILL:DEFAULT:GROW(1.0)");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);/*from  w w  w. j a v a2s  .c  o m*/

    JLabel jlabel1 = new JLabel();
    jlabel1.setText("Summary:");
    jpanel1.add(jlabel1, new CellConstraints(2, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    JLabel jlabel2 = new JLabel();
    jlabel2.setText("Location:");
    jpanel1.add(jlabel2, new CellConstraints(2, 4, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    JLabel jlabel3 = new JLabel();
    jlabel3.setText("Description:");
    jpanel1.add(jlabel3, new CellConstraints(2, 10, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));

    JLabel jlabel4 = new JLabel();
    jlabel4.setText("Class:");
    jpanel1.add(jlabel4, new CellConstraints(2, 6, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    jpanel1.add(summaryTextField, cc.xywh(4, 2, 5, 1));

    jpanel1.add(locationTextField, cc.xywh(4, 4, 5, 1));

    JScrollPane jscrollpane1 = new JScrollPane();
    jscrollpane1.setViewportView(descriptionTextArea);
    jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    jpanel1.add(jscrollpane1, cc.xywh(4, 10, 5, 1));

    jpanel1.add(classComboBox, cc.xy(4, 6));

    JLabel jlabel5 = new JLabel();
    jlabel5.setText("Calendar:");
    jpanel1.add(jlabel5, new CellConstraints(6, 6, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    jpanel1.add(calendarPicker, cc.xy(8, 6));

    jpanel1.add(new JLabel("Categories:"),
            new CellConstraints(2, 8, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    jpanel1.add(categoriesTextField, cc.xywh(4, 8, 3, 1));

    categoriesButton.setActionCommand("Categories...");
    categoriesButton.setText("Select ...");
    jpanel1.add(categoriesButton, cc.xy(8, 8));

    return jpanel1;
}

From source file:org.columba.calendar.ui.dialog.EditEventDialog.java

License:Mozilla Public License

private JPanel createPanel2() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout(
            "3dlu,FILL:DEFAULT:NONE,3dlu,FILL:DEFAULT:GROW(1.0),3dlu,FILL:DEFAULT:GROW(1.0),3dlu,FILL:DEFAULT:NONE",
            "3dlu,FILL:DEFAULT:NONE,3dlu,FILL:DEFAULT:NONE,3dlu,FILL:DEFAULT:NONE,3dlu,FILL:DEFAULT:NONE,3dlu");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);//from  w  w  w. j  a  v  a  2  s.c om

    JLabel jlabel1 = new JLabel();
    jlabel1.setText("Start Time:");
    jpanel1.add(jlabel1, new CellConstraints(2, 2, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    allDayCheckBox.setActionCommand("All Day");
    allDayCheckBox.addActionListener(this);
    allDayCheckBox.setText("All Day");
    jpanel1.add(allDayCheckBox, cc.xy(8, 2));

    JLabel jlabel2 = new JLabel();
    jlabel2.setText("End Time:");
    jpanel1.add(jlabel2, new CellConstraints(2, 4, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    jpanel1.add(startDayDatePicker, cc.xy(4, 2));

    jpanel1.add(endDayDatePicker, cc.xy(4, 4));

    jpanel1.add(startTimePicker, cc.xy(6, 2));

    jpanel1.add(endTimePicker, cc.xy(6, 4));

    alarmCheckBox.setActionCommand("Alarm");
    alarmCheckBox.setText("Alarm");
    jpanel1.add(alarmCheckBox, new CellConstraints(2, 6, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    jpanel1.add(createPanel3(), cc.xywh(4, 6, 3, 1));

    recurrenceCheckBox.setText("Recurrence");
    recurrenceCheckBox.setActionCommand("Recurrence");
    recurrenceCheckBox.addActionListener(this);
    jpanel1.add(recurrenceCheckBox,
            new CellConstraints(2, 8, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));

    jpanel1.add(createPanel4(), cc.xywh(4, 8, 3, 1));

    return jpanel1;
}

From source file:org.columba.core.gui.externaltools.ExternalToolsDialog.java

License:Mozilla Public License

private JPanel createPanel() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),3DLU,FILL:DEFAULT:NONE",
            "CENTER:DEFAULT:NONE,1DLU,FILL:DEFAULT:GROW(1.0),3DLU,CENTER:DEFAULT:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    jpanel1.setLayout(formlayout1);/* w  ww.  ja v  a  2  s . c om*/

    JLabel jlabel1 = new JLabel();
    jlabel1.setText("External Tools:");
    jpanel1.add(jlabel1, cc.xy(1, 1));

    JScrollPane scrollPane = new JScrollPane(list);
    scrollPane.setPreferredSize(new Dimension(250, 150));
    jpanel1.add(scrollPane, cc.xy(1, 3));

    jpanel1.add(createPanel1(), new CellConstraints(3, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));

    return jpanel1;
}

From source file:org.columba.core.gui.profiles.ProfileManagerDialog.java

License:Mozilla Public License

private JPanel createPanel() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),3DLU,FILL:DEFAULT:NONE",
            "CENTER:DEFAULT:NONE,1DLU,FILL:DEFAULT:GROW(1.0),3DLU,CENTER:DEFAULT:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    jpanel1.setLayout(formlayout1);//from  w  w w.  j a v  a 2 s. c om

    JLabel jlabel1 = new JLabel();
    jlabel1.setText("Profiles:");
    jpanel1.add(jlabel1, cc.xy(1, 1));

    JScrollPane scrollPane = new JScrollPane(list);
    scrollPane.setPreferredSize(new Dimension(250, 150));
    jpanel1.add(scrollPane, cc.xy(1, 3));

    jpanel1.add(checkBox, cc.xy(1, 5));

    jpanel1.add(createPanel1(), new CellConstraints(3, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));

    return jpanel1;
}

From source file:org.columba.mail.gui.composer.ComposerController.java

License:Mozilla Public License

/**
 * Layout components// w  w  w.j av  a 2  s.c  o m
 */
public void layoutComponents() {
    centerPanel.removeAll();

    editorPanel.setLayout(new BorderLayout());

    toolbarPanel.setLayout(new BorderLayout());
    toolbarPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0));
    toolbarPanel.add(htmlToolbar);
    toolbarPanel.setBackground(UIManager.getColor("TextArea.background"));

    topPanel = new JPanel();
    topPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

    FormLayout layout = new FormLayout(
            new ColumnSpec[] { new ColumnSpec("center:max(pref;50dlu)"),
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.GROWING_BUTTON_COLSPEC,
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.GROWING_BUTTON_COLSPEC },
            new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                    FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                    FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                    FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                    FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW) });
    layout.setRowGroups(new int[][] { { 1, 3, 5, 7, 9 } });
    layout.setColumnGroups(new int[][] { { 1 } });

    topPanel.setLayout(layout);

    CellConstraints c = new CellConstraints();

    topPanel.add(smtpLabel, c.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

    topPanel.add(getAccountController().getView(), c.xy(3, 1));
    topPanel.add(priorityLabel, c.xy(5, 1));
    topPanel.add(getPriorityController().getView(), c.xy(7, 1));

    getHeaderController().getView().layoutComponents(topPanel);

    topPanel.add(subjectLabel, c.xy(1, 9, CellConstraints.CENTER, CellConstraints.DEFAULT));

    topPanel.add(getSubjectController().getView(), c.xywh(3, 9, 5, 1));

    if (composerModel.isHtml())
        editorPanel.add(toolbarPanel, BorderLayout.NORTH);

    editorScrollPane.getContentPane().add(getCurrentEditor().getViewUIComponent(), BorderLayout.CENTER);

    editorPanel.add(editorScrollPane, BorderLayout.CENTER);

    Border outterBorder = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5),
            new MessageBorder(Color.LIGHT_GRAY, 1, true));
    Border innerBorder = BorderFactory.createCompoundBorder(outterBorder, new LineBorder(Color.WHITE, 5, true));
    editorPanel.setBorder(innerBorder);

    AccountItem item = (AccountItem) getAccountController().getView().getSelectedItem();
    if (item.getIdentity().getSignature() != null)
        editorScrollPane.getContentPane().add(signatureView, BorderLayout.SOUTH);

    editorScrollPane.addMouseListener(new MouseListener() {

        public void mouseClicked(MouseEvent e) {
            currentEditorController.getComponent().requestFocus();
        }

        public void mouseEntered(MouseEvent e) {
        }

        public void mouseExited(MouseEvent e) {
        }

        public void mousePressed(MouseEvent e) {
        }

        public void mouseReleased(MouseEvent e) {
        }

    });

    centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    centerPanel.setLayout(new BorderLayout());

    centerPanel.add(topPanel, BorderLayout.NORTH);

    centerPanel.add(editorPanel, BorderLayout.CENTER);

    attachmentPanelShown = false;
}

From source file:org.columba.mail.gui.composer.HeaderView.java

License:Mozilla Public License

/**
 * //  w  w w  .  ja v a2  s . c  om
 */
public void layoutComponents(JPanel panel) {

    CellConstraints cc = new CellConstraints();

    panel.add(toButton, cc.xy(1, 3, CellConstraints.FILL, CellConstraints.DEFAULT));
    panel.add(toComboBox, cc.xywh(3, 3, 5, 1));

    panel.add(ccButton, cc.xy(1, 5, CellConstraints.FILL, CellConstraints.DEFAULT));
    panel.add(ccComboBox, cc.xywh(3, 5, 5, 1));

    panel.add(bccButton, cc.xy(1, 7, CellConstraints.FILL, CellConstraints.DEFAULT));
    panel.add(bccComboBox, cc.xywh(3, 7, 5, 1));

}

From source file:org.columba.mail.gui.config.columns.ColumnConfigDialog.java

License:Mozilla Public License

private JPanel createPanel() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),3DLU,FILL:DEFAULT:NONE",
            "CENTER:DEFAULT:NONE,1DLU,FILL:DEFAULT:GROW(1.0),3DLU,CENTER:DEFAULT:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    jpanel1.setLayout(formlayout1);/*from   ww w . java2s  . c o m*/

    JLabel jlabel1 = new JLabel();
    jlabel1.setText("Columns:");
    jpanel1.add(jlabel1, cc.xy(1, 1));

    JScrollPane scrollPane = new JScrollPane(list);
    scrollPane.setPreferredSize(new Dimension(250, 200));
    jpanel1.add(scrollPane, cc.xy(1, 3));

    jpanel1.add(createPanel1(), new CellConstraints(3, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));

    return jpanel1;
}