Revision 298 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/usability/DefaultUsabilitySwingManager.java

View differences:

DefaultUsabilitySwingManager.java
63 63
        if (gridBagPanel == null) {
64 64
            panel = new JPanel();
65 65
            panel.setLayout(new GridBagLayout());
66
        } else
66
        } else {
67 67
            panel = gridBagPanel;
68
        }
68 69

  
69 70
        GridBagConstraints constr = this.getDefaultParametersConstraints();
70 71
        constr.fill = GridBagConstraints.HORIZONTAL;
......
76 77
            // constr.weightx = 0;
77 78
            // int width = labelComponent.getSize().width;
78 79

  
79
            if (labelMargin != null)
80
            if (labelMargin != null) {
80 81
                constr.weightx = labelMargin;
82
            }
81 83
            panel.add(labelComponent, constr);
82 84
        }
83 85
        constr.fill = GridBagConstraints.NONE;
......
85 87

  
86 88
        if (fieldComponent != null) {
87 89
            constr.weightx = 0;
88
            if (fieldMargin != null)
90
            if (fieldMargin != null) {
89 91
                constr.weightx = labelMargin;
92
            }
90 93
            panel.add(fieldComponent, constr);
91 94
        }
92 95
        return panel;

Also available in: Unified diff