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

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

Introduction

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

Prototype

Border DLU4

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

Click Source Link

Document

A prepared and reusable Border with 4dlu on all sides.

Usage

From source file:com.maheffa.TabulatedOCR.GUI.Configuration.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Mahefa Manitrativo
    tabbedPane1 = new JTabbedPane();
    panel1 = new JPanel();
    panel4 = new JPanel();
    label2 = new JLabel();
    txtDPI = new JTextField();
    label15 = new JLabel();
    comboLang = new JComboBox();
    label19 = new JLabel();
    checkNoiseRemoveTesseract = new JCheckBox();
    label21 = new JLabel();
    checkDictionary = new JCheckBox();
    panel9 = new JPanel();
    panel12 = new JPanel();
    label3 = new JLabel();
    label4 = new JLabel();
    panel13 = new JPanel();
    comboGrayscale = new JComboBox();
    checkBinary = new JCheckBox();
    panel6 = new JPanel();
    label20 = new JLabel();
    checkDeskew = new JCheckBox();
    label14 = new JLabel();
    txtMaxAngleTolerance = new JTextField();
    panel3 = new JPanel();
    panel10 = new JPanel();
    panel14 = new JPanel();
    label5 = new JLabel();
    label6 = new JLabel();
    panel15 = new JPanel();
    txtRadius = new JTextField();
    txtMargin = new JTextField();
    panel11 = new JPanel();
    panel17 = new JPanel();
    label7 = new JLabel();
    label8 = new JLabel();
    label9 = new JLabel();
    label10 = new JLabel();
    label11 = new JLabel();
    label12 = new JLabel();
    label13 = new JLabel();
    panel18 = new JPanel();
    txtThreshold1 = new JTextField();
    txtThreshold2 = new JTextField();
    txtDistanceAccumulation = new JTextField();
    txtAngleAccumulation = new JTextField();
    txtAccumulationThreshold = new JTextField();
    txtMinimumLineLength = new JTextField();
    txtMaxGap = new JTextField();
    panel5 = new JPanel();
    label16 = new JLabel();
    txtMaxLineDistance = new JTextField();
    label17 = new JLabel();
    txtMaxLineGap = new JTextField();
    label18 = new JLabel();
    txtThickness = new JTextField();
    panel2 = new JPanel();
    label1 = new JLabel();
    txtConfigurationName = new JTextField();
    butSave = new JButton();
    panel7 = new JPanel();
    butDelete = new JButton();
    comboConfigList = new JComboBox();

    //======== this ========
    setBorder(Borders.DLU4);

    // JFormDesigner evaluation mark
    setBorder(/*from   w  w  w.j  a  v  a2 s.  c om*/
            new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    getBorder()));
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new GridBagLayout());
    ((GridBagLayout) getLayout()).columnWidths = new int[] { 0, 0, 0 };
    ((GridBagLayout) getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0 };
    ((GridBagLayout) getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
    ((GridBagLayout) getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0E-4 };

    //======== tabbedPane1 ========
    {
        tabbedPane1.setBorder(Borders.DLU4);

        //======== panel1 ========
        {
            panel1.setBorder(Borders.DLU4);
            panel1.setLayout(new GridBagLayout());
            ((GridBagLayout) panel1.getLayout()).columnWidths = new int[] { 0, 0, 0 };
            ((GridBagLayout) panel1.getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
            ((GridBagLayout) panel1.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
            ((GridBagLayout) panel1.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 };

            //======== panel4 ========
            {
                panel4.setBorder(new CompoundBorder(new TitledBorder(""), Borders.DLU4));
                panel4.setLayout(new GridBagLayout());
                ((GridBagLayout) panel4.getLayout()).columnWidths = new int[] { 0, 0, 0 };
                ((GridBagLayout) panel4.getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0 };
                ((GridBagLayout) panel4.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
                ((GridBagLayout) panel4.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0E-4 };

                //---- label2 ----
                label2.setText("DPI:");
                label2.setHorizontalAlignment(SwingConstants.TRAILING);
                panel4.add(label2, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

                //---- txtDPI ----
                txtDPI.setText("300");
                txtDPI.setPreferredSize(new Dimension(80, 26));
                txtDPI.setHorizontalAlignment(SwingConstants.TRAILING);
                panel4.add(txtDPI, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
                        GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                //---- label15 ----
                label15.setText("\u042f\u0437\u044b\u043a:");
                label15.setHorizontalAlignment(SwingConstants.TRAILING);
                panel4.add(label15, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

                //---- comboLang ----
                comboLang.setModel(new DefaultComboBoxModel(new String[] { "eng", "rus", "fra" }));
                panel4.add(comboLang, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
                        GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                //---- label19 ----
                label19.setText(
                        "\u0421\u0438\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0448\u0443\u043c\u044b:");
                label19.setHorizontalAlignment(SwingConstants.TRAILING);
                panel4.add(label19, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));
                panel4.add(checkNoiseRemoveTesseract, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                //---- label21 ----
                label21.setText(
                        "\u0414\u043e\u043f\u043e\u043b\u044c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044c:");
                label21.setHorizontalAlignment(SwingConstants.TRAILING);
                panel4.add(label21, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));
                panel4.add(checkDictionary, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
            }
            panel1.add(panel4, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH,
                    GridBagConstraints.HORIZONTAL, new Insets(0, 0, 5, 5), 0, 0));

            //======== panel9 ========
            {
                panel9.setBorder(new CompoundBorder(new TitledBorder(
                        "\u041f\u0435\u0440\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435"),
                        Borders.DLU4));
                panel9.setLayout(new GridBagLayout());
                ((GridBagLayout) panel9.getLayout()).columnWidths = new int[] { 0, 0, 0 };
                ((GridBagLayout) panel9.getLayout()).rowHeights = new int[] { 0, 0 };
                ((GridBagLayout) panel9.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
                ((GridBagLayout) panel9.getLayout()).rowWeights = new double[] { 0.0, 1.0E-4 };

                //======== panel12 ========
                {
                    panel12.setLayout(new GridBagLayout());
                    ((GridBagLayout) panel12.getLayout()).columnWidths = new int[] { 0, 0 };
                    ((GridBagLayout) panel12.getLayout()).rowHeights = new int[] { 0, 0, 0 };
                    ((GridBagLayout) panel12.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
                    ((GridBagLayout) panel12.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

                    //---- label3 ----
                    label3.setText(
                            "\u041c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0447\u0451\u0440\u043d\u043e-\u0431\u0435\u043b\u043e\u0435");
                    panel12.add(label3, new GridBagConstraints(0, 0, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                    //---- label4 ----
                    label4.setText(
                            "\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438");
                    panel12.add(label4, new GridBagConstraints(0, 1, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
                }
                panel9.add(panel12, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                        GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 5), 0, 0));

                //======== panel13 ========
                {
                    panel13.setLayout(new GridBagLayout());
                    ((GridBagLayout) panel13.getLayout()).columnWidths = new int[] { 0, 0 };
                    ((GridBagLayout) panel13.getLayout()).rowHeights = new int[] { 0, 0, 0 };
                    ((GridBagLayout) panel13.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
                    ((GridBagLayout) panel13.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

                    //---- comboGrayscale ----
                    comboGrayscale.setModel(
                            new DefaultComboBoxModel(new String[] { "Average", "Luminosity", "Lightness" }));
                    comboGrayscale.setSelectedIndex(1);
                    panel13.add(comboGrayscale, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                    //---- checkBinary ----
                    checkBinary.setSelected(true);
                    panel13.add(checkBinary, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
                }
                panel9.add(panel13, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
            }
            panel1.add(panel9, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

            //======== panel6 ========
            {
                panel6.setBorder(new CompoundBorder(new TitledBorder("\u041d\u0430\u043a\u043b\u043e\u043d"),
                        Borders.DLU4));
                panel6.setLayout(new GridBagLayout());
                ((GridBagLayout) panel6.getLayout()).columnWidths = new int[] { 0, 0, 0 };
                ((GridBagLayout) panel6.getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
                ((GridBagLayout) panel6.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
                ((GridBagLayout) panel6.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 };

                //---- label20 ----
                label20.setText(
                        "\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430:");
                label20.setHorizontalAlignment(SwingConstants.TRAILING);
                panel6.add(label20, new GridBagConstraints(0, 0, 1, 1, 0.3, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));
                panel6.add(checkDeskew, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                //---- label14 ----
                label14.setText(
                        "\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0438 (\u0433\u0440\u0430\u0434):");
                label14.setHorizontalAlignment(SwingConstants.TRAILING);
                panel6.add(label14, new GridBagConstraints(0, 1, 1, 1, 0.3, 1.0, GridBagConstraints.EAST,
                        GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));

                //---- txtMaxAngleTolerance ----
                txtMaxAngleTolerance.setMinimumSize(new Dimension(50, 27));
                txtMaxAngleTolerance.setPreferredSize(new Dimension(50, 27));
                txtMaxAngleTolerance.setHorizontalAlignment(SwingConstants.TRAILING);
                panel6.add(txtMaxAngleTolerance, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
                        GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));
            }
            panel1.add(panel6, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));
        }
        tabbedPane1.addTab("\u041e\u0431\u0449\u0435\u0435", panel1);

        //======== panel3 ========
        {
            panel3.setBorder(Borders.DLU4);
            panel3.setLayout(new GridBagLayout());
            ((GridBagLayout) panel3.getLayout()).columnWidths = new int[] { 0, 0 };
            ((GridBagLayout) panel3.getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
            ((GridBagLayout) panel3.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
            ((GridBagLayout) panel3.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 };

            //======== panel10 ========
            {
                panel10.setBorder(new CompoundBorder(new TitledBorder(
                        "\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u043a\u0432"),
                        Borders.DLU4));
                panel10.setLayout(new GridBagLayout());
                ((GridBagLayout) panel10.getLayout()).columnWidths = new int[] { 0, 0, 0 };
                ((GridBagLayout) panel10.getLayout()).rowHeights = new int[] { 0, 0 };
                ((GridBagLayout) panel10.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
                ((GridBagLayout) panel10.getLayout()).rowWeights = new double[] { 0.0, 1.0E-4 };

                //======== panel14 ========
                {
                    panel14.setLayout(new GridBagLayout());
                    ((GridBagLayout) panel14.getLayout()).columnWidths = new int[] { 0, 0 };
                    ((GridBagLayout) panel14.getLayout()).rowHeights = new int[] { 0, 0, 0 };
                    ((GridBagLayout) panel14.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
                    ((GridBagLayout) panel14.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

                    //---- label5 ----
                    label5.setText(
                            "\u0420\u0430\u0434\u0438\u0443\u0441 \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438 (px):");
                    panel14.add(label5, new GridBagConstraints(0, 0, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                    //---- label6 ----
                    label6.setText(
                            "\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0431\u0443\u043a\u0432\u0430\u043c\u0438 (px):");
                    panel14.add(label6, new GridBagConstraints(0, 1, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
                }
                panel10.add(panel14, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                        GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 5), 0, 0));

                //======== panel15 ========
                {
                    panel15.setLayout(new GridBagLayout());
                    ((GridBagLayout) panel15.getLayout()).columnWidths = new int[] { 0, 0 };
                    ((GridBagLayout) panel15.getLayout()).rowHeights = new int[] { 0, 0, 0 };
                    ((GridBagLayout) panel15.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
                    ((GridBagLayout) panel15.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

                    //---- txtRadius ----
                    txtRadius.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel15.add(txtRadius, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                    //---- txtMargin ----
                    txtMargin.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel15.add(txtMargin, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
                }
                panel10.add(panel15, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
            }
            panel3.add(panel10, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 10, 0), 0, 0));

            //======== panel11 ========
            {
                panel11.setBorder(new CompoundBorder(new TitledBorder(
                        "\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0438"),
                        Borders.DLU4));
                panel11.setLayout(new GridBagLayout());
                ((GridBagLayout) panel11.getLayout()).columnWidths = new int[] { 0, 0, 0 };
                ((GridBagLayout) panel11.getLayout()).rowHeights = new int[] { 0, 0 };
                ((GridBagLayout) panel11.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
                ((GridBagLayout) panel11.getLayout()).rowWeights = new double[] { 0.0, 1.0E-4 };

                //======== panel17 ========
                {
                    panel17.setLayout(new GridBagLayout());
                    ((GridBagLayout) panel17.getLayout()).columnWidths = new int[] { 0, 0 };
                    ((GridBagLayout) panel17.getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                    ((GridBagLayout) panel17.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
                    ((GridBagLayout) panel17.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0,
                            0.0, 0.0, 0.0, 1.0E-4 };

                    //---- label7 ----
                    label7.setText(
                            "\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Canny - \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 (px):");
                    panel17.add(label7, new GridBagConstraints(0, 0, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                    //---- label8 ----
                    label8.setText(
                            "\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Canny - \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0440\u043e\u0433 (px):");
                    panel17.add(label8, new GridBagConstraints(0, 1, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                    //---- label9 ----
                    label9.setText(
                            "\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0425\u0430\u0444\u0430 - \u041f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0442\u043e\u044f\u043d\u0438\u044f (px):");
                    panel17.add(label9, new GridBagConstraints(0, 2, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                    //---- label10 ----
                    label10.setText(
                            "\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0425\u0430\u0444\u0430 - \u041f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0443\u0433\u043b\u0430 (\u0433\u0440\u0430\u0434):");
                    panel17.add(label10, new GridBagConstraints(0, 3, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                    //---- label11 ----
                    label11.setText(
                            "\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0425\u0430\u0444\u0430 - \u041f\u043e\u0440\u043e\u0433 \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0438: ");
                    panel17.add(label11, new GridBagConstraints(0, 4, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                    //---- label12 ----
                    label12.setText(
                            "\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0425\u0430\u0444\u0430 - \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043b\u0438\u043d\u0438\u0438 (px):");
                    panel17.add(label12, new GridBagConstraints(0, 5, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

                    //---- label13 ----
                    label13.setText(
                            "\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0425\u0430\u0444\u0430 - \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \n\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043b\u0438\u043d\u044f\u043c\u0438 (px):");
                    panel17.add(label13, new GridBagConstraints(0, 6, 1, 1, 0.0, 1.0, GridBagConstraints.EAST,
                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));
                }
                panel11.add(panel17, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                        GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 5), 0, 0));

                //======== panel18 ========
                {
                    panel18.setLayout(new GridBagLayout());
                    ((GridBagLayout) panel18.getLayout()).columnWidths = new int[] { 0, 0 };
                    ((GridBagLayout) panel18.getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                    ((GridBagLayout) panel18.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
                    ((GridBagLayout) panel18.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0,
                            0.0, 0.0, 0.0, 1.0E-4 };

                    //---- txtThreshold1 ----
                    txtThreshold1.setMinimumSize(new Dimension(50, 27));
                    txtThreshold1.setPreferredSize(new Dimension(50, 27));
                    txtThreshold1.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel18.add(txtThreshold1, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                    //---- txtThreshold2 ----
                    txtThreshold2.setMinimumSize(new Dimension(50, 27));
                    txtThreshold2.setPreferredSize(new Dimension(50, 27));
                    txtThreshold2.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel18.add(txtThreshold2, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                    //---- txtDistanceAccumulation ----
                    txtDistanceAccumulation.setMinimumSize(new Dimension(50, 27));
                    txtDistanceAccumulation.setPreferredSize(new Dimension(50, 27));
                    txtDistanceAccumulation.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel18.add(txtDistanceAccumulation, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                    //---- txtAngleAccumulation ----
                    txtAngleAccumulation.setMinimumSize(new Dimension(50, 27));
                    txtAngleAccumulation.setPreferredSize(new Dimension(50, 27));
                    txtAngleAccumulation.setText("0.12354569");
                    txtAngleAccumulation.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel18.add(txtAngleAccumulation, new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                    //---- txtAccumulationThreshold ----
                    txtAccumulationThreshold.setMinimumSize(new Dimension(50, 27));
                    txtAccumulationThreshold.setPreferredSize(new Dimension(50, 27));
                    txtAccumulationThreshold.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel18.add(txtAccumulationThreshold, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                    //---- txtMinimumLineLength ----
                    txtMinimumLineLength.setMinimumSize(new Dimension(50, 27));
                    txtMinimumLineLength.setPreferredSize(new Dimension(50, 27));
                    txtMinimumLineLength.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel18.add(txtMinimumLineLength, new GridBagConstraints(0, 5, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                    //---- txtMaxGap ----
                    txtMaxGap.setMinimumSize(new Dimension(50, 27));
                    txtMaxGap.setPreferredSize(new Dimension(50, 27));
                    txtMaxGap.setHorizontalAlignment(SwingConstants.TRAILING);
                    panel18.add(txtMaxGap, new GridBagConstraints(0, 6, 1, 1, 1.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));
                }
                panel11.add(panel18, new GridBagConstraints(1, 0, 1, 1, 4.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
            }
            panel3.add(panel11, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 10, 0), 0, 0));

            //======== panel5 ========
            {
                panel5.setBorder(new CompoundBorder(new TitledBorder(
                        "\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446"),
                        Borders.DLU4));
                panel5.setLayout(new GridBagLayout());
                ((GridBagLayout) panel5.getLayout()).columnWidths = new int[] { 0, 0, 0 };
                ((GridBagLayout) panel5.getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
                ((GridBagLayout) panel5.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
                ((GridBagLayout) panel5.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 };

                //---- label16 ----
                label16.setText(
                        "\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043b\u0438\u043d\u0438\u044f\u043c\u0438 (px):");
                label16.setHorizontalAlignment(SwingConstants.TRAILING);
                panel5.add(label16, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

                //---- txtMaxLineDistance ----
                txtMaxLineDistance.setHorizontalAlignment(SwingConstants.TRAILING);
                panel5.add(txtMaxLineDistance, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                //---- label17 ----
                label17.setText(
                        "\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438 \u043b\u0438\u043d\u0438\u044f\u043c\u0438 (px):");
                label17.setHorizontalAlignment(SwingConstants.TRAILING);
                panel5.add(label17, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

                //---- txtMaxLineGap ----
                txtMaxLineGap.setHorizontalAlignment(SwingConstants.TRAILING);
                panel5.add(txtMaxLineGap, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                //---- label18 ----
                label18.setText(
                        "\u0422\u043e\u043b\u0449\u0438\u043d\u0430 \u043b\u0438\u043d\u0438\u0438 (px):");
                label18.setHorizontalAlignment(SwingConstants.TRAILING);
                panel5.add(label18, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));

                //---- txtThickness ----
                txtThickness.setHorizontalAlignment(SwingConstants.TRAILING);
                panel5.add(txtThickness, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
            }
            panel3.add(panel5, new GridBagConstraints(0, 2, 1, 1, 0.0, 1.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
        }
        tabbedPane1.addTab("\u041f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440", panel3);
    }
    add(tabbedPane1, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

    //======== panel2 ========
    {
        panel2.setBorder(Borders.DLU2);
        panel2.setLayout(new GridBagLayout());
        ((GridBagLayout) panel2.getLayout()).columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        ((GridBagLayout) panel2.getLayout()).rowHeights = new int[] { 0, 0 };
        ((GridBagLayout) panel2.getLayout()).columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 };
        ((GridBagLayout) panel2.getLayout()).rowWeights = new double[] { 0.0, 1.0E-4 };

        //---- label1 ----
        label1.setText("\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:");
        panel2.add(label1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));

        //---- txtConfigurationName ----
        txtConfigurationName.setMinimumSize(new Dimension(150, 27));
        txtConfigurationName.setPreferredSize(new Dimension(200, 27));
        panel2.add(txtConfigurationName, new GridBagConstraints(1, 0, 1, 1, 2.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));

        //---- butSave ----
        butSave.setText("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c");
        butSave.setHorizontalAlignment(SwingConstants.TRAILING);
        butSave.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butSaveConfigActionPerformed(e);
            }
        });
        panel2.add(butSave, new GridBagConstraints(11, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
    }
    add(panel2, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
            new Insets(0, 0, 5, 5), 0, 0));

    //======== panel7 ========
    {
        panel7.setLayout(new GridBagLayout());
        ((GridBagLayout) panel7.getLayout()).columnWidths = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel7.getLayout()).rowHeights = new int[] { 0, 0 };
        ((GridBagLayout) panel7.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
        ((GridBagLayout) panel7.getLayout()).rowWeights = new double[] { 0.0, 1.0E-4 };

        //---- butDelete ----
        butDelete.setText("\u0423\u0434\u0430\u043b\u0438\u0442\u044c");
        butDelete.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butDeleteActionPerformed(e);
            }
        });
        panel7.add(butDelete, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));

        //---- comboConfigList ----
        comboConfigList.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                comboConfigListItemStateChanged(e);
            }
        });
        panel7.add(comboConfigList, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
    }
    add(panel7, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.maheffa.TabulatedOCR.GUI.CreateProject.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Mahefa Manitrativo
    panel1 = new JPanel();
    label5 = new JLabel();
    txtProjectName = new JTextField();
    label2 = new JLabel();
    txtProjectImage = new JTextField();
    butChooseImage = new JButton();
    panel4 = new JPanel();
    butCreate = new JButton();

    //======== this ========
    setBorder(Borders.DLU4);

    // JFormDesigner evaluation mark
    setBorder(new CompoundBorder(new TitledBorder(new EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation",
            TitledBorder.CENTER, TitledBorder.BOTTOM, new Font("Dialog", Font.BOLD, 12), Color.red),
            getBorder()));//from   w  w w . j  av  a 2s  .co m
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new VerticalLayout(10));

    //======== panel1 ========
    {
        panel1.setBorder(new CompoundBorder(new EtchedBorder(), Borders.DLU4));
        panel1.setLayout(new GridBagLayout());
        ((GridBagLayout) panel1.getLayout()).columnWidths = new int[] { 0, 65, 0, 0, 0, 0 };
        ((GridBagLayout) panel1.getLayout()).rowHeights = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel1.getLayout()).columnWeights = new double[] { 0.0, 1.0, 0.0, 0.0, 1.0, 1.0E-4 };
        ((GridBagLayout) panel1.getLayout()).rowWeights = new double[] { 1.0, 0.0, 1.0E-4 };

        //---- label5 ----
        label5.setText(
                "\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:");
        panel1.add(label5, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));

        //---- txtProjectName ----
        txtProjectName.setPreferredSize(new Dimension(250, 22));
        panel1.add(txtProjectName, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

        //---- label2 ----
        label2.setText("\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:");
        panel1.add(label2, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 5), 0, 0));
        panel1.add(txtProjectImage, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));

        //---- butChooseImage ----
        butChooseImage.setText("\u0412\u044b\u0431\u0440\u0430\u0442\u044c");
        butChooseImage.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butChooseImageActionPerformed(e);
            }
        });
        panel1.add(butChooseImage, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));
    }
    add(panel1);

    //======== panel4 ========
    {
        panel4.setLayout(new GridBagLayout());
        ((GridBagLayout) panel4.getLayout()).columnWidths = new int[] { 0, 0 };
        ((GridBagLayout) panel4.getLayout()).rowHeights = new int[] { 0, 0 };
        ((GridBagLayout) panel4.getLayout()).columnWeights = new double[] { 1.0, 1.0E-4 };
        ((GridBagLayout) panel4.getLayout()).rowWeights = new double[] { 1.0, 1.0E-4 };

        //---- butCreate ----
        butCreate.setText("\u0421\u043e\u0437\u0434\u0430\u0442\u044c");
        butCreate.setHorizontalAlignment(SwingConstants.RIGHT);
        butCreate.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butCreateActionPerformed(e);
            }
        });
        panel4.add(butCreate, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
    }
    add(panel4);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.maheffa.TabulatedOCR.GUI.CreateTableFormat.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Mahefa Manitrativo
    panel4 = new JPanel();
    label6 = new JLabel();
    txtFormatName = new JTextField();
    panel1 = new JPanel();
    label1 = new JLabel();
    spinnerColumnNumber = new JSpinner();
    label5 = new JLabel();
    checkBox1 = new JCheckBox();
    panel2 = new JPanel();
    label4 = new JLabel();
    comboColumn = new JComboBox();
    label2 = new JLabel();
    txtColumnName = new JTextField();
    label3 = new JLabel();
    comboType = new JComboBox();
    butOK = new JButton();
    panel3 = new JPanel();
    butCreate = new JButton();

    //======== this ========
    setBorder(Borders.DLU4);
    setPreferredSize(new Dimension(450, 380));

    // JFormDesigner evaluation mark
    setBorder(new CompoundBorder(new TitledBorder(new EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation",
            TitledBorder.CENTER, TitledBorder.BOTTOM, new Font("Dialog", Font.BOLD, 12), Color.red),
            getBorder()));/*from   w  w  w.  java2 s. c  om*/
    addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new GridBagLayout());
    ((GridBagLayout) getLayout()).columnWidths = new int[] { 0, 0 };
    ((GridBagLayout) getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0 };
    ((GridBagLayout) getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
    ((GridBagLayout) getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0E-4 };

    //======== panel4 ========
    {
        panel4.setBorder(new CompoundBorder(new EtchedBorder(), Borders.DLU4));
        panel4.setLayout(new GridBagLayout());
        ((GridBagLayout) panel4.getLayout()).columnWidths = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel4.getLayout()).rowHeights = new int[] { 0, 0 };
        ((GridBagLayout) panel4.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
        ((GridBagLayout) panel4.getLayout()).rowWeights = new double[] { 0.0, 1.0E-4 };

        //---- label6 ----
        label6.setText("\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:");
        panel4.add(label6, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));
        panel4.add(txtFormatName, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    }
    add(panel4, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
            new Insets(0, 0, 5, 0), 0, 0));

    //======== panel1 ========
    {
        panel1.setBorder(new CompoundBorder(new EtchedBorder(), Borders.DLU4));
        panel1.setPreferredSize(new Dimension(350, 45));
        panel1.setLayout(new GridBagLayout());
        ((GridBagLayout) panel1.getLayout()).columnWidths = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel1.getLayout()).rowHeights = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel1.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
        ((GridBagLayout) panel1.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

        //---- label1 ----
        label1.setText(
                "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u044c\u0431\u0446\u0435\u0432:");
        panel1.add(label1, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));

        //---- spinnerColumnNumber ----
        spinnerColumnNumber.setModel(new SpinnerNumberModel(1, 1, null, 1));
        spinnerColumnNumber.setPreferredSize(new Dimension(40, 20));
        spinnerColumnNumber.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                spinnerColumnNumberStateChanged(e);
            }
        });
        panel1.add(spinnerColumnNumber, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

        //---- label5 ----
        label5.setText(
                "\u0418\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443");
        panel1.add(label5, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 5), 0, 0));

        //---- checkBox1 ----
        checkBox1.setSelected(true);
        panel1.add(checkBox1, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
    }
    add(panel1, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
            new Insets(0, 0, 5, 0), 0, 0));

    //======== panel2 ========
    {
        panel2.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(),
                "\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u0442\u043e\u044c\u0431\u0446\u044b",
                TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION), Borders.DLU4));
        panel2.setLayout(new GridBagLayout());
        ((GridBagLayout) panel2.getLayout()).columnWidths = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel2.getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0 };
        ((GridBagLayout) panel2.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
        ((GridBagLayout) panel2.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0E-4 };

        //---- label4 ----
        label4.setText("\u0421\u0442\u043e\u043b\u044c\u0431\u0446\u0430:");
        panel2.add(label4, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));

        //---- comboColumn ----
        comboColumn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                comboColumnActionPerformed(e);
            }
        });
        panel2.add(comboColumn, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

        //---- label2 ----
        label2.setText("\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:");
        panel2.add(label2, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));

        //---- txtColumnName ----
        txtColumnName.addPropertyChangeListener(new PropertyChangeListener() {
            @Override
            public void propertyChange(PropertyChangeEvent e) {
                columnNamePropertyChange(e);
            }
        });
        panel2.add(txtColumnName, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

        //---- label3 ----
        label3.setText("\u0422\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438:");
        panel2.add(label3, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));

        //---- comboType ----
        comboType.setModel(new DefaultComboBoxModel(new String[] { "TEXT", "INT", "DOUBLE" }));
        panel2.add(comboType, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

        //---- butOK ----
        butOK.setText("\u041e\u041a");
        butOK.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butOKActionPerformed(e);
            }
        });
        panel2.add(butOK, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
    }
    add(panel2, new GridBagConstraints(0, 2, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
            new Insets(0, 0, 5, 0), 0, 0));

    //======== panel3 ========
    {
        panel3.setLayout(new GridBagLayout());
        ((GridBagLayout) panel3.getLayout()).columnWidths = new int[] { 0, 0 };
        ((GridBagLayout) panel3.getLayout()).rowHeights = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel3.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
        ((GridBagLayout) panel3.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

        //---- butCreate ----
        butCreate.setText("\u0421\u043e\u0437\u0434\u0430\u0442\u044c");
        butCreate.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butCreateActionPerformed(e);
            }
        });
        panel3.add(butCreate, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));
    }
    add(panel3, new GridBagConstraints(0, 3, 1, 1, 0.0, 1.0, GridBagConstraints.SOUTHEAST,
            GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.maheffa.TabulatedOCR.GUI.CreateTextFormat.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Mahefa Manitrativo
    panel1 = new JPanel();
    label2 = new JLabel();
    txtFormatName = new JTextField();
    panel2 = new JPanel();
    label1 = new JLabel();
    scrollPane1 = new JScrollPane();
    txtFormatContent = new JEditorPane();
    panel3 = new JPanel();
    butSave = new JButton();

    //======== this ========
    setBorder(Borders.DLU4);

    // JFormDesigner evaluation mark
    setBorder(new CompoundBorder(new TitledBorder(new EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation",
            TitledBorder.CENTER, TitledBorder.BOTTOM, new Font("Dialog", Font.BOLD, 12), Color.red),
            getBorder()));//from   w ww.ja  v  a  2s  .  co m
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new GridBagLayout());
    ((GridBagLayout) getLayout()).columnWidths = new int[] { 0, 0, 0 };
    ((GridBagLayout) getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
    ((GridBagLayout) getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
    ((GridBagLayout) getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 };

    //======== panel1 ========
    {
        panel1.setBorder(new CompoundBorder(new EtchedBorder(), Borders.DLU4));
        panel1.setLayout(new GridBagLayout());
        ((GridBagLayout) panel1.getLayout()).columnWidths = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel1.getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
        ((GridBagLayout) panel1.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
        ((GridBagLayout) panel1.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 };

        //---- label2 ----
        label2.setText("\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:");
        panel1.add(label2, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));
        panel1.add(txtFormatName, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));
    }
    add(panel1, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
            new Insets(0, 0, 5, 5), 0, 0));

    //======== panel2 ========
    {
        panel2.setBorder(new CompoundBorder(new EtchedBorder(), Borders.DLU4));
        panel2.setLayout(new GridBagLayout());
        ((GridBagLayout) panel2.getLayout()).columnWidths = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel2.getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
        ((GridBagLayout) panel2.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
        ((GridBagLayout) panel2.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 };

        //---- label1 ----
        label1.setText(
                "\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 (\u043e\u0431\u0440\u0430\u0437\u0435\u0446) \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430:");
        panel2.add(label1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

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

            //---- txtFormatContent ----
            txtFormatContent.setPreferredSize(new Dimension(309, 300));
            scrollPane1.setViewportView(txtFormatContent);
        }
        panel2.add(scrollPane1, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));
    }
    add(panel2, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
            new Insets(0, 0, 5, 5), 0, 0));

    //======== panel3 ========
    {
        panel3.setLayout(new GridBagLayout());
        ((GridBagLayout) panel3.getLayout()).columnWidths = new int[] { 0, 0, 0 };
        ((GridBagLayout) panel3.getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
        ((GridBagLayout) panel3.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
        ((GridBagLayout) panel3.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 };

        //---- butSave ----
        butSave.setText("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c");
        butSave.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butSaveActionPerformed(e);
            }
        });
        panel3.add(butSave, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));
    }
    add(panel3, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
            GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 5), 0, 0));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.maheffa.TabulatedOCR.GUI.OcrMainForm.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Mahefa Manitrativo
    mainFrame = new JFrame();
    menuBar1 = new JMenuBar();
    menu1 = new JMenu();
    menuQuit = new JMenuItem();
    menu3 = new JMenu();
    menuConfig = new JMenuItem();
    menuCreateTableFormat = new JMenuItem();
    menuCreateTextFormat = new JMenuItem();
    menu5 = new JMenu();
    menuLaunch = new JMenuItem();
    menuStop = new JMenuItem();
    menuRelaunch = new JMenuItem();
    menu4 = new JMenu();
    menuAbout = new JMenuItem();
    splitPane2 = new JSplitPane();
    panel1 = new JPanel();
    splitPane4 = new JSplitPane();
    panel14 = new JPanel();
    scrollPane5 = new JScrollPane();
    listProject = new JList();
    panel5 = new JPanel();
    butAddProject = new JButton();
    butEditProject = new JButton();
    butDeleteProject = new JButton();
    scrollPane2 = new JScrollPane();
    labelInfoProject = new JLabel();
    splitPane3 = new JSplitPane();
    panel3 = new JPanel();
    scrollPane3 = new JScrollPane();
    tabbedPaneData = new JTabbedPane();
    panelImage = new ImagePanel();
    panel12 = new JPanel();
    panelResult = new ImagePanel();
    scrollPane7 = new JScrollPane();
    txtResult = new JTextArea();
    button1 = new JButton();
    scrollPane4 = new JScrollPane();
    tabbedPaneProgress = new JTabbedPane();
    panelBinary = new ImagePanel();
    panelHough = new ImagePanel();
    panelDeskew = new ImagePanel();
    panelTable = new ImagePanel();
    panelCell = new ImagePanel();
    labelProgress = new JLabel();
    progressbar = new JProgressBar();
    panel2 = new JPanel();
    panel4 = new JPanel();
    scrollPane6 = new JScrollPane();
    listFormat = new JList();
    butEditFormat = new JButton();
    butDeleteFormat = new JButton();
    scrollPane1 = new JScrollPane();
    labelInfoFormat = new JLabel();

    //======== mainFrame ========
    {//from ww  w.  j a va  2s  . com
        mainFrame.setMinimumSize(new Dimension(300, 500));
        Container mainFrameContentPane = mainFrame.getContentPane();
        mainFrameContentPane.setLayout(new GridLayout());

        //======== menuBar1 ========
        {

            //======== menu1 ========
            {
                menu1.setText("\u0424\u0430\u0439\u043b");
                menu1.setIcon(null);
                menu1.addSeparator();
                menu1.addSeparator();

                //---- menuQuit ----
                menuQuit.setText("\u0412\u044b\u0439\u0442\u0438");
                menuQuit.setIcon(
                        new ImageIcon("/home/mahefa/Workspace/Java/Tabulated OCR/icons/exit_small.png"));
                menuQuit.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuQuitActionPerformed(e);
                    }
                });
                menu1.add(menuQuit);
            }
            menuBar1.add(menu1);

            //======== menu3 ========
            {
                menu3.setText("\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f");
                menu3.setIcon(null);

                //---- menuConfig ----
                menuConfig.setText(
                        "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u043e\u043d\u0438\u044f");
                menuConfig.setIcon(
                        new ImageIcon("/home/mahefa/Workspace/Java/Tabulated OCR/icons/setting_small.png"));
                menuConfig.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuConfigActionPerformed(e);
                    }
                });
                menu3.add(menuConfig);
                menu3.addSeparator();

                //---- menuCreateTableFormat ----
                menuCreateTableFormat.setText(
                        "\u0421\u043e\u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442");
                menuCreateTableFormat.setIcon(
                        new ImageIcon("/home/mahefa/Workspace/Java/Tabulated OCR/icons/add_small.png"));
                menuCreateTableFormat.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuCreateFormatActionPerformed(e);
                    }
                });
                menu3.add(menuCreateTableFormat);

                //---- menuCreateTextFormat ----
                menuCreateTextFormat.setText(
                        "\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442");
                menuCreateTextFormat.setIcon(
                        new ImageIcon("/home/mahefa/Workspace/Java/Tabulated OCR/icons/add_small.png"));
                menuCreateTextFormat.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuCreateTextFormatActionPerformed(e);
                    }
                });
                menu3.add(menuCreateTextFormat);
            }
            menuBar1.add(menu3);

            //======== menu5 ========
            {
                menu5.setText("\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u043e\u0432\u0430\u043d\u0438\u0435");

                //---- menuLaunch ----
                menuLaunch.setText("\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c");
                menuLaunch.setIcon(
                        new ImageIcon("/home/mahefa/Workspace/Java/Tabulated OCR/icons/play_small.png"));
                menuLaunch.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuLaunchActionPerformed(e);
                    }
                });
                menu5.add(menuLaunch);

                //---- menuStop ----
                menuStop.setText("\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c");
                menuStop.setIcon(
                        new ImageIcon("/home/mahefa/Workspace/Java/Tabulated OCR/icons/stop_small.png"));
                menuStop.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuStopActionPerformed(e);
                    }
                });
                menu5.add(menuStop);

                //---- menuRelaunch ----
                menuRelaunch.setText("\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u044c");
                menuRelaunch.setIcon(
                        new ImageIcon("/home/mahefa/Workspace/Java/Tabulated OCR/icons/replay_small.png"));
                menuRelaunch.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuRelaunchActionPerformed(e);
                    }
                });
                menu5.add(menuRelaunch);
            }
            menuBar1.add(menu5);

            //======== menu4 ========
            {
                menu4.setText("\u041f\u043e\u043c\u043e\u0449\u044c");

                //---- menuAbout ----
                menuAbout.setText("\u041e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438");
                menuAbout.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuAboutActionPerformed(e);
                    }
                });
                menu4.add(menuAbout);
            }
            menuBar1.add(menu4);
        }
        mainFrame.setJMenuBar(menuBar1);

        //======== splitPane2 ========
        {

            //======== panel1 ========
            {
                panel1.setPreferredSize(new Dimension(250, 449));
                panel1.setBorder(new TitledBorder("\u041f\u0440\u043e\u0435\u043a\u0442\u044b"));
                panel1.setMinimumSize(new Dimension(150, 447));

                // JFormDesigner evaluation mark
                panel1.setBorder(new javax.swing.border.CompoundBorder(
                        new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                                "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                                javax.swing.border.TitledBorder.BOTTOM,
                                new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                        panel1.getBorder()));
                panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                    public void propertyChange(java.beans.PropertyChangeEvent e) {
                        if ("border".equals(e.getPropertyName()))
                            throw new RuntimeException();
                    }
                });

                panel1.setLayout(new GridLayout());

                //======== splitPane4 ========
                {
                    splitPane4.setOrientation(JSplitPane.VERTICAL_SPLIT);
                    splitPane4.setResizeWeight(0.5);

                    //======== panel14 ========
                    {
                        panel14.setBorder(Borders.DLU4);
                        panel14.setPreferredSize(new Dimension(169, 400));
                        panel14.setLayout(new GridBagLayout());
                        ((GridBagLayout) panel14.getLayout()).columnWidths = new int[] { 71, 0 };
                        ((GridBagLayout) panel14.getLayout()).rowHeights = new int[] { 0, 0, 0 };
                        ((GridBagLayout) panel14.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
                        ((GridBagLayout) panel14.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

                        //======== scrollPane5 ========
                        {

                            //---- listProject ----
                            listProject.addListSelectionListener(new ListSelectionListener() {
                                @Override
                                public void valueChanged(ListSelectionEvent e) {
                                    listProjectValueChanged(e);
                                }
                            });
                            scrollPane5.setViewportView(listProject);
                        }
                        panel14.add(scrollPane5,
                                new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
                                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                        //======== panel5 ========
                        {
                            panel5.setLayout(new GridBagLayout());
                            ((GridBagLayout) panel5.getLayout()).columnWidths = new int[] { 0, 0, 0, 0 };
                            ((GridBagLayout) panel5.getLayout()).rowHeights = new int[] { 0, 0, 0, 0 };
                            ((GridBagLayout) panel5.getLayout()).columnWeights = new double[] { 0.0, 0.0, 0.0,
                                    1.0E-4 };
                            ((GridBagLayout) panel5.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0,
                                    1.0E-4 };

                            //---- butAddProject ----
                            butAddProject.setPreferredSize(new Dimension(35, 25));
                            butAddProject.addActionListener(new ActionListener() {
                                @Override
                                public void actionPerformed(ActionEvent e) {
                                    butAddProjectActionPerformed(e);
                                }
                            });
                            panel5.add(butAddProject,
                                    new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));

                            //---- butEditProject ----
                            butEditProject.setIcon(null);
                            butEditProject.setPreferredSize(new Dimension(35, 25));
                            butEditProject.addActionListener(new ActionListener() {
                                @Override
                                public void actionPerformed(ActionEvent e) {
                                    butEditProjectActionPerformed(e);
                                }
                            });
                            panel5.add(butEditProject,
                                    new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0));

                            //---- butDeleteProject ----
                            butDeleteProject.setPreferredSize(new Dimension(35, 25));
                            butDeleteProject.addActionListener(new ActionListener() {
                                @Override
                                public void actionPerformed(ActionEvent e) {
                                    butDeleteProjectActionPerformed(e);
                                }
                            });
                            panel5.add(butDeleteProject,
                                    new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
                                            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));
                        }
                        panel14.add(panel5,
                                new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                                        GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
                    }
                    splitPane4.setTopComponent(panel14);

                    //======== scrollPane2 ========
                    {
                        scrollPane2.setBorder(Borders.DLU4);
                        scrollPane2.setViewportView(labelInfoProject);
                    }
                    splitPane4.setBottomComponent(scrollPane2);
                }
                panel1.add(splitPane4);
            }
            splitPane2.setLeftComponent(panel1);

            //======== splitPane3 ========
            {
                splitPane3.setResizeWeight(0.8);

                //======== panel3 ========
                {
                    panel3.setBorder(Borders.DLU2);
                    panel3.setMinimumSize(new Dimension(300, 79));
                    panel3.setPreferredSize(new Dimension(300, 300));
                    panel3.setLayout(new GridBagLayout());
                    ((GridBagLayout) panel3.getLayout()).columnWidths = new int[] { 0, 0 };
                    ((GridBagLayout) panel3.getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0 };
                    ((GridBagLayout) panel3.getLayout()).columnWeights = new double[] { 1.0, 1.0E-4 };
                    ((GridBagLayout) panel3.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0,
                            1.0E-4 };

                    //======== scrollPane3 ========
                    {
                        scrollPane3.setPreferredSize(new Dimension(0, 300));
                        scrollPane3.setBackground(new Color(153, 153, 153));
                        scrollPane3.setOpaque(false);
                        scrollPane3.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
                        scrollPane3.setBorder(Borders.DLU4);

                        //======== tabbedPaneData ========
                        {

                            //======== panelImage ========
                            {
                                panelImage.setLayout(new GridBagLayout());
                                ((GridBagLayout) panelImage.getLayout()).columnWidths = new int[] { 0, 0 };
                                ((GridBagLayout) panelImage.getLayout()).rowHeights = new int[] { 0, 0 };
                                ((GridBagLayout) panelImage.getLayout()).columnWeights = new double[] { 0.0,
                                        1.0E-4 };
                                ((GridBagLayout) panelImage.getLayout()).rowWeights = new double[] { 0.0,
                                        1.0E-4 };
                            }
                            tabbedPaneData.addTab("\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435",
                                    panelImage);

                            //======== panel12 ========
                            {
                                panel12.setLayout(new GridBagLayout());
                                ((GridBagLayout) panel12.getLayout()).columnWidths = new int[] { 0, 0 };
                                ((GridBagLayout) panel12.getLayout()).rowHeights = new int[] { 0, 0, 0 };
                                ((GridBagLayout) panel12.getLayout()).columnWeights = new double[] { 0.0,
                                        1.0E-4 };
                                ((GridBagLayout) panel12.getLayout()).rowWeights = new double[] { 0.0, 0.0,
                                        1.0E-4 };

                                //======== panelResult ========
                                {
                                    panelResult.setLayout(new GridBagLayout());
                                    ((GridBagLayout) panelResult.getLayout()).columnWidths = new int[] { 0, 0 };
                                    ((GridBagLayout) panelResult.getLayout()).rowHeights = new int[] { 0, 0 };
                                    ((GridBagLayout) panelResult.getLayout()).columnWeights = new double[] {
                                            0.0, 1.0E-4 };
                                    ((GridBagLayout) panelResult.getLayout()).rowWeights = new double[] { 0.0,
                                            1.0E-4 };

                                    //======== scrollPane7 ========
                                    {
                                        scrollPane7.setViewportView(txtResult);
                                    }
                                    panelResult.add(scrollPane7,
                                            new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
                                                    GridBagConstraints.CENTER, GridBagConstraints.BOTH,
                                                    new Insets(0, 0, 0, 0), 0, 0));
                                }
                                panel12.add(panelResult,
                                        new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
                                                GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                                //---- button1 ----
                                button1.setText(
                                        "\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c");
                                panel12.add(button1,
                                        new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                                                GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
                            }
                            tabbedPaneData.addTab("\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442",
                                    panel12);
                        }
                        scrollPane3.setViewportView(tabbedPaneData);
                    }
                    panel3.add(scrollPane3, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

                    //======== scrollPane4 ========
                    {
                        scrollPane4.setPreferredSize(new Dimension(0, 300));
                        scrollPane4.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
                        scrollPane4.setBorder(Borders.DLU4);

                        //======== tabbedPaneProgress ========
                        {

                            //======== panelBinary ========
                            {
                                panelBinary.setLayout(new GridBagLayout());
                                ((GridBagLayout) panelBinary.getLayout()).columnWidths = new int[] { 0, 0, 0, 0,
                                        0, 0, 0, 0, 0, 0 };
                                ((GridBagLayout) panelBinary.getLayout()).rowHeights = new int[] { 0, 0, 0, 0,
                                        0, 0, 0 };
                                ((GridBagLayout) panelBinary.getLayout()).columnWeights = new double[] { 0.0,
                                        0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 };
                                ((GridBagLayout) panelBinary.getLayout()).rowWeights = new double[] { 0.0, 0.0,
                                        0.0, 0.0, 0.0, 0.0, 1.0E-4 };
                            }
                            tabbedPaneProgress.addTab("\u0411\u0438\u043d\u0430\u0440\u043d\u043e\u0435",
                                    panelBinary);

                            //======== panelHough ========
                            {
                                panelHough.setLayout(new GridBagLayout());
                                ((GridBagLayout) panelHough.getLayout()).columnWidths = new int[] { 0, 0 };
                                ((GridBagLayout) panelHough.getLayout()).rowHeights = new int[] { 0, 0 };
                                ((GridBagLayout) panelHough.getLayout()).columnWeights = new double[] { 0.0,
                                        1.0E-4 };
                                ((GridBagLayout) panelHough.getLayout()).rowWeights = new double[] { 0.0,
                                        1.0E-4 };
                            }
                            tabbedPaneProgress.addTab("\u0425\u0430\u0444", panelHough);

                            //======== panelDeskew ========
                            {
                                panelDeskew.setLayout(new GridBagLayout());
                                ((GridBagLayout) panelDeskew.getLayout()).columnWidths = new int[] { 0, 0 };
                                ((GridBagLayout) panelDeskew.getLayout()).rowHeights = new int[] { 0, 0 };
                                ((GridBagLayout) panelDeskew.getLayout()).columnWeights = new double[] { 0.0,
                                        1.0E-4 };
                                ((GridBagLayout) panelDeskew.getLayout()).rowWeights = new double[] { 0.0,
                                        1.0E-4 };
                            }
                            tabbedPaneProgress.addTab(
                                    "\u0423\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u043e\u0435",
                                    panelDeskew);

                            //======== panelTable ========
                            {
                                panelTable.setLayout(new GridBagLayout());
                                ((GridBagLayout) panelTable.getLayout()).columnWidths = new int[] { 0, 0 };
                                ((GridBagLayout) panelTable.getLayout()).rowHeights = new int[] { 0, 0 };
                                ((GridBagLayout) panelTable.getLayout()).columnWeights = new double[] { 0.0,
                                        1.0E-4 };
                                ((GridBagLayout) panelTable.getLayout()).rowWeights = new double[] { 0.0,
                                        1.0E-4 };
                            }
                            tabbedPaneProgress.addTab("\u0422\u0430\u0431\u043b\u0438\u0446\u0430", panelTable);

                            //======== panelCell ========
                            {
                                panelCell.setLayout(new GridBagLayout());
                                ((GridBagLayout) panelCell.getLayout()).columnWidths = new int[] { 0, 0 };
                                ((GridBagLayout) panelCell.getLayout()).rowHeights = new int[] { 0, 0 };
                                ((GridBagLayout) panelCell.getLayout()).columnWeights = new double[] { 0.0,
                                        1.0E-4 };
                                ((GridBagLayout) panelCell.getLayout()).rowWeights = new double[] { 0.0,
                                        1.0E-4 };
                            }
                            tabbedPaneProgress.addTab("\u041a\u043b\u0435\u0442\u043a\u0438", panelCell);
                        }
                        scrollPane4.setViewportView(tabbedPaneProgress);
                    }
                    panel3.add(scrollPane4, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

                    //---- labelProgress ----
                    labelProgress.setText("<html><i>progress ...</i></html>");
                    labelProgress.setVisible(false);
                    panel3.add(labelProgress, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

                    //---- progressbar ----
                    progressbar.setVisible(false);
                    panel3.add(progressbar, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
                }
                splitPane3.setLeftComponent(panel3);

                //======== panel2 ========
                {
                    panel2.setPreferredSize(new Dimension(150, 440));
                    panel2.setBorder(Borders.DLU2);
                    panel2.setMinimumSize(new Dimension(150, 450));
                    panel2.setMaximumSize(new Dimension(300, 2147483647));
                    panel2.setLayout(new GridBagLayout());
                    ((GridBagLayout) panel2.getLayout()).columnWeights = new double[] { 1.0 };

                    //======== panel4 ========
                    {
                        panel4.setBorder(new TitledBorder("\u0424\u043e\u0440\u043c\u0430\u0442\u044b"));
                        panel4.setLayout(new GridBagLayout());
                        ((GridBagLayout) panel4.getLayout()).columnWidths = new int[] { 0, 0, 0 };
                        ((GridBagLayout) panel4.getLayout()).rowHeights = new int[] { 0, 0, 0 };
                        ((GridBagLayout) panel4.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
                        ((GridBagLayout) panel4.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

                        //======== scrollPane6 ========
                        {

                            //---- listFormat ----
                            listFormat.addListSelectionListener(new ListSelectionListener() {
                                @Override
                                public void valueChanged(ListSelectionEvent e) {
                                    listFormatValueChanged(e);
                                }
                            });
                            scrollPane6.setViewportView(listFormat);
                        }
                        panel4.add(scrollPane6,
                                new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0, GridBagConstraints.CENTER,
                                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                        //---- butEditFormat ----
                        butEditFormat.setHorizontalAlignment(SwingConstants.LEFT);
                        butEditFormat.setPreferredSize(new Dimension(35, 25));
                        butEditFormat.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                butEditFormatActionPerformed(e);
                            }
                        });
                        panel4.add(butEditFormat,
                                new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                                        GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 5), 0, 0));

                        //---- butDeleteFormat ----
                        butDeleteFormat.setHorizontalAlignment(SwingConstants.RIGHT);
                        butDeleteFormat.setPreferredSize(new Dimension(35, 25));
                        panel4.add(butDeleteFormat,
                                new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
                                        GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
                    }
                    panel2.add(panel4, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
                            GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

                    //======== scrollPane1 ========
                    {
                        scrollPane1.setBorder(Borders.DLU4);
                        scrollPane1.setMinimumSize(new Dimension(35, 50));
                        scrollPane1.setPreferredSize(new Dimension(156, 100));
                        scrollPane1.setMaximumSize(new Dimension(300, 32767));

                        //---- labelInfoFormat ----
                        labelInfoFormat.setText(
                                "<html> <b>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<b>:   <br/> <i>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0435\u0442\u043e\u043a</i>:  <br/> <i>\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445</i>: <br/> </html>");
                        labelInfoFormat.setVerticalAlignment(SwingConstants.TOP);
                        scrollPane1.setViewportView(labelInfoFormat);
                    }
                    panel2.add(scrollPane1, new GridBagConstraints(0, 1, 1, 1, 0.0, 1.0,
                            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
                }
                splitPane3.setRightComponent(panel2);
            }
            splitPane2.setRightComponent(splitPane3);
        }
        mainFrameContentPane.add(splitPane2);
        mainFrame.setSize(855, 720);
        mainFrame.setLocationRelativeTo(mainFrame.getOwner());
    }
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:net.pms.newgui.GeneralTab.java

License:Open Source License

public JComponent build() {
    // Apply the orientation for the locale
    Locale locale = new Locale(configuration.getLanguage());
    ComponentOrientation orientation = ComponentOrientation.getOrientation(locale);
    String colSpec = FormLayoutUtil.getColSpec(COL_SPEC, orientation);

    FormLayout layout = new FormLayout(colSpec, ROW_SPEC);
    PanelBuilder builder = new PanelBuilder(layout);
    builder.border(Borders.DLU4);
    builder.opaque(true);//from  w  w  w.  j  a  v a 2 s .  c om

    CellConstraints cc = new CellConstraints();

    smcheckBox = new JCheckBox(Messages.getString("NetworkTab.3"));
    smcheckBox.setContentAreaFilled(false);
    smcheckBox.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            configuration.setMinimized((e.getStateChange() == ItemEvent.SELECTED));
        }
    });

    if (configuration.isMinimized()) {
        smcheckBox.setSelected(true);
    }

    JComponent cmp = builder.addSeparator(Messages.getString("NetworkTab.5"),
            FormLayoutUtil.flip(cc.xyw(1, 1, 9), colSpec, orientation));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
    builder.addLabel(Messages.getString("NetworkTab.0"),
            FormLayoutUtil.flip(cc.xy(1, 7), colSpec, orientation));
    final KeyedComboBoxModel kcbm = new KeyedComboBoxModel(
            new Object[] { "ar", "bg", "ca", "zhs", "zht", "cz", "da", "nl", "en", "fi", "fr", "de", "el", "iw",
                    "is", "it", "ja", "ko", "no", "pl", "pt", "br", "ro", "ru", "sl", "es", "sv", "tr" },
            new Object[] { "Arabic", "Bulgarian", "Catalan", "Chinese (Simplified)", "Chinese (Traditional)",
                    "Czech", "Danish", "Dutch", "English", "Finnish", "French", "German", "Greek", "Hebrew",
                    "Icelandic", "Italian", "Japanese", "Korean", "Norwegian", "Polish", "Portuguese",
                    "Portuguese (Brazilian)", "Romanian", "Russian", "Slovenian", "Spanish", "Swedish",
                    "Turkish" });
    langs = new JComboBox(kcbm);
    langs.setEditable(false);
    String defaultLang = null;
    if (configuration.getLanguage() != null && configuration.getLanguage().length() > 0) {
        defaultLang = configuration.getLanguage();
    } else {
        defaultLang = Locale.getDefault().getLanguage();
    }
    if (defaultLang == null) {
        defaultLang = "en";
    }
    kcbm.setSelectedKey(defaultLang);
    if (langs.getSelectedIndex() == -1) {
        langs.setSelectedIndex(0);
    }

    langs.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                configuration.setLanguage((String) kcbm.getSelectedKey());

            }
        }
    });

    builder.add(langs, FormLayoutUtil.flip(cc.xyw(3, 7, 7), colSpec, orientation));

    builder.add(smcheckBox, FormLayoutUtil.flip(cc.xyw(1, 9, 9), colSpec, orientation));

    JButton service = new JButton(Messages.getString("NetworkTab.4"));
    service.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (PMS.get().installWin32Service()) {
                JOptionPane.showMessageDialog(
                        (JFrame) (SwingUtilities.getWindowAncestor((Component) PMS.get().getFrame())),
                        Messages.getString("NetworkTab.11") + Messages.getString("NetworkTab.12"),
                        Messages.getString("Dialog.Information"), JOptionPane.INFORMATION_MESSAGE);

            } else {
                JOptionPane.showMessageDialog(
                        (JFrame) (SwingUtilities.getWindowAncestor((Component) PMS.get().getFrame())),
                        Messages.getString("NetworkTab.14"), Messages.getString("Dialog.Error"),
                        JOptionPane.ERROR_MESSAGE);
            }
        }
    });

    builder.add(service, FormLayoutUtil.flip(cc.xy(1, 11), colSpec, orientation));

    if (System.getProperty(LooksFrame.START_SERVICE) != null || !Platform.isWindows()) {
        service.setEnabled(false);
    }

    JButton checkForUpdates = new JButton(Messages.getString("NetworkTab.8"));

    checkForUpdates.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            LooksFrame frame = (LooksFrame) PMS.get().getFrame();
            frame.checkForUpdates();
        }
    });

    builder.add(checkForUpdates, FormLayoutUtil.flip(cc.xy(1, 13), colSpec, orientation));

    autoUpdateCheckBox = new JCheckBox(Messages.getString("NetworkTab.9"));
    autoUpdateCheckBox.setContentAreaFilled(false);
    autoUpdateCheckBox.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            configuration.setAutoUpdate((e.getStateChange() == ItemEvent.SELECTED));
        }
    });

    if (configuration.isAutoUpdate()) {
        autoUpdateCheckBox.setSelected(true);
    }

    builder.add(autoUpdateCheckBox, FormLayoutUtil.flip(cc.xyw(7, 13, 3), colSpec, orientation));

    if (!Build.isUpdatable()) {
        checkForUpdates.setEnabled(false);
        autoUpdateCheckBox.setEnabled(false);
    }

    host = new JTextField(configuration.getServerHostname());
    host.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            configuration.setHostname(host.getText());
        }
    });

    port = new JTextField(configuration.getServerPort() != 5001 ? "" + configuration.getServerPort() : "");
    port.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            try {
                String p = port.getText();
                if (StringUtils.isEmpty(p)) {
                    p = "5001";
                }
                int ab = Integer.parseInt(p);
                configuration.setServerPort(ab);
            } catch (NumberFormatException nfe) {
                logger.debug("Could not parse port from \"" + port.getText() + "\"");
            }

        }
    });

    cmp = builder.addSeparator(Messages.getString("NetworkTab.22"),
            FormLayoutUtil.flip(cc.xyw(1, 21, 9), colSpec, orientation));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    final KeyedComboBoxModel networkInterfaces = createNetworkInterfacesModel();
    networkinterfacesCBX = new JComboBox(networkInterfaces);
    networkInterfaces.setSelectedKey(configuration.getNetworkInterface());
    networkinterfacesCBX.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                configuration.setNetworkInterface((String) networkInterfaces.getSelectedKey());
            }
        }
    });

    ip_filter = new JTextField(configuration.getIpFilter());
    ip_filter.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            configuration.setIpFilter(ip_filter.getText());
        }
    });

    maxbitrate = new JTextField(configuration.getMaximumBitrate());
    maxbitrate.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            PMS.getConfiguration().setMaximumBitrate(maxbitrate.getText());
        }
    });

    builder.addLabel(Messages.getString("NetworkTab.20"),
            FormLayoutUtil.flip(cc.xy(1, 23), colSpec, orientation));
    builder.add(networkinterfacesCBX, FormLayoutUtil.flip(cc.xyw(3, 23, 7), colSpec, orientation));
    builder.addLabel(Messages.getString("NetworkTab.23"),
            FormLayoutUtil.flip(cc.xy(1, 25), colSpec, orientation));
    builder.add(host, FormLayoutUtil.flip(cc.xyw(3, 25, 7), colSpec, orientation));
    builder.addLabel(Messages.getString("NetworkTab.24"),
            FormLayoutUtil.flip(cc.xy(1, 27), colSpec, orientation));
    builder.add(port, FormLayoutUtil.flip(cc.xyw(3, 27, 7), colSpec, orientation));
    builder.addLabel(Messages.getString("NetworkTab.30"),
            FormLayoutUtil.flip(cc.xy(1, 29), colSpec, orientation));
    builder.add(ip_filter, FormLayoutUtil.flip(cc.xyw(3, 29, 7), colSpec, orientation));
    builder.addLabel(Messages.getString("NetworkTab.35"),
            FormLayoutUtil.flip(cc.xy(1, 31), colSpec, orientation));
    builder.add(maxbitrate, FormLayoutUtil.flip(cc.xyw(3, 31, 7), colSpec, orientation));

    cmp = builder.addSeparator(Messages.getString("NetworkTab.31"),
            FormLayoutUtil.flip(cc.xyw(1, 33, 9), colSpec, orientation));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    newHTTPEngine = new JCheckBox(Messages.getString("NetworkTab.32"));
    newHTTPEngine.setSelected(configuration.isHTTPEngineV2());
    newHTTPEngine.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            configuration.setHTTPEngineV2((e.getStateChange() == ItemEvent.SELECTED));
        }
    });
    builder.add(newHTTPEngine, FormLayoutUtil.flip(cc.xyw(1, 35, 9), colSpec, orientation));

    preventSleep = new JCheckBox(Messages.getString("NetworkTab.33"));
    preventSleep.setSelected(configuration.isPreventsSleep());
    preventSleep.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            configuration.setPreventsSleep((e.getStateChange() == ItemEvent.SELECTED));
        }
    });
    builder.add(preventSleep, FormLayoutUtil.flip(cc.xyw(1, 37, 9), colSpec, orientation));

    JCheckBox fdCheckBox = new JCheckBox(Messages.getString("NetworkTab.38"));
    fdCheckBox.setContentAreaFilled(false);
    fdCheckBox.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            configuration.setRendererForceDefault((e.getStateChange() == ItemEvent.SELECTED));
        }
    });

    if (configuration.isRendererForceDefault()) {
        fdCheckBox.setSelected(true);
    }

    builder.addLabel(Messages.getString("NetworkTab.36"),
            FormLayoutUtil.flip(cc.xy(1, 39), colSpec, orientation));

    ArrayList<RendererConfiguration> allConfs = RendererConfiguration.getAllRendererConfigurations();
    ArrayList<Object> keyValues = new ArrayList<Object>();
    ArrayList<Object> nameValues = new ArrayList<Object>();
    keyValues.add("");
    nameValues.add(Messages.getString("NetworkTab.37"));

    if (allConfs != null) {
        sortRendererConfiurationsByName(allConfs);
        for (RendererConfiguration renderer : allConfs) {
            if (renderer != null) {
                keyValues.add(renderer.getRendererName());
                nameValues.add(renderer.getRendererName());
            }
        }
    }

    final KeyedComboBoxModel renderersKcbm = new KeyedComboBoxModel(
            (Object[]) keyValues.toArray(new Object[keyValues.size()]),
            (Object[]) nameValues.toArray(new Object[nameValues.size()]));
    renderers = new JComboBox(renderersKcbm);
    renderers.setEditable(false);
    String defaultRenderer = configuration.getRendererDefault();
    renderersKcbm.setSelectedKey(defaultRenderer);

    if (renderers.getSelectedIndex() == -1) {
        renderers.setSelectedIndex(0);
    }

    builder.add(renderers, FormLayoutUtil.flip(cc.xyw(3, 39, 7), colSpec, orientation));

    builder.add(fdCheckBox, FormLayoutUtil.flip(cc.xyw(1, 41, 9), colSpec, orientation));

    cmp = builder.addSeparator(Messages.getString("NetworkTab.34"),
            FormLayoutUtil.flip(cc.xyw(1, 43, 9), colSpec, orientation));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    pPlugins = new JPanel(new GridLayout());
    builder.add(pPlugins, FormLayoutUtil.flip(cc.xyw(1, 45, 9), colSpec, orientation));

    JPanel panel = builder.getPanel();

    // Apply the orientation to the panel and all components in it
    panel.applyComponentOrientation(orientation);

    JScrollPane scrollPane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    scrollPane.setBorder(BorderFactory.createEmptyBorder());

    return scrollPane;
}

From source file:net.pms.newgui.NavigationShareTab.java

License:Open Source License

public JComponent build() {
    // Apply the orientation for the locale
    Locale locale = new Locale(configuration.getLanguage());
    ComponentOrientation orientation = ComponentOrientation.getOrientation(locale);
    String colSpec = FormLayoutUtil.getColSpec(PANEL_COL_SPEC, orientation);

    // Set basic layout
    FormLayout layout = new FormLayout(colSpec, PANEL_ROW_SPEC);
    PanelBuilder builder = new PanelBuilder(layout);
    builder.border(Borders.DLU4);
    builder.opaque(true);/*from  ww  w .j  ava  2  s  . c  o m*/

    CellConstraints cc = new CellConstraints();

    // Init all gui components
    initSimpleComponents(cc);
    PanelBuilder builderSharedFolder = initSharedFoldersGuiComponents(cc);

    // Build gui with initialized components
    JComponent cmp = builder.addSeparator(Messages.getString("FoldTab.13"),
            FormLayoutUtil.flip(cc.xyw(1, 1, 10), colSpec, orientation));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    builder.add(thumbgenCheckBox, FormLayoutUtil.flip(cc.xyw(1, 3, 3), colSpec, orientation));
    builder.addLabel(Messages.getString("NetworkTab.16"),
            FormLayoutUtil.flip(cc.xyw(4, 3, 3), colSpec, orientation));
    builder.add(seekpos, FormLayoutUtil.flip(cc.xyw(6, 3, 1), colSpec, orientation));

    builder.add(mplayer_thumb, FormLayoutUtil.flip(cc.xyw(1, 5, 3), colSpec, orientation));
    builder.add(dvdiso_thumb, FormLayoutUtil.flip(cc.xyw(3, 5, 3), colSpec, orientation));

    builder.add(image_thumb, FormLayoutUtil.flip(cc.xyw(1, 7, 3), colSpec, orientation));

    builder.addLabel(Messages.getString("FoldTab.26"),
            FormLayoutUtil.flip(cc.xyw(1, 9, 3), colSpec, orientation));
    builder.add(audiothumbnail, FormLayoutUtil.flip(cc.xyw(4, 9, 3), colSpec, orientation));

    builder.addLabel(Messages.getString("FoldTab.27"),
            FormLayoutUtil.flip(cc.xyw(1, 11, 1), colSpec, orientation));
    builder.add(defaultThumbFolder, FormLayoutUtil.flip(cc.xyw(4, 11, 3), colSpec, orientation));
    builder.add(select, FormLayoutUtil.flip(cc.xyw(7, 11, 1), colSpec, orientation));

    cmp = builder.addSeparator(Messages.getString("NetworkTab.15"),
            FormLayoutUtil.flip(cc.xyw(1, 13, 10), colSpec, orientation));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    builder.add(archive, FormLayoutUtil.flip(cc.xyw(1, 15, 3), colSpec, orientation));
    builder.add(hidevideosettings, FormLayoutUtil.flip(cc.xyw(4, 15, 2), colSpec, orientation));
    builder.add(hidetranscode, FormLayoutUtil.flip(cc.xyw(7, 15, 4), colSpec, orientation));

    builder.add(hideextensions, FormLayoutUtil.flip(cc.xyw(1, 17, 3), colSpec, orientation));
    builder.add(hideengines, FormLayoutUtil.flip(cc.xyw(4, 17, 2), colSpec, orientation));
    builder.add(hideemptyfolders, FormLayoutUtil.flip(cc.xyw(7, 17, 4), colSpec, orientation));

    builder.add(itunes, FormLayoutUtil.flip(cc.xyw(1, 19, 3), colSpec, orientation));
    builder.add(iphoto, FormLayoutUtil.flip(cc.xyw(4, 19, 2), colSpec, orientation));
    builder.add(aperture, FormLayoutUtil.flip(cc.xyw(7, 19, 4), colSpec, orientation));

    builder.add(cacheenable, FormLayoutUtil.flip(cc.xy(1, 21), colSpec, orientation));
    builder.add(cachereset, FormLayoutUtil.flip(cc.xyw(4, 21, 2), colSpec, orientation));
    builder.add(hidemedialibraryfolder, FormLayoutUtil.flip(cc.xyw(7, 21, 4), colSpec, orientation));

    builder.addLabel(Messages.getString("FoldTab.18"),
            FormLayoutUtil.flip(cc.xyw(1, 23, 3), colSpec, orientation));
    builder.add(sortmethod, FormLayoutUtil.flip(cc.xyw(4, 23, 3), colSpec, orientation));

    builder.add(builderSharedFolder.getPanel(), FormLayoutUtil.flip(cc.xyw(1, 27, 10), colSpec, orientation));

    JPanel panel = builder.getPanel();

    // Apply the orientation to the panel and all components in it
    panel.applyComponentOrientation(orientation);

    JScrollPane scrollPane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    scrollPane.setBorder(BorderFactory.createEmptyBorder());
    return scrollPane;
}

From source file:net.pms.newgui.TranscodingTab.java

License:Open Source License

public JComponent build() {
    String colSpec = FormLayoutUtil.getColSpec(MAIN_COL_SPEC, orientation);
    FormLayout mainlayout = new FormLayout(colSpec, MAIN_ROW_SPEC);
    PanelBuilder builder = new PanelBuilder(mainlayout);
    builder.border(Borders.DLU4);
    builder.opaque(true);/*  ww w . j a va  2  s .  c  o m*/

    CellConstraints cc = new CellConstraints();
    builder.add(buildRightTabbedPanel(), FormLayoutUtil.flip(cc.xyw(4, 1, 3), colSpec, orientation));
    builder.add(buildLeft(), FormLayoutUtil.flip(cc.xy(2, 1), colSpec, orientation));

    JPanel panel = builder.getPanel();

    // Apply the orientation to the panel and all components in it
    panel.applyComponentOrientation(orientation);

    return panel;
}

From source file:net.pms.newgui.TranscodingTab.java

License:Open Source License

private JComponent buildVideoSetupPanel() {
    String colSpec = FormLayoutUtil.getColSpec("left:pref, 2dlu, pref:grow", orientation);
    FormLayout layout = new FormLayout(colSpec, "$lgap, 2*(pref, 2dlu), 10dlu, 10dlu, 3*(pref, 2dlu), pref");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.border(Borders.DLU4);
    CellConstraints cc = new CellConstraints();

    videoHWacceleration = new JCheckBox(Messages.getString("TrTab2.70"),
            configuration.isVideoHardwareAcceleration());
    videoHWacceleration.addItemListener(new ItemListener() {
        @Override//from  w w w  .ja v a 2s  .  c  o  m
        public void itemStateChanged(ItemEvent e) {
            configuration.setVideoHardwareAcceleration((e.getStateChange() == ItemEvent.SELECTED));
        }
    });
    builder.add(videoHWacceleration, FormLayoutUtil.flip(cc.xy(1, 2), colSpec, orientation));
    videoHWacceleration.setEnabled(false);

    mpeg2remux = new JCheckBox(
            Messages.getString("MEncoderVideo.39")
                    + (Platform.isWindows() ? " " + Messages.getString("TrTab2.21") : ""),
            configuration.isMencoderRemuxMPEG2());
    mpeg2remux.setContentAreaFilled(false);
    mpeg2remux.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
            configuration.setMencoderRemuxMPEG2((e.getStateChange() == ItemEvent.SELECTED));
        }
    });
    builder.add(mpeg2remux, FormLayoutUtil.flip(cc.xyw(1, 6, 3), colSpec, orientation));

    JComponent cmp = builder.addSeparator(Messages.getString("TrTab2.7"),
            FormLayoutUtil.flip(cc.xyw(1, 8, 3), colSpec, orientation));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    builder.add(new JLabel(Messages.getString("TrTab2.32")),
            FormLayoutUtil.flip(cc.xy(1, 10), colSpec, orientation));
    Object data[] = new Object[] { configuration.getMPEG2MainSettings(), /* current setting */
            String.format("Automatic (Wired)  /* %s */", Messages.getString("TrTab2.71")),
            String.format("Automatic (Wireless)  /* %s */", Messages.getString("TrTab2.72")),
            String.format("keyint=5:vqscale=1:vqmin=2  /* %s */", Messages.getString("TrTab2.60")), /* great */
            String.format("keyint=5:vqscale=1:vqmin=1  /* %s */",
                    Messages.getString("TrTab2.61")), /* lossless */
            String.format("keyint=5:vqscale=2:vqmin=3  /* %s */",
                    Messages.getString("TrTab2.62")), /* good (wired) */
            String.format("keyint=25:vqmax=5:vqmin=2  /* %s */",
                    Messages.getString("TrTab2.63")), /* good (wireless) */
            String.format("keyint=25:vqmax=7:vqmin=2  /* %s */",
                    Messages.getString("TrTab2.64")), /* medium (wireless) */
            String.format("keyint=25:vqmax=8:vqmin=3  /* %s */", Messages.getString("TrTab2.65")) /* low */
    };

    MyComboBoxModel cbm = new MyComboBoxModel(data);
    vq = new JComboBox(cbm);
    vq.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                String s = (String) e.getItem();
                if (s.indexOf("/*") > -1) {
                    s = s.substring(0, s.indexOf("/*")).trim();
                }
                configuration.setMPEG2MainSettings(s);
            }
        }
    });
    vq.getEditor().getEditorComponent().addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            vq.getItemListeners()[0]
                    .itemStateChanged(new ItemEvent(vq, 0, vq.getEditor().getItem(), ItemEvent.SELECTED));
        }
    });
    vq.setEditable(true);
    builder.add(vq, FormLayoutUtil.flip(cc.xy(3, 10), colSpec, orientation));

    builder.add(new JLabel(Messages.getString("TrTab2.8")),
            FormLayoutUtil.flip(cc.xy(1, 12), colSpec, orientation));
    notranscode = new JTextField(configuration.getDisableTranscodeForExtensions());
    notranscode.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            configuration.setDisableTranscodeForExtensions(notranscode.getText());
        }
    });
    builder.add(notranscode, FormLayoutUtil.flip(cc.xy(3, 12), colSpec, orientation));

    builder.addLabel(Messages.getString("TrTab2.9"), FormLayoutUtil.flip(cc.xy(1, 14), colSpec, orientation));
    forcetranscode = new JTextField(configuration.getForceTranscodeForExtensions());
    forcetranscode.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            configuration.setForceTranscodeForEtensions(forcetranscode.getText());
        }
    });
    builder.add(forcetranscode, FormLayoutUtil.flip(cc.xy(3, 14), colSpec, orientation));

    JPanel panel = builder.getPanel();
    panel.applyComponentOrientation(orientation);

    return panel;
}

From source file:net.pms.newgui.TranscodingTab.java

License:Open Source License

private JComponent buildAudioSetupPanel() {
    String colSpec = FormLayoutUtil.getColSpec("left:pref, 2dlu, pref:grow", orientation);
    FormLayout layout = new FormLayout(colSpec,
            "$lgap, pref, 2dlu, 4*(pref, 2dlu), pref, 12dlu, 3*(pref, 2dlu), pref:grow");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.border(Borders.DLU4);
    CellConstraints cc = new CellConstraints();

    builder.addLabel(Messages.getString("TrTab2.50"), FormLayoutUtil.flip(cc.xy(1, 2), colSpec, orientation));

    channels = new JComboBox(new Object[] { Messages.getString("TrTab2.55"),
            Messages.getString("TrTab2.56") /*, "8 channels 7.1" */ }); // 7.1 not supported by Mplayer :\
    channels.setEditable(false);/*  w  ww. j a  v  a 2s . c  om*/
    if (configuration.getAudioChannelCount() == 2) {
        channels.setSelectedIndex(0);
    } else {
        channels.setSelectedIndex(1);
    }
    channels.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
            configuration.setAudioChannelCount(Integer.parseInt(e.getItem().toString().substring(0, 1)));
        }
    });
    builder.add(channels, FormLayoutUtil.flip(cc.xy(3, 2), colSpec, orientation));

    forcePCM = new JCheckBox(Messages.getString("TrTab2.27"), configuration.isAudioUsePCM());
    forcePCM.setContentAreaFilled(false);
    forcePCM.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
            configuration.setAudioUsePCM(e.getStateChange() == ItemEvent.SELECTED);
        }
    });
    builder.add(forcePCM, FormLayoutUtil.flip(cc.xy(1, 4), colSpec, orientation));

    ac3remux = new JCheckBox(Messages.getString("TrTab2.26") + " "
            + (Platform.isWindows() ? Messages.getString("TrTab2.21") : ""));

    if (configuration.isAudioRemuxAC3()) {
        ac3remux.setSelected(true);
    }

    ac3remux.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
            configuration.setAudioRemuxAC3((e.getStateChange() == ItemEvent.SELECTED));
        }
    });
    builder.add(ac3remux, FormLayoutUtil.flip(cc.xyw(1, 6, 3), colSpec, orientation));

    forceDTSinPCM = new JCheckBox(
            Messages.getString("TrTab2.28")
                    + (Platform.isWindows() ? " " + Messages.getString("TrTab2.21") : ""),
            configuration.isAudioEmbedDtsInPcm());
    forceDTSinPCM.setContentAreaFilled(false);
    forceDTSinPCM.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            configuration.setAudioEmbedDtsInPcm(forceDTSinPCM.isSelected());
            if (configuration.isAudioEmbedDtsInPcm()) {
                JOptionPane.showMessageDialog(
                        (JFrame) (SwingUtilities.getWindowAncestor((Component) PMS.get().getFrame())),
                        Messages.getString("TrTab2.10"), Messages.getString("Dialog.Information"),
                        JOptionPane.INFORMATION_MESSAGE);
            }
        }
    });
    builder.add(forceDTSinPCM, FormLayoutUtil.flip(cc.xyw(1, 8, 3), colSpec, orientation));

    builder.addLabel(Messages.getString("TrTab2.29"), FormLayoutUtil.flip(cc.xy(1, 10), colSpec, orientation));
    abitrate = new JTextField("" + configuration.getAudioBitrate());
    abitrate.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            try {
                int ab = Integer.parseInt(abitrate.getText());
                configuration.setAudioBitrate(ab);
            } catch (NumberFormatException nfe) {
                logger.debug("Could not parse audio bitrate from \"" + abitrate.getText() + "\"");
            }
        }
    });
    builder.add(abitrate, FormLayoutUtil.flip(cc.xy(3, 10), colSpec, orientation));

    builder.addLabel(Messages.getString("MEncoderVideo.7"),
            FormLayoutUtil.flip(cc.xy(1, 12), colSpec, orientation));
    langs = new JTextField(configuration.getAudioLanguages());
    langs.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            configuration.setAudioLanguages(langs.getText());
        }
    });
    builder.add(langs, FormLayoutUtil.flip(cc.xy(3, 12), colSpec, orientation));

    JPanel panel = builder.getPanel();
    panel.applyComponentOrientation(orientation);

    return panel;
}