This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 33948
Collapse All | Expand All

(-)org/netbeans/modules/xml/catalog/CatalogMounterPanel.form (-9 / +8 lines)
Lines 7-22 Link Here
7
        <EmptyBorder bottom="4" left="4" right="4" top="4"/>
7
        <EmptyBorder bottom="4" left="4" right="4" top="4"/>
8
      </Border>
8
      </Border>
9
    </Property>
9
    </Property>
10
    <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
11
      <Dimension value="[380, 100]"/>
12
    </Property>
13
    <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
10
    <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
14
      <Dimension value="[380, 100]"/>
11
      <Dimension value="[380, 100]"/>
15
    </Property>
12
    </Property>
16
  </Properties>
13
  </Properties>
17
  <SyntheticProperties>
14
  <AuxValues>
18
    <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
15
    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
19
  </SyntheticProperties>
16
  </AuxValues>
20
17
21
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
18
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
22
  <SubComponents>
19
  <SubComponents>
Lines 25-33 Link Here
25
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
22
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
26
          <ResourceString bundle="org/netbeans/modules/xml/catalog/Bundle.properties" key="CatalogMounterPanel.catalogLabel.text" replaceFormat="Util.THIS.getString (&quot;{key}&quot;)"/>
23
          <ResourceString bundle="org/netbeans/modules/xml/catalog/Bundle.properties" key="CatalogMounterPanel.catalogLabel.text" replaceFormat="Util.THIS.getString (&quot;{key}&quot;)"/>
27
        </Property>
24
        </Property>
28
        <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
29
          <Color blue="0" green="0" id="black" palette="1" red="0" type="palette"/>
30
        </Property>
31
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
25
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
32
          <Connection code="catalogComboBox" type="code"/>
26
          <Connection code="catalogComboBox" type="code"/>
33
        </Property>
27
        </Property>
Lines 39-44 Link Here
39
      </Constraints>
33
      </Constraints>
40
    </Component>
34
    </Component>
41
    <Component class="javax.swing.JComboBox" name="catalogComboBox">
35
    <Component class="javax.swing.JComboBox" name="catalogComboBox">
36
      <Properties>
37
        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
38
          <Connection code="comboSize(40)" type="code"/>
39
        </Property>
40
      </Properties>
42
      <Constraints>
41
      <Constraints>
43
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
42
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
44
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="11" anchor="11" weightX="1.0" weightY="0.0"/>
43
          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="11" anchor="11" weightX="1.0" weightY="0.0"/>
(-)org/netbeans/modules/xml/catalog/CatalogMounterPanel.java (-4 / +13 lines)
Lines 43-48 Link Here
43
        model.addChangeListener(this);
43
        model.addChangeListener(this);
44
    }
44
    }
45
45
46
    /**
47
     * Compute preffered dimension for combo with
48
     * particulal number of columns
49
     */
50
    private Dimension comboSize(int columns) {
51
        JTextField template = new JTextField();
52
        template.setColumns(columns);
53
        return template.getPreferredSize();
54
    }
46
    
55
    
47
    
56
    
48
    /** This method is called from within the constructor to
57
    /** This method is called from within the constructor to
Lines 60-75 Link Here
60
        setLayout(new java.awt.GridBagLayout());
69
        setLayout(new java.awt.GridBagLayout());
61
70
62
        setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(4, 4, 4, 4)));
71
        setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(4, 4, 4, 4)));
63
        setPreferredSize(new java.awt.Dimension(380, 100));
64
        setMinimumSize(new java.awt.Dimension(380, 100));
72
        setMinimumSize(new java.awt.Dimension(380, 100));
65
        catalogLabel.setText(Util.THIS.getString ("CatalogMounterPanel.catalogLabel.text"));
73
        catalogLabel.setText(Util.THIS.getString ("CatalogMounterPanel.catalogLabel.text"));
66
        catalogLabel.setForeground(java.awt.Color.black);
67
        catalogLabel.setLabelFor(catalogComboBox);
74
        catalogLabel.setLabelFor(catalogComboBox);
68
        gridBagConstraints = new java.awt.GridBagConstraints();
75
        gridBagConstraints = new java.awt.GridBagConstraints();
69
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
76
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
70
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
77
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
71
        add(catalogLabel, gridBagConstraints);
78
        add(catalogLabel, gridBagConstraints);
72
79
80
        catalogComboBox.setPreferredSize(comboSize(40));
73
        gridBagConstraints = new java.awt.GridBagConstraints();
81
        gridBagConstraints = new java.awt.GridBagConstraints();
74
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
82
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
75
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
83
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
Lines 84-92 Link Here
84
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
92
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
85
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
93
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
86
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
94
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
87
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
88
        gridBagConstraints.weightx = 1.0;
95
        gridBagConstraints.weightx = 1.0;
89
        gridBagConstraints.weighty = 1.0;
96
        gridBagConstraints.weighty = 1.0;
97
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
90
        add(parentPanel, gridBagConstraints);
98
        add(parentPanel, gridBagConstraints);
91
99
92
    }//GEN-END:initComponents
100
    }//GEN-END:initComponents
Lines 94-107 Link Here
94
    private void updateCatalogPanel() {
102
    private void updateCatalogPanel() {
95
        Customizer cust = model.getCatalogCustomizer();
103
        Customizer cust = model.getCatalogCustomizer();
96
        cust.setObject(model.getCatalog());
104
        cust.setObject(model.getCatalog());
105
        invalidate();
97
        parentPanel.removeAll();
106
        parentPanel.removeAll();
98
        Component catalogPanel = (Component) cust;
107
        Component catalogPanel = (Component) cust;
99
        parentPanel.add(catalogPanel, BorderLayout.CENTER);
108
        parentPanel.add(catalogPanel, BorderLayout.CENTER);
109
        validate();
100
    }
110
    }
101
    
111
    
102
    public void stateChanged(ChangeEvent e) {
112
    public void stateChanged(ChangeEvent e) {
103
        updateCatalogPanel();
113
        updateCatalogPanel();
104
        revalidate();
105
    }
114
    }
106
115
107
    // Variables declaration - do not modify//GEN-BEGIN:variables
116
    // Variables declaration - do not modify//GEN-BEGIN:variables
(-)org/netbeans/modules/xml/catalog/CatalogRootNode.java (-1 / +18 lines)
Lines 32-37 Link Here
32
import org.netbeans.modules.xml.catalog.settings.CatalogSettings;
32
import org.netbeans.modules.xml.catalog.settings.CatalogSettings;
33
import org.openide.util.HelpCtx;
33
import org.openide.util.HelpCtx;
34
import java.awt.event.ActionEvent;
34
import java.awt.event.ActionEvent;
35
import javax.swing.*;
35
36
36
/**
37
/**
37
 * Node representing catalog root in the Runtime tab. It retrieves all
38
 * Node representing catalog root in the Runtime tab. It retrieves all
Lines 103-109 Link Here
103
//                }
104
//                }
104
//            });
105
//            });
105
            
106
            
106
            myDialog.setSize(450, 250);  //^ packing never creates bigger window :-(
107
            // set dialog size to 60x10 characters
108
            JTextArea template = new JTextArea();
109
            template.setColumns(60);
110
            template.setRows(8 + 2);  // 8 lines, 2 bottom line with buttons
111
            Dimension dimension = template.getPreferredSize();
112
            
113
            //#33996 this is insets size as prescribed by UI guidelines            
114
            final int insets = 12;
115
            
116
            // small fonts have problems that insets are times more important
117
            // then font size, include also insets
118
            int heightInsets = dimension.height + 10 * insets;  // 10 lines * 12 inset size
119
            int widthInsets = dimension.width + 4 * insets;
120
            Dimension fullDimension = new Dimension(widthInsets, heightInsets);
121
            myDialog.setSize(fullDimension);  //^ packing never creates bigger window :-(
122
            
123
            
107
            myDialog.show();
124
            myDialog.show();
108
        }
125
        }
109
126
(-)org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.form (-15 / +13 lines)
Lines 1-39 Link Here
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
2
3
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <SyntheticProperties>
4
  <AuxValues>
5
    <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
5
    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
6
  </SyntheticProperties>
6
  </AuxValues>
7
7
8
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
8
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
9
  <SubComponents>
9
  <SubComponents>
10
    <Component class="javax.swing.JTextArea" name="jTextArea1">
10
    <Component class="javax.swing.JTextArea" name="jTextArea1">
11
      <Properties>
11
      <Properties>
12
        <Property name="wrapStyleWord" type="boolean" value="true"/>
12
        <Property name="columns" type="int" value="40"/>
13
        <Property name="lineWrap" type="boolean" value="true"/>
14
        <Property name="editable" type="boolean" value="false"/>
13
        <Property name="editable" type="boolean" value="false"/>
15
        <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
16
          <Color blue="99" green="66" red="66" type="rgb"/>
17
        </Property>
18
        <Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
14
        <Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
19
          <Connection code="javax.swing.UIManager.getFont (&quot;Label.font&quot;)" type="code"/>
15
          <Connection code="javax.swing.UIManager.getFont (&quot;Label.font&quot;)" type="code"/>
20
        </Property>
16
        </Property>
17
        <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
18
          <Color blue="99" green="66" red="66" type="rgb"/>
19
        </Property>
20
        <Property name="lineWrap" type="boolean" value="true"/>
21
        <Property name="rows" type="int" value="4"/>
21
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
22
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
22
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/Bundle.properties" key="SystemCatalogCustomizer.readOnly.text" replaceFormat="Util.THIS.getString (&quot;{key}&quot;)"/>
23
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/Bundle.properties" key="SystemCatalogCustomizer.readOnly.text" replaceFormat="Util.THIS.getString (&quot;{key}&quot;)"/>
23
        </Property>
24
        </Property>
24
        <Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
25
        <Property name="wrapStyleWord" type="boolean" value="true"/>
25
          <Connection code="javax.swing.UIManager.getColor (&quot;Label.foreground&quot;)" type="code"/>
26
        </Property>
27
        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
28
          <Dimension value="[300, 50]"/>
29
        </Property>
30
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
26
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
31
          <Border info="null"/>
27
          <Border info="null"/>
32
        </Property>
28
        </Property>
29
        <Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
30
          <Connection code="javax.swing.UIManager.getColor (&quot;Label.foreground&quot;)" type="code"/>
31
        </Property>
33
        <Property name="enabled" type="boolean" value="false"/>
32
        <Property name="enabled" type="boolean" value="false"/>
34
        <Property name="opaque" type="boolean" value="false"/>
33
        <Property name="opaque" type="boolean" value="false"/>
35
      </Properties>
34
      </Properties>
36
37
      <AuxValues>
35
      <AuxValues>
38
        <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTextArea(){&#xa;    public boolean isFocusTraversable(){&#xa;        return false;&#xa;    }&#xa;};"/>
36
        <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTextArea(){&#xa;    public boolean isFocusTraversable(){&#xa;        return false;&#xa;    }&#xa;};"/>
39
      </AuxValues>
37
      </AuxValues>
(-)org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.java (-5 / +6 lines)
Lines 48-62 Link Here
48
48
49
        setLayout(new java.awt.GridBagLayout());
49
        setLayout(new java.awt.GridBagLayout());
50
50
51
        jTextArea1.setWrapStyleWord(true);
51
        jTextArea1.setColumns(40);
52
        jTextArea1.setLineWrap(true);
53
        jTextArea1.setEditable(false);
52
        jTextArea1.setEditable(false);
54
        jTextArea1.setForeground(new java.awt.Color(102, 102, 153));
55
        jTextArea1.setFont(javax.swing.UIManager.getFont ("Label.font"));
53
        jTextArea1.setFont(javax.swing.UIManager.getFont ("Label.font"));
54
        jTextArea1.setForeground(new java.awt.Color(102, 102, 153));
55
        jTextArea1.setLineWrap(true);
56
        jTextArea1.setRows(4);
56
        jTextArea1.setText(Util.THIS.getString ("SystemCatalogCustomizer.readOnly.text"));
57
        jTextArea1.setText(Util.THIS.getString ("SystemCatalogCustomizer.readOnly.text"));
57
        jTextArea1.setDisabledTextColor(javax.swing.UIManager.getColor ("Label.foreground"));
58
        jTextArea1.setWrapStyleWord(true);
58
        jTextArea1.setPreferredSize(new java.awt.Dimension(300, 50));
59
        jTextArea1.setBorder(null);
59
        jTextArea1.setBorder(null);
60
        jTextArea1.setDisabledTextColor(javax.swing.UIManager.getColor ("Label.foreground"));
60
        jTextArea1.setEnabled(false);
61
        jTextArea1.setEnabled(false);
61
        jTextArea1.setOpaque(false);
62
        jTextArea1.setOpaque(false);
62
        gridBagConstraints = new java.awt.GridBagConstraints();
63
        gridBagConstraints = new java.awt.GridBagConstraints();
(-)org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.form (-10 / +3 lines)
Lines 1-9 Link Here
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
2
3
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <SyntheticProperties>
4
  <AuxValues>
5
    <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
5
    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
6
  </SyntheticProperties>
6
  </AuxValues>
7
7
8
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
8
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
9
  <SubComponents>
9
  <SubComponents>
Lines 12-20 Link Here
12
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
13
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/Bundle.properties" key="XCatalogCustomizer.locationLabel.text" replaceFormat="Util.THIS.getString (&quot;{key}&quot;)"/>
13
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/Bundle.properties" key="XCatalogCustomizer.locationLabel.text" replaceFormat="Util.THIS.getString (&quot;{key}&quot;)"/>
14
        </Property>
14
        </Property>
15
        <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
16
          <Color blue="0" green="0" id="black" palette="1" red="0" type="palette"/>
17
        </Property>
18
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
15
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
19
          <Connection code="locationTextField" type="code"/>
16
          <Connection code="locationTextField" type="code"/>
20
        </Property>
17
        </Property>
Lines 28-38 Link Here
28
    <Component class="javax.swing.JTextField" name="locationTextField">
25
    <Component class="javax.swing.JTextField" name="locationTextField">
29
      <Properties>
26
      <Properties>
30
        <Property name="columns" type="int" value="20"/>
27
        <Property name="columns" type="int" value="20"/>
31
        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
32
          <Dimension value="[240, 20]"/>
33
        </Property>
34
      </Properties>
28
      </Properties>
35
36
      <Events>
29
      <Events>
37
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="locationTextFieldActionPerformed"/>
30
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="locationTextFieldActionPerformed"/>
38
        <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="locationTextFieldFocusLost"/>
31
        <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="locationTextFieldFocusLost"/>
(-)org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.java (-14 / +24 lines)
Lines 48-73 Link Here
48
        locationTextField = new javax.swing.JTextField();
48
        locationTextField = new javax.swing.JTextField();
49
        descTextArea = new javax.swing.JTextArea();
49
        descTextArea = new javax.swing.JTextArea();
50
50
51
        FormListener formListener = new FormListener();
52
51
        setLayout(new java.awt.GridBagLayout());
53
        setLayout(new java.awt.GridBagLayout());
52
54
53
        locationLabel.setText(Util.THIS.getString ("XCatalogCustomizer.locationLabel.text"));
55
        locationLabel.setText(Util.THIS.getString ("XCatalogCustomizer.locationLabel.text"));
54
        locationLabel.setForeground(java.awt.Color.black);
55
        locationLabel.setLabelFor(locationTextField);
56
        locationLabel.setLabelFor(locationTextField);
56
        add(locationLabel, new java.awt.GridBagConstraints());
57
        add(locationLabel, new java.awt.GridBagConstraints());
57
58
58
        locationTextField.setColumns(20);
59
        locationTextField.setColumns(20);
59
        locationTextField.setPreferredSize(new java.awt.Dimension(240, 20));
60
        locationTextField.addActionListener(formListener);
60
        locationTextField.addActionListener(new java.awt.event.ActionListener() {
61
        locationTextField.addFocusListener(formListener);
61
            public void actionPerformed(java.awt.event.ActionEvent evt) {
62
                locationTextFieldActionPerformed(evt);
63
            }
64
        });
65
66
        locationTextField.addFocusListener(new java.awt.event.FocusAdapter() {
67
            public void focusLost(java.awt.event.FocusEvent evt) {
68
                locationTextFieldFocusLost(evt);
69
            }
70
        });
71
62
72
        gridBagConstraints = new java.awt.GridBagConstraints();
63
        gridBagConstraints = new java.awt.GridBagConstraints();
73
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
64
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
Lines 95-100 Link Here
95
        gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0);
86
        gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0);
96
        add(descTextArea, gridBagConstraints);
87
        add(descTextArea, gridBagConstraints);
97
88
89
    }
90
91
    // Code for dispatching events from components to event handlers.
92
93
    private class FormListener implements java.awt.event.ActionListener, java.awt.event.FocusListener {
94
        public void actionPerformed(java.awt.event.ActionEvent evt) {
95
            if (evt.getSource() == locationTextField) {
96
                XCatalogCustomizer.this.locationTextFieldActionPerformed(evt);
97
            }
98
        }
99
100
        public void focusGained(java.awt.event.FocusEvent evt) {
101
        }
102
103
        public void focusLost(java.awt.event.FocusEvent evt) {
104
            if (evt.getSource() == locationTextField) {
105
                XCatalogCustomizer.this.locationTextFieldFocusLost(evt);
106
            }
107
        }
98
    }//GEN-END:initComponents
108
    }//GEN-END:initComponents
99
109
100
    //!!! find out whether action performed is not enought
110
    //!!! find out whether action performed is not enought
Lines 129-136 Link Here
129
    
139
    
130
    // Variables declaration - do not modify//GEN-BEGIN:variables
140
    // Variables declaration - do not modify//GEN-BEGIN:variables
131
    private javax.swing.JTextArea descTextArea;
141
    private javax.swing.JTextArea descTextArea;
132
    private javax.swing.JTextField locationTextField;
133
    private javax.swing.JLabel locationLabel;
142
    private javax.swing.JLabel locationLabel;
143
    private javax.swing.JTextField locationTextField;
134
    // End of variables declaration//GEN-END:variables
144
    // End of variables declaration//GEN-END:variables
135
145
136
}
146
}
(-)org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.form (-15 / +8 lines)
Lines 1-23 Link Here
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
2
3
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <SyntheticProperties>
4
  <AuxValues>
5
    <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
5
    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
6
  </SyntheticProperties>
6
  </AuxValues>
7
7
8
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
8
  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
9
  <SubComponents>
9
  <SubComponents>
10
    <Component class="javax.swing.JLabel" name="locationLabel">
10
    <Component class="javax.swing.JLabel" name="locationLabel">
11
      <Properties>
11
      <Properties>
12
        <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
12
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
13
          <Color blue="0" green="0" id="black" palette="1" red="0" type="palette"/>
13
          <Connection code="locationTextField" type="code"/>
14
        </Property>
14
        </Property>
15
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
16
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/sun/Bundle.properties" key="CatalogCustomizer.locationLabel.text" replaceFormat="Util.THIS.getString (&quot;{key}&quot;)"/>
16
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/sun/Bundle.properties" key="CatalogCustomizer.locationLabel.text" replaceFormat="Util.THIS.getString (&quot;{key}&quot;)"/>
17
        </Property>
17
        </Property>
18
        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
19
          <Connection code="locationTextField" type="code"/>
20
        </Property>
21
      </Properties>
18
      </Properties>
22
      <Constraints>
19
      <Constraints>
23
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
20
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
Lines 27-38 Link Here
27
    </Component>
24
    </Component>
28
    <Component class="javax.swing.JTextField" name="locationTextField">
25
    <Component class="javax.swing.JTextField" name="locationTextField">
29
      <Properties>
26
      <Properties>
30
        <Property name="columns" type="int" value="20"/>
27
        <Property name="columns" type="int" value="40"/>
31
        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
32
          <Dimension value="[220, 20]"/>
33
        </Property>
34
      </Properties>
28
      </Properties>
35
36
      <Events>
29
      <Events>
37
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="locationTextFieldActionPerformed"/>
30
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="locationTextFieldActionPerformed"/>
38
        <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="locationTextFieldFocusLost"/>
31
        <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="locationTextFieldFocusLost"/>
Lines 49-55 Link Here
49
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/sun/Bundle.properties" key="PROP_choose_file" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
42
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/sun/Bundle.properties" key="PROP_choose_file" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
50
        </Property>
43
        </Property>
51
      </Properties>
44
      </Properties>
52
53
      <Events>
45
      <Events>
54
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
46
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
55
      </Events>
47
      </Events>
Lines 68-74 Link Here
68
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/sun/Bundle.properties" key="HINT_pp" replaceFormat="Util.THIS.getString(&quot;{key}&quot;)"/>
60
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/sun/Bundle.properties" key="HINT_pp" replaceFormat="Util.THIS.getString(&quot;{key}&quot;)"/>
69
        </Property>
61
        </Property>
70
      </Properties>
62
      </Properties>
71
72
      <Events>
63
      <Events>
73
        <EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="preferCheckBoxStateChanged"/>
64
        <EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="preferCheckBoxStateChanged"/>
74
      </Events>
65
      </Events>
Lines 80-85 Link Here
80
    </Component>
71
    </Component>
81
    <Component class="javax.swing.JTextArea" name="descTextArea">
72
    <Component class="javax.swing.JTextArea" name="descTextArea">
82
      <Properties>
73
      <Properties>
74
        <Property name="columns" type="int" value="40"/>
83
        <Property name="editable" type="boolean" value="false"/>
75
        <Property name="editable" type="boolean" value="false"/>
84
        <Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
76
        <Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
85
          <Connection code="javax.swing.UIManager.getFont (&quot;Label.font&quot;)" type="code"/>
77
          <Connection code="javax.swing.UIManager.getFont (&quot;Label.font&quot;)" type="code"/>
Lines 88-93 Link Here
88
          <Color blue="99" green="66" red="66" type="rgb"/>
80
          <Color blue="99" green="66" red="66" type="rgb"/>
89
        </Property>
81
        </Property>
90
        <Property name="lineWrap" type="boolean" value="true"/>
82
        <Property name="lineWrap" type="boolean" value="true"/>
83
        <Property name="rows" type="int" value="4"/>
91
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
84
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
92
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/sun/Bundle.properties" key="DESC_catalog_fmts" replaceFormat="Util.THIS.getString(&quot;{key}&quot;)"/>
85
          <ResourceString bundle="org/netbeans/modules/xml/catalog/impl/sun/Bundle.properties" key="DESC_catalog_fmts" replaceFormat="Util.THIS.getString(&quot;{key}&quot;)"/>
93
        </Property>
86
        </Property>
(-)org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.java (-26 / +39 lines)
Lines 61-86 Link Here
61
        preferCheckBox = new javax.swing.JCheckBox();
61
        preferCheckBox = new javax.swing.JCheckBox();
62
        descTextArea = new javax.swing.JTextArea();
62
        descTextArea = new javax.swing.JTextArea();
63
63
64
        FormListener formListener = new FormListener();
65
64
        setLayout(new java.awt.GridBagLayout());
66
        setLayout(new java.awt.GridBagLayout());
65
67
66
        locationLabel.setForeground(java.awt.Color.black);
67
        locationLabel.setText(Util.THIS.getString ("CatalogCustomizer.locationLabel.text"));
68
        locationLabel.setLabelFor(locationTextField);
68
        locationLabel.setLabelFor(locationTextField);
69
        locationLabel.setText(Util.THIS.getString ("CatalogCustomizer.locationLabel.text"));
69
        add(locationLabel, new java.awt.GridBagConstraints());
70
        add(locationLabel, new java.awt.GridBagConstraints());
70
71
71
        locationTextField.setColumns(20);
72
        locationTextField.setColumns(40);
72
        locationTextField.setPreferredSize(new java.awt.Dimension(220, 20));
73
        locationTextField.addActionListener(formListener);
73
        locationTextField.addActionListener(new java.awt.event.ActionListener() {
74
        locationTextField.addFocusListener(formListener);
74
            public void actionPerformed(java.awt.event.ActionEvent evt) {
75
                locationTextFieldActionPerformed(evt);
76
            }
77
        });
78
79
        locationTextField.addFocusListener(new java.awt.event.FocusAdapter() {
80
            public void focusLost(java.awt.event.FocusEvent evt) {
81
                locationTextFieldFocusLost(evt);
82
            }
83
        });
84
75
85
        gridBagConstraints = new java.awt.GridBagConstraints();
76
        gridBagConstraints = new java.awt.GridBagConstraints();
86
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
77
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
Lines 89-99 Link Here
89
        add(locationTextField, gridBagConstraints);
80
        add(locationTextField, gridBagConstraints);
90
81
91
        selectButton.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/xml/catalog/impl/sun/Bundle").getString("PROP_choose_file"));
82
        selectButton.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/xml/catalog/impl/sun/Bundle").getString("PROP_choose_file"));
92
        selectButton.addActionListener(new java.awt.event.ActionListener() {
83
        selectButton.addActionListener(formListener);
93
            public void actionPerformed(java.awt.event.ActionEvent evt) {
94
                selectButtonActionPerformed(evt);
95
            }
96
        });
97
84
98
        gridBagConstraints = new java.awt.GridBagConstraints();
85
        gridBagConstraints = new java.awt.GridBagConstraints();
99
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
86
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
Lines 102-112 Link Here
102
89
103
        preferCheckBox.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/xml/catalog/impl/sun/Bundle").getString("LBL_preference"));
90
        preferCheckBox.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/xml/catalog/impl/sun/Bundle").getString("LBL_preference"));
104
        preferCheckBox.setToolTipText(Util.THIS.getString("HINT_pp"));
91
        preferCheckBox.setToolTipText(Util.THIS.getString("HINT_pp"));
105
        preferCheckBox.addChangeListener(new javax.swing.event.ChangeListener() {
92
        preferCheckBox.addChangeListener(formListener);
106
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
107
                preferCheckBoxStateChanged(evt);
108
            }
109
        });
110
93
111
        gridBagConstraints = new java.awt.GridBagConstraints();
94
        gridBagConstraints = new java.awt.GridBagConstraints();
112
        gridBagConstraints.gridx = 1;
95
        gridBagConstraints.gridx = 1;
Lines 116-125 Link Here
116
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
99
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
117
        add(preferCheckBox, gridBagConstraints);
100
        add(preferCheckBox, gridBagConstraints);
118
101
102
        descTextArea.setColumns(40);
119
        descTextArea.setEditable(false);
103
        descTextArea.setEditable(false);
120
        descTextArea.setFont(javax.swing.UIManager.getFont ("Label.font"));
104
        descTextArea.setFont(javax.swing.UIManager.getFont ("Label.font"));
121
        descTextArea.setForeground(new java.awt.Color(102, 102, 153));
105
        descTextArea.setForeground(new java.awt.Color(102, 102, 153));
122
        descTextArea.setLineWrap(true);
106
        descTextArea.setLineWrap(true);
107
        descTextArea.setRows(4);
123
        descTextArea.setText(Util.THIS.getString("DESC_catalog_fmts"));
108
        descTextArea.setText(Util.THIS.getString("DESC_catalog_fmts"));
124
        descTextArea.setWrapStyleWord(true);
109
        descTextArea.setWrapStyleWord(true);
125
        descTextArea.setDisabledTextColor(javax.swing.UIManager.getColor ("Label.foreground"));
110
        descTextArea.setDisabledTextColor(javax.swing.UIManager.getColor ("Label.foreground"));
Lines 134-139 Link Here
134
        gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0);
119
        gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0);
135
        add(descTextArea, gridBagConstraints);
120
        add(descTextArea, gridBagConstraints);
136
121
122
    }
123
124
    // Code for dispatching events from components to event handlers.
125
126
    private class FormListener implements java.awt.event.ActionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener {
127
        public void actionPerformed(java.awt.event.ActionEvent evt) {
128
            if (evt.getSource() == locationTextField) {
129
                CatalogCustomizer.this.locationTextFieldActionPerformed(evt);
130
            }
131
            else if (evt.getSource() == selectButton) {
132
                CatalogCustomizer.this.selectButtonActionPerformed(evt);
133
            }
134
        }
135
136
        public void focusGained(java.awt.event.FocusEvent evt) {
137
        }
138
139
        public void focusLost(java.awt.event.FocusEvent evt) {
140
            if (evt.getSource() == locationTextField) {
141
                CatalogCustomizer.this.locationTextFieldFocusLost(evt);
142
            }
143
        }
144
145
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
146
            if (evt.getSource() == preferCheckBox) {
147
                CatalogCustomizer.this.preferCheckBoxStateChanged(evt);
148
            }
149
        }
137
    }//GEN-END:initComponents
150
    }//GEN-END:initComponents
138
151
139
    private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
152
    private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
Lines 184-194 Link Here
184
    }
197
    }
185
    
198
    
186
    // Variables declaration - do not modify//GEN-BEGIN:variables
199
    // Variables declaration - do not modify//GEN-BEGIN:variables
200
    private javax.swing.JTextArea descTextArea;
187
    private javax.swing.JLabel locationLabel;
201
    private javax.swing.JLabel locationLabel;
188
    private javax.swing.JTextField locationTextField;
202
    private javax.swing.JTextField locationTextField;
189
    private javax.swing.JCheckBox preferCheckBox;
203
    private javax.swing.JCheckBox preferCheckBox;
190
    private javax.swing.JButton selectButton;
204
    private javax.swing.JButton selectButton;
191
    private javax.swing.JTextArea descTextArea;
192
    // End of variables declaration//GEN-END:variables
205
    // End of variables declaration//GEN-END:variables
193
206
194
}
207
}

Return to bug 33948