Package shared.layout

Examples of shared.layout.JGridBagPanel.addComponent()


  protected void doInit()
    {
    JGridBagPanel panel = new JGridBagPanel();
        panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        int row=0;
    panel.addComponent(new JLabel(Main.getString("export_label_type")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_typeBox = new JComboBox(), GridBagConstraints.RELATIVE, row, GridBagConstraints.WEST, new Insets(2, 0, 10, 0));
        m_typeBox.addItem(new JValueHolder<String>(Main.getString("export_type_jpg"), "image/jpeg"));
        m_typeBox.addItem(new JValueHolder<String>(Main.getString("export_type_png"), "image/png"));
        m_typeBox.addItem(new JValueHolder<String>(Main.getString("export_type_bmp"), "image/bmp"));
View Full Code Here


    JGridBagPanel panel = new JGridBagPanel();
        panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        int row=0;
    panel.addComponent(new JLabel(Main.getString("export_label_type")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_typeBox = new JComboBox(), GridBagConstraints.RELATIVE, row, GridBagConstraints.WEST, new Insets(2, 0, 10, 0));
        m_typeBox.addItem(new JValueHolder<String>(Main.getString("export_type_jpg"), "image/jpeg"));
        m_typeBox.addItem(new JValueHolder<String>(Main.getString("export_type_png"), "image/png"));
        m_typeBox.addItem(new JValueHolder<String>(Main.getString("export_type_bmp"), "image/bmp"));
        m_typeBox.addActionListener(new ActionListener()
        {
View Full Code Here

                }
            }
        });
        row++;

    panel.addComponent(m_qualityLabel = new JLabel(Main.getString("export_label_quality")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_qualityBox = new JComboBox(), 0, row, GridBagConstraints.WEST, new Insets(2, 0, 0, 0));
        m_qualityBox.setEditable(true);
        for (double i=0; i<=1.01; i+=.05)
        {
View Full Code Here

        });
        row++;

    panel.addComponent(m_qualityLabel = new JLabel(Main.getString("export_label_quality")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_qualityBox = new JComboBox(), 0, row, GridBagConstraints.WEST, new Insets(2, 0, 0, 0));
        m_qualityBox.setEditable(true);
        for (double i=0; i<=1.01; i+=.05)
        {
            m_qualityBox.addItem(String.format("%.2f", i));
        }
View Full Code Here

        for (double i=0; i<=1.01; i+=.05)
        {
            m_qualityBox.addItem(String.format("%.2f", i));
        }
        m_qualityBox.setSelectedItem(String.format("%.2f", m_quality));
    panel.addComponent(m_optimizedHufButton = new JCheckBox(Main.getString("export_label_optimizedhuf")), 1, row, GridBagConstraints.WEST, new Insets(2, 10, 0, 0), 1, 1, 1, 0, GridBagConstraints.HORIZONTAL);
        m_optimizedHufButton.setSelected(m_bOptimizedHuf);

        row++;

        panel.addComponent(new JLabel(Main.getString("export_label_file")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
View Full Code Here

    panel.addComponent(m_optimizedHufButton = new JCheckBox(Main.getString("export_label_optimizedhuf")), 1, row, GridBagConstraints.WEST, new Insets(2, 10, 0, 0), 1, 1, 1, 0, GridBagConstraints.HORIZONTAL);
        m_optimizedHufButton.setSelected(m_bOptimizedHuf);

        row++;

        panel.addComponent(new JLabel(Main.getString("export_label_file")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_fileField = new JTextField(24), 0, row, GridBagConstraints.WEST, new Insets(2, 0, 0, 0), 2, 1, 1, 0, GridBagConstraints.HORIZONTAL);
    panel.addComponent(m_fileBrowseButton = new JButton(Main.getString("export_label_file_browse")), 2, row, GridBagConstraints.WEST, new Insets(2, 5, 0, 0));

        final JExportDialog thisDialog = this;
View Full Code Here

        row++;

        panel.addComponent(new JLabel(Main.getString("export_label_file")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_fileField = new JTextField(24), 0, row, GridBagConstraints.WEST, new Insets(2, 0, 0, 0), 2, 1, 1, 0, GridBagConstraints.HORIZONTAL);
    panel.addComponent(m_fileBrowseButton = new JButton(Main.getString("export_label_file_browse")), 2, row, GridBagConstraints.WEST, new Insets(2, 5, 0, 0));

        final JExportDialog thisDialog = this;

        m_fileBrowseButton.addActionListener(new ActionListener()
View Full Code Here

        row++;

        panel.addComponent(new JLabel(Main.getString("export_label_file")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_fileField = new JTextField(24), 0, row, GridBagConstraints.WEST, new Insets(2, 0, 0, 0), 2, 1, 1, 0, GridBagConstraints.HORIZONTAL);
    panel.addComponent(m_fileBrowseButton = new JButton(Main.getString("export_label_file_browse")), 2, row, GridBagConstraints.WEST, new Insets(2, 5, 0, 0));

        final JExportDialog thisDialog = this;

        m_fileBrowseButton.addActionListener(new ActionListener()
        {
View Full Code Here

                }
            }
        });
        row++;

    panel.addComponent(new JLabel(Main.getString("export_label_scalefactor")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_scaleFactorBox = new JComboBox(), GridBagConstraints.RELATIVE, row, GridBagConstraints.WEST, new Insets(2, 0, 10, 0));
        m_scaleFactorBox.setEditable(true);
        double[] scales = {1.0/8.0, 1.0/4.0, 1.0/3.0, 1.0/2.0, 2.0/3.0, 3.0/4.0, 7.0/8.0, 1.0, 5.0/4.0, 4.0/3.0, 3.0/2.0, 5.0/3.0, 7.0/4.0, 8.0/4.0};
        for (double scale : scales)
View Full Code Here

        });
        row++;

    panel.addComponent(new JLabel(Main.getString("export_label_scalefactor")), 0, row, GridBagConstraints.WEST, new Insets(5, 0, 0, 0));
        row++;
    panel.addComponent(m_scaleFactorBox = new JComboBox(), GridBagConstraints.RELATIVE, row, GridBagConstraints.WEST, new Insets(2, 0, 10, 0));
        m_scaleFactorBox.setEditable(true);
        double[] scales = {1.0/8.0, 1.0/4.0, 1.0/3.0, 1.0/2.0, 2.0/3.0, 3.0/4.0, 7.0/8.0, 1.0, 5.0/4.0, 4.0/3.0, 3.0/2.0, 5.0/3.0, 7.0/4.0, 8.0/4.0};
        for (double scale : scales)
            m_scaleFactorBox.addItem(String.format("%.3f", scale));
        m_scaleFactorBox.setSelectedItem(String.format("%.3f", m_scaleFactor));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.