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

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

Introduction

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

Prototype

Border DLU7

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

Click Source Link

Document

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

Usage

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

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Mahefa Manitrativo
    panel1 = new JPanel();
    butZoomIn = new JButton();
    butZoomOut = new JButton();
    scrollPane1 = new JScrollPane();
    imagePanel = new ZoomPanel(this.image);

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

    // JFormDesigner evaluation mark
    setBorder(//from   w  ww.  j  a v a  2 s  .c  o m
            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 };
    ((GridBagLayout) getLayout()).rowHeights = new int[] { 0, 0, 0 };
    ((GridBagLayout) getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
    ((GridBagLayout) getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0E-4 };

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

        //---- butZoomIn ----
        butZoomIn.setText("Zoom In");
        butZoomIn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butZoomInActionPerformed(e);
            }
        });
        panel1.add(butZoomIn, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));

        //---- butZoomOut ----
        butZoomOut.setText("Zoom out");
        butZoomOut.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                butZoomOutActionPerformed(e);
            }
        });
        panel1.add(butZoomOut, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    }
    add(panel1, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.EAST,
            GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 0), 0, 0));

    //======== scrollPane1 ========
    {
        scrollPane1.setPreferredSize(new Dimension(500, 500));

        //======== imagePanel ========
        {
            imagePanel.setLayout(new GridBagLayout());
            ((GridBagLayout) imagePanel.getLayout()).columnWidths = new int[] { 0, 0 };
            ((GridBagLayout) imagePanel.getLayout()).rowHeights = new int[] { 0, 0 };
            ((GridBagLayout) imagePanel.getLayout()).columnWeights = new double[] { 0.0, 1.0E-4 };
            ((GridBagLayout) imagePanel.getLayout()).rowWeights = new double[] { 0.0, 1.0E-4 };
        }
        scrollPane1.setViewportView(imagePanel);
    }
    add(scrollPane1, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}