Example usage for com.jgoodies.forms.factories Borders BUTTON_BAR_PAD

List of usage examples for com.jgoodies.forms.factories Borders BUTTON_BAR_PAD

Introduction

In this page you can find the example usage for com.jgoodies.forms.factories Borders BUTTON_BAR_PAD.

Prototype

Border BUTTON_BAR_PAD

To view the source code for com.jgoodies.forms.factories Borders BUTTON_BAR_PAD.

Click Source Link

Document

A standardized Border that describes the gap between a component and a button bar in its bottom.

Usage

From source file:UpdateDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Open Source Project license - unknown
    ResourceBundle bundle = ResourceBundle.getBundle("UpdateDialog");
    JPanel dialogPane = new JPanel();
    JPanel contentPanel = new JPanel();
    JScrollPane scrollPane1 = new JScrollPane();
    table = new JXTable();
    JPanel topPanel = new JPanel();
    JLabel labelUpdateServer = new JLabel();
    server = new JLabel();
    labelUpdatesCount = new JLabel();
    JXButtonPanel buttonBar = new JXButtonPanel();
    progressBar = new JProgressBar();
    btnOK = new JButton();
    btnCancel = new JButton();
    CellConstraints cc = new CellConstraints();

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

    //======== dialogPane ========
    {/*www  . ja v  a  2  s  .  c  o  m*/
        dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));
        dialogPane.setLayout(new BorderLayout());

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

            //======== scrollPane1 ========
            {
                scrollPane1.setViewportView(table);
            }
            contentPanel.add(scrollPane1, BorderLayout.CENTER);

            //======== topPanel ========
            {

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

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

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

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

                topPanelBuilder.add(labelUpdateServer, cc.xy(1, 1));
                topPanelBuilder.add(server, cc.xy(3, 1));
                topPanelBuilder.add(labelUpdatesCount, cc.xy(7, 1));
            }
            contentPanel.add(topPanel, BorderLayout.NORTH);
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

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

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

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

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

            buttonBarBuilder.add(progressBar, cc.xy(2, 1));
            buttonBarBuilder.add(btnOK, cc.xy(4, 1));
            buttonBarBuilder.add(btnCancel, 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:ConnectDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Open Source Project license - unknown
    ResourceBundle bundle = ResourceBundle.getBundle("ConnectDialog");
    dialogPane = new JPanel();
    JPanel contentPanel = new JPanel();
    JLabel labelHostName = new JLabel();
    fieldHostName = new JTextField();
    JLabel labelPortNumber = new JLabel();
    fieldPort = new JTextField();
    checkAuthentification = new JCheckBox();
    labelLoginName = new JLabel();
    fieldUserName = new JTextField();
    labelPassword = new JLabel();
    fieldPassword = new JPasswordField();
    checkStorePassword = new JCheckBox();
    labelWarning = new JLabel();
    JXButtonPanel buttonBar = new JXButtonPanel();
    btnOk = new JButton();
    btnCancel = new JButton();
    CellConstraints cc = new CellConstraints();

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

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

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW),
                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC },
                    new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                            FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,
                            FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                            FormSpecs.DEFAULT_ROWSPEC }));

            //---- labelHostName ----
            labelHostName.setText(bundle.getString("labelHostName.text"));
            labelHostName.setLabelFor(fieldHostName);
            contentPanel.add(labelHostName, cc.xy(1, 1));

            //---- fieldHostName ----
            fieldHostName.setColumns(8);
            contentPanel.add(fieldHostName, cc.xy(3, 1));

            //---- labelPortNumber ----
            labelPortNumber.setText(bundle.getString("labelPortNumber.text"));
            labelPortNumber.setLabelFor(fieldPort);
            contentPanel.add(labelPortNumber, cc.xy(5, 1));

            //---- fieldPort ----
            fieldPort.setColumns(6);
            contentPanel.add(fieldPort, cc.xy(7, 1));

            //---- checkAuthentification ----
            checkAuthentification.setText(bundle.getString("checkAuthentification.text"));
            contentPanel.add(checkAuthentification, new CellConstraints(1, 3, 3, 1, CellConstraints.DEFAULT,
                    CellConstraints.DEFAULT, new Insets(0, 7, 0, 0)));

            //---- labelLoginName ----
            labelLoginName.setText(bundle.getString("labelLoginName.text"));
            labelLoginName.setLabelFor(fieldUserName);
            contentPanel.add(labelLoginName, cc.xy(1, 5));
            contentPanel.add(fieldUserName, cc.xy(3, 5));

            //---- labelPassword ----
            labelPassword.setText(bundle.getString("labelPassword.text"));
            labelPassword.setLabelFor(fieldPassword);
            contentPanel.add(labelPassword, cc.xy(1, 7));
            contentPanel.add(fieldPassword, cc.xy(3, 7));

            //---- checkStorePassword ----
            checkStorePassword.setText(bundle.getString("checkStorePassword.text"));
            contentPanel.add(checkStorePassword, cc.xywh(5, 7, 3, 1));

            //---- labelWarning ----
            labelWarning.setText(bundle.getString("labelWarning.text"));
            labelWarning.setForeground(Color.red);
            contentPanel.add(labelWarning, cc.xywh(1, 9, 7, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_PAD);
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormSpecs.GLUE_COLSPEC, FormSpecs.BUTTON_COLSPEC,
                            FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.BUTTON_COLSPEC },
                    RowSpec.decodeSpecs("pref")));
            ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 2, 4 } });

            //---- btnOk ----
            btnOk.setText(bundle.getString("btnOk.text"));
            buttonBar.add(btnOk, cc.xy(2, 1));

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

From source file:UserPreferencesDialog.java

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

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

    //======== dialogPane ========
    {/*from  ww  w.ja v a2s  .c o m*/
        dialogPane.setLayout(new BorderLayout());

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

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

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

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

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

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

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

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

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

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

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

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

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

                    }

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

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

                    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    }

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

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

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

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

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

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

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

From source file:cz.vity.freerapid.gui.dialogs.AboutDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Open Source Project license - unknown
    infoLabel = new JLabel();
    infoLabel.setName("infoLabel");

    JPanel dialogPane = new JPanel();
    JPanel contentPanel = new JPanel();
    xImagePanel = new JLabel() {
        @Override/*  www  .  ja v a  2s. c o m*/
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            synchronized (volleys) {
                for (VolleyExplosion exp : volleys) {
                    exp.paint(g);
                }
            }
        }
    };
    JPanel buttonBar = new JPanel();
    btnOK = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== AboutDialog ========
    {
        this.setName("AboutDialog");
        Container aboutDialogContentPane = this.getContentPane();
        aboutDialogContentPane.setLayout(new BorderLayout());

        //======== dialogPane ========
        {
            dialogPane.setBorder(Borders.DIALOG);
            dialogPane.setName("dialogPane");
            dialogPane.setLayout(new BorderLayout());

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

                //---- xImagePanel ----
                xImagePanel.setName("xImagePanel");
                contentPanel.add(xImagePanel, BorderLayout.CENTER);
                contentPanel.add(infoLabel);
            }
            dialogPane.add(contentPanel, BorderLayout.CENTER);

            //======== buttonBar ========
            {
                buttonBar.setBorder(Borders.BUTTON_BAR_PAD);
                buttonBar.setName("buttonBar");

                //---- btnOK ----
                btnOK.setName("btnOK");

                PanelBuilder buttonBarBuilder = new PanelBuilder(
                        new FormLayout("default:grow, max(pref;42dlu), default:grow", "pref"), buttonBar);

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

From source file:cz.vity.freerapid.gui.dialogs.SubmitErrorDialog.java

@SuppressWarnings({ "deprecation" })
private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Open Source Project license - unknown
    JPanel dialogPane = new JPanel();
    JPanel contentPanel = new JPanel();
    JLabel labelName = new JLabel();
    fieldName = ComponentFactory.getTextField();
    JLabel labelEmail = new JLabel();
    fieldEmail = ComponentFactory.getTextField();
    JLabel labelComment = new JLabel();
    JScrollPane scrollPane1 = new JScrollPane();
    commentTextArea = ComponentFactory.getTextArea();
    JLabel labelDescribeInfo = new JLabel();
    JPanel buttonBar = new JPanel();
    btnConnection = new JButton();
    btnOk = new JButton();
    btnCancel = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========

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

    //======== dialogPane ========
    {/*from   w  w w  .  j a  v  a  2s . c om*/
        dialogPane.setBorder(Borders.DIALOG);
        dialogPane.setName("dialogPane");
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setName("contentPanel");

            //---- labelName ----
            labelName.setLabelFor(fieldName);
            labelName.setName("labelName");

            //---- fieldName ----
            fieldName.setColumns(15);
            fieldName.setName("fieldName");

            //---- labelEmail ----
            labelEmail.setLabelFor(fieldEmail);
            labelEmail.setName("labelEmail");

            //---- fieldEmail ----
            fieldEmail.setColumns(15);
            fieldEmail.setName("fieldEmail");

            //---- labelComment ----
            labelComment.setLabelFor(commentTextArea);
            labelComment.setName("labelComment");

            //======== scrollPane1 ========
            {
                scrollPane1.setName("scrollPane1");

                //---- commentTextArea ----
                commentTextArea.setRows(10);
                commentTextArea.setLineWrap(true);
                commentTextArea.setName("commentTextArea");
                scrollPane1.setViewportView(commentTextArea);
            }

            //---- labelDescribeInfo ----
            labelDescribeInfo.setName("labelDescribeInfo");

            PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout(
                    new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC },
                    new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC,
                            new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                            FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }),
                    contentPanel);

            contentPanelBuilder.add(labelName, cc.xy(1, 1));
            contentPanelBuilder.add(fieldName, cc.xy(3, 1));
            contentPanelBuilder.add(labelEmail, cc.xy(5, 1));
            contentPanelBuilder.add(fieldEmail, cc.xy(7, 1));
            contentPanelBuilder.add(labelComment,
                    cc.xywh(1, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));
            contentPanelBuilder.add(scrollPane1, cc.xywh(3, 3, 5, 1));
            contentPanelBuilder.add(labelDescribeInfo, cc.xywh(3, 5, 5, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_PAD);
            buttonBar.setName("buttonBar");

            //---- button1 ----
            btnConnection.setName("btnConnection");

            //---- okButton ----
            btnOk.setName("okButton");

            //---- cancelButton ----

            btnCancel.setName("cancelButton");

            PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout(
                    new ColumnSpec[] { FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,
                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(min;10dlu):grow"),
                            FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.BUTTON_COLSPEC,
                            FormSpecs.RELATED_GAP_COLSPEC, ComponentFactory.BUTTON_COLSPEC },
                    RowSpec.decodeSpecs("pref")), buttonBar);

            buttonBarBuilder.add(btnConnection,
                    cc.xywh(2, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
            buttonBarBuilder.add(btnOk, cc.xy(6, 1));
            buttonBarBuilder.add(btnCancel, cc.xy(8, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:cz.vity.freerapid.gui.dialogs.UpdateDialog.java

@SuppressWarnings({ "deprecation" })
private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Open Source Project license - unknown
    //ResourceBundle bundle = ResourceBundle.getBundle("UpdateDialog");
    JPanel dialogPane = new JPanel();
    JPanel contentPanel = new JPanel();
    JScrollPane scrollPane1 = new JScrollPane();
    table = new JXTable();
    JPanel topPanel = new JPanel();
    JLabel labelUpdateServer = new JLabel();
    labelServer = new JLabel();
    labelUpdatesCount = new JLabel();
    popmenuButton = ComponentFactory.getPopdownButton();
    popmenuButton.setName("popmenuButton");

    JXButtonPanel buttonBar = new JXButtonPanel();
    btnOK = new JButton();
    btnCancel = new JButton();
    CellConstraints cc = new CellConstraints();

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

    //======== dialogPane ========
    {//  www  .ja v  a2s .c  om
        dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));
        dialogPane.setLayout(new BorderLayout());

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

            //======== scrollPane1 ========
            {
                scrollPane1.setViewportView(table);
            }
            contentPanel.add(scrollPane1, BorderLayout.CENTER);

            //======== topPanel ========
            {

                //---- labelUpdateServer ----
                labelUpdateServer.setName("labelUpdateServer");

                //---- server ----
                labelServer.setName("server");

                //---- labelUpdatesCount ----
                labelUpdatesCount.setName("labelUpdatesCount");

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

                topPanelBuilder.add(labelUpdateServer, cc.xy(1, 1));
                topPanelBuilder.add(labelServer, cc.xy(3, 1));
                topPanelBuilder.add(labelUpdatesCount, cc.xy(7, 1));
            }
            contentPanel.add(topPanel, BorderLayout.NORTH);
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

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

            //---- btnOK ----
            btnOK.setName("btnOK");

            //---- btnCancel ----
            btnCancel.setName("btnCancel");

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

            buttonBarBuilder.add(popmenuButton, cc.xy(2, 1));
            buttonBarBuilder.add(btnOK, cc.xy(4, 1));
            buttonBarBuilder.add(btnCancel, cc.xy(6, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
}

From source file:de.bund.bfr.knime.openkrise.db.gui.About.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    ResourceBundle bundle = ResourceBundle.getBundle("de.bund.bfr.knime.openkrise.db.gui.PanelProps");
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label1 = compFactory.createLabel("");
    label3 = new JLabel();
    label2 = new JLabel();
    label4 = new JLabel();
    buttonBar = new JPanel();
    okButton = new JButton();

    //======== this ========
    setTitle(bundle.getString("About.this.title"));
    setModal(true);/*ww  w . ja  v a  2 s .co m*/
    setResizable(false);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

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

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout("default:grow", "fill:default:grow, 4*($lgap, default)"));

            //---- label1 ----
            label1.setIcon(new ImageIcon(
                    getClass().getResource("/de/bund/bfr/knime/openkrise/db/gui/res/Database.gif")));
            label1.setPreferredSize(new Dimension(180, 170));
            label1.setMaximumSize(new Dimension(255, 240));
            label1.setMinimumSize(new Dimension(128, 120));
            label1.setHorizontalAlignment(SwingConstants.CENTER);
            contentPanel.add(label1, CC.xy(1, 1, CC.FILL, CC.FILL));

            //---- label3 ----
            label3.setText(bundle.getString("About.label3.text"));
            label3.setHorizontalAlignment(SwingConstants.LEFT);
            label3.setFont(new Font("Dotum", Font.BOLD, 20));
            contentPanel.add(label3, CC.xy(1, 3));

            //---- label2 ----
            label2.setText(bundle.getString("About.label2.text"));
            label2.setHorizontalAlignment(SwingConstants.LEFT);
            contentPanel.add(label2, CC.xy(1, 5));

            //---- label4 ----
            label4.setText(bundle.getString("About.label4.text"));
            label4.setHorizontalAlignment(SwingConstants.LEFT);
            contentPanel.add(label4, CC.xy(1, 9));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_PAD);
            buttonBar.setLayout(new FormLayout("$glue, $button", "pref"));

            //---- okButton ----
            okButton.setText("OK");
            okButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed(e);
                }
            });
            buttonBar.add(okButton, CC.xy(2, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    setSize(210, 310);
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:de.bund.bfr.knime.openkrise.db.gui.ChangeMasterPass.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label1 = new JLabel();
    textField1 = new JTextField();
    checkBox1 = new JCheckBox();
    label2 = new JLabel();
    passwordField1 = new JPasswordField();
    label3 = new JLabel();
    passwordField2 = new JPasswordField();
    buttonBar = new JPanel();
    okButton = new JButton();
    cancelButton = new JButton();

    //======== this ========
    setTitle("Change Master");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

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

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout("default, $lcgap, default:grow, $lcgap, default",
                    "2*(default, $lgap), default"));

            //---- label1 ----
            label1.setText("New Master Username:");
            contentPanel.add(label1, CC.xy(1, 1));

            //---- textField1 ----
            textField1.setColumns(20);
            textField1.setEnabled(false);
            contentPanel.add(textField1, CC.xy(3, 1));

            //---- checkBox1 ----
            checkBox1.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    checkBox1ActionPerformed(e);
                }
            });
            contentPanel.add(checkBox1, CC.xy(5, 1));

            //---- label2 ----
            label2.setText("New Master Password:");
            contentPanel.add(label2, CC.xy(1, 3));
            contentPanel.add(passwordField1, CC.xywh(3, 3, 3, 1));

            //---- label3 ----
            label3.setText("Retype Password:");
            contentPanel.add(label3, CC.xy(1, 5));
            contentPanel.add(passwordField2, CC.xywh(3, 5, 3, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_PAD);
            buttonBar.setLayout(new FormLayout("$glue, $button, $rgap, $button", "pref"));

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

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

From source file:de.bund.bfr.knime.openkrise.db.gui.InfoBox.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license
    dialogPane = new JPanel();
    contentPane = new JPanel();
    scroller = new JScrollPane();
    infoTextArea = new JTextArea();
    buttonBar = new JPanel();
    okButton = new JButton();
    CellConstraints cc = new CellConstraints();

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

    //======== dialogPane ========
    {// w  w w. j  ava  2s.  co  m
        dialogPane.setBorder(Borders.DIALOG);
        dialogPane.setLayout(new BorderLayout());

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

            //======== scroller ========
            {

                //---- infoTextArea ----
                infoTextArea.setText(inhalt);
                scroller.setViewportView(infoTextArea);
            }
            contentPane.add(scroller, cc.xy(1, 1));
        }
        dialogPane.add(contentPane, BorderLayout.CENTER);

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

            //---- okButton ----
            okButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    okButton_actionPerformed(e);
                }
            });
            okButton.setText("OK");
            buttonBar.add(okButton, cc.xy(2, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane2.add(dialogPane, BorderLayout.CENTER);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:de.bund.bfr.knime.openkrise.db.gui.Login.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    ResourceBundle bundle = ResourceBundle.getBundle("de.bund.bfr.knime.openkrise.db.gui.PanelProps");
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label1 = new JLabel();
    textField1 = new JTextField();
    label2 = new JLabel();
    passwordField1 = new JPasswordField();
    button1 = new JButton();
    textField2 = new JTextField();
    checkBox2 = new JCheckBox();
    checkBox1 = new JCheckBox();
    label3 = new JLabel();
    passwordField2 = new JPasswordField();
    label4 = new JLabel();
    passwordField3 = new JPasswordField();
    buttonBar = new JPanel();
    okButton = new JButton();
    cancelButton = new JButton();

    //======== this ========
    setTitle(bundle.getString("Login.this.title"));
    setAlwaysOnTop(true);//  w  w  w  .j ava2s. c o m
    setIconImage(new ImageIcon(getClass().getResource("/de/bund/bfr/knime/openkrise/db/gui/res/Database.gif"))
            .getImage());
    setFont(new Font("Tahoma", Font.PLAIN, 13));
    addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            thisWindowClosing(e);
        }

        @Override
        public void windowOpened(WindowEvent e) {
            thisWindowOpened(e);
        }
    });
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG);
        dialogPane.setFont(new Font("Tahoma", Font.PLAIN, 13));
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setFont(new Font("Tahoma", Font.PLAIN, 13));
            contentPanel
                    .setLayout(new FormLayout("default, 10dlu, default:grow", "5*(default, $lgap), default"));

            //---- label1 ----
            label1.setText(bundle.getString("Login.label1.text"));
            label1.setFont(new Font("Tahoma", Font.PLAIN, 13));
            contentPanel.add(label1, CC.xy(1, 1));

            //---- textField1 ----
            textField1.setFont(new Font("Tahoma", Font.PLAIN, 13));
            textField1.addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    textField1KeyReleased(e);
                }
            });
            contentPanel.add(textField1, CC.xy(3, 1));

            //---- label2 ----
            label2.setText(bundle.getString("Login.label2.text"));
            label2.setFont(new Font("Tahoma", Font.PLAIN, 13));
            contentPanel.add(label2, CC.xy(1, 3));

            //---- passwordField1 ----
            passwordField1.setFont(new Font("Tahoma", Font.PLAIN, 13));
            passwordField1.addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    passwordField1KeyReleased(e);
                }
            });
            contentPanel.add(passwordField1, CC.xy(3, 3));

            //---- button1 ----
            button1.setText(bundle.getString("Login.button1.text"));
            button1.setFont(new Font("Tahoma", Font.PLAIN, 13));
            button1.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    button1ActionPerformed(e);
                }
            });
            contentPanel.add(button1, CC.xy(1, 5));

            //---- textField2 ----
            textField2.setFont(new Font("Tahoma", Font.PLAIN, 13));
            textField2.addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    textField2KeyReleased(e);
                }
            });
            contentPanel.add(textField2, CC.xy(3, 5));

            //---- checkBox2 ----
            checkBox2.setText(bundle.getString("Login.checkBox2.text"));
            checkBox2.setSelected(true);
            contentPanel.add(checkBox2, CC.xy(1, 7));

            //---- checkBox1 ----
            checkBox1.setText(bundle.getString("Login.checkBox1.text"));
            checkBox1.setFont(new Font("Tahoma", Font.PLAIN, 13));
            checkBox1.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    checkBox1ActionPerformed(e);
                }
            });
            checkBox1.addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    checkBox1KeyReleased(e);
                }
            });
            contentPanel.add(checkBox1, CC.xy(3, 7));

            //---- label3 ----
            label3.setText(bundle.getString("Login.label3.text"));
            label3.setFont(new Font("Tahoma", Font.PLAIN, 13));
            contentPanel.add(label3, CC.xy(1, 9));

            //---- passwordField2 ----
            passwordField2.setEnabled(false);
            passwordField2.setFont(new Font("Tahoma", Font.PLAIN, 13));
            passwordField2.addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    passwordField2KeyReleased(e);
                }
            });
            contentPanel.add(passwordField2, CC.xy(3, 9));

            //---- label4 ----
            label4.setText(bundle.getString("Login.label4.text"));
            label4.setFont(new Font("Tahoma", Font.PLAIN, 13));
            contentPanel.add(label4, CC.xy(1, 11));

            //---- passwordField3 ----
            passwordField3.setEnabled(false);
            passwordField3.setFont(new Font("Tahoma", Font.PLAIN, 13));
            passwordField3.addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    passwordField3KeyReleased(e);
                }
            });
            contentPanel.add(passwordField3, CC.xy(3, 11));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_PAD);
            buttonBar.setFont(new Font("Tahoma", Font.PLAIN, 13));
            buttonBar.setLayout(new FormLayout("$glue, $button, $rgap, $button", "pref"));

            //---- okButton ----
            okButton.setText("OK");
            okButton.setFont(new Font("Tahoma", Font.PLAIN, 13));
            okButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed(e);
                }
            });
            buttonBar.add(okButton, CC.xy(2, 1));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            cancelButton.setIcon(null);
            cancelButton.setFont(new Font("Tahoma", Font.PLAIN, 13));
            cancelButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    cancelButtonActionPerformed(e);
                }
            });
            buttonBar.add(cancelButton, CC.xy(4, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    setSize(435, 245);
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}