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 105236
Collapse All | Expand All

(-)a/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.form (+4 lines)
Lines 6-13 Link Here
6
      <ResourceString bundle="org/netbeans/modules/options/general/Bundle.properties" key="ACD_AdvancedProxyPanel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
6
      <ResourceString bundle="org/netbeans/modules/options/general/Bundle.properties" key="ACD_AdvancedProxyPanel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
7
    </Property>
7
    </Property>
8
  </AccessibilityProperties>
8
  </AccessibilityProperties>
9
  <SyntheticProperties>
10
    <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,13,0,0,3,33"/>
11
  </SyntheticProperties>
9
  <AuxValues>
12
  <AuxValues>
10
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
13
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
14
    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
11
    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
15
    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
12
    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
16
    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
13
    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
17
    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
(-)a/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.java (-1 / +74 lines)
Lines 42-47 Link Here
42
42
43
import javax.swing.event.DocumentEvent;
43
import javax.swing.event.DocumentEvent;
44
import javax.swing.event.DocumentListener;
44
import javax.swing.event.DocumentListener;
45
import org.openide.DialogDescriptor;
46
import org.openide.NotificationLineSupport;
45
47
46
/**
48
/**
47
 *
49
 *
Lines 53-58 Link Here
53
    private String oldHttpsPort;
55
    private String oldHttpsPort;
54
    private String oldSocksHost;
56
    private String oldSocksHost;
55
    private String oldSocksPort;
57
    private String oldSocksPort;
58
    private DialogDescriptor dd = null;
59
60
    public void setDialogDescriptor(DialogDescriptor dd) {
61
        this.dd = dd;
62
    }
56
    
63
    
57
    /** Creates new form AdvancedProxyPanel */
64
    /** Creates new form AdvancedProxyPanel */
58
    AdvancedProxyPanel (GeneralOptionsModel model) {
65
    AdvancedProxyPanel (GeneralOptionsModel model) {
Lines 84-89 Link Here
84
                followHttpPortIfDemand ();
91
                followHttpPortIfDemand ();
85
            }
92
            }
86
        });
93
        });
94
        tfHttpsProxyPort.getDocument().addDocumentListener (new DocumentListener () {
95
            public void insertUpdate(DocumentEvent arg0) {
96
                validatePortValue(tfHttpsProxyPort.getText ());
97
            }
98
99
            public void removeUpdate(DocumentEvent arg0) {
100
                validatePortValue(tfHttpsProxyPort.getText ());
101
            }
102
103
            public void changedUpdate(DocumentEvent arg0) {
104
                validatePortValue(tfHttpsProxyPort.getText ());
105
            }
106
        });
107
        tfSocksPort.getDocument().addDocumentListener (new DocumentListener () {
108
            public void insertUpdate(DocumentEvent arg0) {
109
                validatePortValue(tfSocksPort.getText ());
110
            }
111
112
            public void removeUpdate(DocumentEvent arg0) {
113
                validatePortValue(tfSocksPort.getText ());
114
            }
115
116
            public void changedUpdate(DocumentEvent arg0) {
117
                validatePortValue(tfSocksPort.getText ());
118
            }
119
        });
120
        
87
    }
121
    }
88
    
122
    
89
    // helps implement OptionsPanelController
123
    // helps implement OptionsPanelController
Lines 176-187 Link Here
176
    }
210
    }
177
    
211
    
178
    private void followHttpPortIfDemand () {
212
    private void followHttpPortIfDemand () {
213
        String port = tfHttpProxyPort.getText ();
214
        validatePortValue( port );
215
179
        if (! cbSameProxySettings.isSelected ()) {
216
        if (! cbSameProxySettings.isSelected ()) {
180
            return ;
217
            return ;
181
        }
218
        }
182
        String port = tfHttpProxyPort.getText ();
219
183
        tfHttpsProxyPort.setText (port);
220
        tfHttpsProxyPort.setText (port);
184
        tfSocksPort.setText (port);
221
        tfSocksPort.setText (port);
222
        
223
    }
224
225
    private void validatePortValue (String port) {
226
        clearError();
227
        if( port != null && port.length() > 0 ) {
228
            try {
229
                Integer.parseInt(port);
230
            } catch( NumberFormatException nfex) {
231
                showError(org.openide.util.NbBundle.getMessage(
232
                        AdvancedProxyPanel.class,
233
                        "LBL_AdvancedProxyPanel_PortError")); // NOI18N
234
            }
235
        }
236
    }
237
238
    private void showError(String message) {
239
        if( dd != null ) {
240
            NotificationLineSupport notificationLineSupport =
241
                    dd.getNotificationLineSupport();
242
            if( notificationLineSupport != null ) {
243
                notificationLineSupport.setErrorMessage(message);
244
            }
245
            dd.setValid(false);
246
        }
247
    }
248
249
    private void clearError() {
250
        if( dd != null ) {
251
            NotificationLineSupport notificationLineSupport =
252
                    dd.getNotificationLineSupport();
253
            if( notificationLineSupport != null ) {
254
                notificationLineSupport.clearMessages();
255
            }
256
            dd.setValid(true);
257
        }
185
    }
258
    }
186
    
259
    
187
    /** This method is called from within the constructor to
260
    /** This method is called from within the constructor to
(-)a/core.ui/src/org/netbeans/core/ui/options/general/Bundle.properties (+4 lines)
Lines 150-155 Link Here
150
LBL_GeneralOptionsPanel_bMoreProxy.AN=Advanced Proxy Settings
150
LBL_GeneralOptionsPanel_bMoreProxy.AN=Advanced Proxy Settings
151
LBL_GeneralOptionsPanel_bMoreProxy.AD=Open Advanced Proxy Settings
151
LBL_GeneralOptionsPanel_bMoreProxy.AD=Open Advanced Proxy Settings
152
152
153
LBL_GeneralOptionsPanel_PortError=Port number must be an integer value.
154
153
LBL_GeneralOptionsPanel_lWebProxy=Proxy Settings\:
155
LBL_GeneralOptionsPanel_lWebProxy=Proxy Settings\:
154
156
155
LBL_AdvancedProxyPanel_lHttpProxyHost=HTTP &Proxy\:
157
LBL_AdvancedProxyPanel_lHttpProxyHost=HTTP &Proxy\:
Lines 173-178 Link Here
173
LBL_AdvancedProxyPanel_cbSameProxySettings=Use the same proxy settings for &all protocols
175
LBL_AdvancedProxyPanel_cbSameProxySettings=Use the same proxy settings for &all protocols
174
176
175
LBL_AdvancedProxyPanel_Title=Advanced Proxy Options
177
LBL_AdvancedProxyPanel_Title=Advanced Proxy Options
178
LBL_AdvancedProxyPanel_PortError=Port number must be an integer value.
176
GeneralOptionsPanel.rbUseSystemProxy.text=&Use System Proxy Settings
179
GeneralOptionsPanel.rbUseSystemProxy.text=&Use System Proxy Settings
177
GeneralOptionsPanel.lWebBrowser.text=&Web Browser\:
180
GeneralOptionsPanel.lWebBrowser.text=&Web Browser\:
178
GeneralOptionsPanel.rbNoProxy.text=&No Proxy
181
GeneralOptionsPanel.rbNoProxy.text=&No Proxy
Lines 259-261 Link Here
259
General.Options.Export.Category.displayName=General
262
General.Options.Export.Category.displayName=General
260
General.Options.Export.displayName=General
263
General.Options.Export.displayName=General
261
Other.Options.Export.displayName=All Other Unspecified
264
Other.Options.Export.displayName=All Other Unspecified
265
GeneralOptionsPanel.errorLabel.text=errorLabel
(-)a/core.ui/src/org/netbeans/core/ui/options/general/GeneralOptionsPanel.form (-6 / +23 lines)
Lines 1-6 Link Here
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
2
3
<Form version="1.4" maxVersion="1.4" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.4" maxVersion="1.4" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <SyntheticProperties>
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,78,0,0,5,21"/>
6
  </SyntheticProperties>
4
  <AuxValues>
7
  <AuxValues>
5
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
8
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
6
    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
9
    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
Lines 21-27 Link Here
21
                  <Group type="102" alignment="1" attributes="0">
24
                  <Group type="102" alignment="1" attributes="0">
22
                      <Component id="lWebBrowser" min="-2" max="-2" attributes="0"/>
25
                      <Component id="lWebBrowser" min="-2" max="-2" attributes="0"/>
23
                      <EmptySpace type="separate" max="-2" attributes="0"/>
26
                      <EmptySpace type="separate" max="-2" attributes="0"/>
24
                      <Component id="cbWebBrowser" pref="1131" max="32767" attributes="0"/>
27
                      <Component id="cbWebBrowser" pref="1132" max="32767" attributes="0"/>
25
                      <EmptySpace max="-2" attributes="0"/>
28
                      <EmptySpace max="-2" attributes="0"/>
26
                      <Component id="editBrowserButton" min="-2" max="-2" attributes="0"/>
29
                      <Component id="editBrowserButton" min="-2" max="-2" attributes="0"/>
27
                  </Group>
30
                  </Group>
Lines 36-46 Link Here
36
                          <Group type="102" alignment="0" attributes="0">
39
                          <Group type="102" alignment="0" attributes="0">
37
                              <EmptySpace min="17" pref="17" max="17" attributes="0"/>
40
                              <EmptySpace min="17" pref="17" max="17" attributes="0"/>
38
                              <Group type="103" groupAlignment="0" attributes="0">
41
                              <Group type="103" groupAlignment="0" attributes="0">
39
                                  <Component id="bMoreProxy" alignment="0" min="-2" max="-2" attributes="0"/>
42
                                  <Group type="102" alignment="0" attributes="0">
43
                                      <Component id="bMoreProxy" min="-2" max="-2" attributes="0"/>
44
                                      <EmptySpace max="-2" attributes="0"/>
45
                                      <Component id="errorLabel" pref="1105" max="32767" attributes="0"/>
46
                                  </Group>
40
                                  <Group type="102" alignment="0" attributes="0">
47
                                  <Group type="102" alignment="0" attributes="0">
41
                                      <Component id="lProxyHost" min="-2" max="-2" attributes="0"/>
48
                                      <Component id="lProxyHost" min="-2" max="-2" attributes="0"/>
42
                                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
49
                                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
43
                                      <Component id="tfProxyHost" pref="959" max="32767" attributes="2"/>
50
                                      <Component id="tfProxyHost" pref="1016" max="32767" attributes="2"/>
44
                                      <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
51
                                      <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
45
                                      <Component id="lProxyPort" min="-2" max="-2" attributes="0"/>
52
                                      <Component id="lProxyPort" min="-2" max="-2" attributes="0"/>
46
                                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
53
                                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
Lines 55-64 Link Here
55
                      <Component id="lUsage" min="-2" max="-2" attributes="0"/>
62
                      <Component id="lUsage" min="-2" max="-2" attributes="0"/>
56
                      <EmptySpace min="-2" max="-2" attributes="0"/>
63
                      <EmptySpace min="-2" max="-2" attributes="0"/>
57
                      <Group type="103" groupAlignment="0" attributes="0">
64
                      <Group type="103" groupAlignment="0" attributes="0">
58
                          <Component id="lblUsageInfo" alignment="0" pref="1171" max="32767" attributes="0"/>
65
                          <Component id="lblUsageInfo" alignment="0" pref="1205" max="32767" attributes="0"/>
59
                          <Group type="102" alignment="0" attributes="0">
66
                          <Group type="102" alignment="0" attributes="0">
60
                              <Component id="jUsageCheck" min="-2" max="-2" attributes="0"/>
67
                              <Component id="jUsageCheck" min="-2" max="-2" attributes="0"/>
61
                              <EmptySpace pref="691" max="32767" attributes="0"/>
68
                              <EmptySpace pref="838" max="32767" attributes="0"/>
62
                          </Group>
69
                          </Group>
63
                          <Component id="lblLearnMore" alignment="0" min="-2" max="-2" attributes="0"/>
70
                          <Component id="lblLearnMore" alignment="0" min="-2" max="-2" attributes="0"/>
64
                      </Group>
71
                      </Group>
Lines 98-104 Link Here
98
                  <Component id="lProxyPort" alignment="3" min="-2" max="-2" attributes="0"/>
105
                  <Component id="lProxyPort" alignment="3" min="-2" max="-2" attributes="0"/>
99
              </Group>
106
              </Group>
100
              <EmptySpace max="-2" attributes="0"/>
107
              <EmptySpace max="-2" attributes="0"/>
101
              <Component id="bMoreProxy" min="-2" max="-2" attributes="0"/>
108
              <Group type="103" groupAlignment="3" attributes="0">
109
                  <Component id="bMoreProxy" alignment="3" min="-2" max="-2" attributes="0"/>
110
                  <Component id="errorLabel" alignment="3" min="-2" max="-2" attributes="0"/>
111
              </Group>
102
              <EmptySpace type="unrelated" max="-2" attributes="0"/>
112
              <EmptySpace type="unrelated" max="-2" attributes="0"/>
103
              <Component id="jSeparator3" min="-2" pref="10" max="-2" attributes="0"/>
113
              <Component id="jSeparator3" min="-2" pref="10" max="-2" attributes="0"/>
104
              <EmptySpace type="unrelated" max="-2" attributes="0"/>
114
              <EmptySpace type="unrelated" max="-2" attributes="0"/>
Lines 276-280 Link Here
276
        <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="lblLearnMoreMousePressed"/>
286
        <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="lblLearnMoreMousePressed"/>
277
      </Events>
287
      </Events>
278
    </Component>
288
    </Component>
289
    <Component class="javax.swing.JLabel" name="errorLabel">
290
      <Properties>
291
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
292
          <ResourceString bundle="org/netbeans/core/ui/options/general/Bundle.properties" key="GeneralOptionsPanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
293
        </Property>
294
      </Properties>
295
    </Component>
279
  </SubComponents>
296
  </SubComponents>
280
</Form>
297
</Form>
(-)a/core.ui/src/org/netbeans/core/ui/options/general/GeneralOptionsPanel.java (-7 / +92 lines)
Lines 41-57 Link Here
41
41
42
package org.netbeans.core.ui.options.general;
42
package org.netbeans.core.ui.options.general;
43
43
44
import java.awt.Color;
44
import java.awt.Component;
45
import java.awt.Component;
45
import java.awt.Cursor;
46
import java.awt.Cursor;
46
import java.awt.event.ActionEvent;
47
import java.awt.event.ActionEvent;
47
import java.awt.event.ActionListener;
48
import java.awt.event.ActionListener;
49
import java.beans.PropertyChangeEvent;
50
import java.beans.PropertyChangeSupport;
48
import java.net.MalformedURLException;
51
import java.net.MalformedURLException;
49
import java.net.URL;
52
import java.net.URL;
50
import javax.swing.AbstractButton;
53
import javax.swing.AbstractButton;
51
import javax.swing.ButtonGroup;
54
import javax.swing.ButtonGroup;
52
import javax.swing.JLabel;
55
import javax.swing.JLabel;
53
import javax.swing.JPanel;
56
import javax.swing.JPanel;
57
import javax.swing.event.DocumentEvent;
58
import javax.swing.event.DocumentListener;
54
import org.netbeans.beaninfo.editors.HtmlBrowser;
59
import org.netbeans.beaninfo.editors.HtmlBrowser;
60
import org.netbeans.spi.options.OptionsPanelController;
55
import org.openide.DialogDescriptor;
61
import org.openide.DialogDescriptor;
56
import org.openide.DialogDisplayer;
62
import org.openide.DialogDisplayer;
57
import org.openide.awt.Mnemonics;
63
import org.openide.awt.Mnemonics;
Lines 69-74 Link Here
69
    private GeneralOptionsModel     model;
75
    private GeneralOptionsModel     model;
70
    private HtmlBrowser.FactoryEditor editor;
76
    private HtmlBrowser.FactoryEditor editor;
71
    private AdvancedProxyPanel advancedPanel;
77
    private AdvancedProxyPanel advancedPanel;
78
    private PropertyChangeSupport support = new PropertyChangeSupport(this);
79
    private boolean valid = true;
72
80
73
    
81
    
74
    /** 
82
    /** 
Lines 76-81 Link Here
76
     */
84
     */
77
    public GeneralOptionsPanel () {
85
    public GeneralOptionsPanel () {
78
        initComponents ();
86
        initComponents ();
87
88
        errorLabel.setForeground(new Color(153,0,0));
89
        errorLabel.setVisible(false);
79
        
90
        
80
        loc (lWebBrowser, "Web_Browser");
91
        loc (lWebBrowser, "Web_Browser");
81
        loc (lWebProxy, "Web_Proxy");
92
        loc (lWebProxy, "Web_Proxy");
Lines 95-100 Link Here
95
        cbWebBrowser.addActionListener (this);
106
        cbWebBrowser.addActionListener (this);
96
        tfProxyHost.addActionListener (this);
107
        tfProxyHost.addActionListener (this);
97
        tfProxyPort.addActionListener (this);
108
        tfProxyPort.addActionListener (this);
109
110
        tfProxyPort.getDocument().addDocumentListener(new DocumentListener(){
111
112
            public void insertUpdate(DocumentEvent e) {
113
                validatePortValue();
114
            }
115
116
            public void removeUpdate(DocumentEvent e) {
117
                validatePortValue();
118
            }
119
120
            public void changedUpdate(DocumentEvent e) {
121
                validatePortValue();
122
            }
123
        });
98
        
124
        
99
        ButtonGroup bgProxy = new ButtonGroup ();
125
        ButtonGroup bgProxy = new ButtonGroup ();
100
        bgProxy.add (rbNoProxy);
126
        bgProxy.add (rbNoProxy);
Lines 138-143 Link Here
138
        //if (System.getProperty("netbeans.system_http_proxy") == null) // NOI18N
164
        //if (System.getProperty("netbeans.system_http_proxy") == null) // NOI18N
139
            //rbUseSystemProxy.setEnabled(false);
165
            //rbUseSystemProxy.setEnabled(false);
140
    }
166
    }
167
168
    private void validatePortValue () {
169
        clearError();
170
171
        boolean oldValid = valid;
172
        valid = isPortValid();
173
        if( !valid ) {
174
            showError(loc ("LBL_GeneralOptionsPanel_PortError")); // NOI18N
175
        }
176
177
        if( oldValid != valid ) {
178
            support.firePropertyChange(
179
                    new PropertyChangeEvent(this,
180
                    OptionsPanelController.PROP_VALID, oldValid, valid));
181
        }
182
    }
183
184
    private boolean isPortValid() {
185
        String port = tfProxyPort.getText ();
186
        boolean portStatus = true;
187
        if( port != null && port.length() > 0 ) {
188
            try {
189
                Integer.parseInt(port);
190
            } catch( NumberFormatException nfex) {
191
                portStatus = false;
192
            }
193
        }
194
195
        return portStatus;
196
    }
197
198
    private void showError(String message) {
199
        errorLabel.setVisible(true);
200
        errorLabel.setText(message);
201
    }
202
203
    private void clearError() {
204
        errorLabel.setText("");
205
        errorLabel.setVisible(false);
206
    }
141
    
207
    
142
    /** This method is called from within the constructor to
208
    /** This method is called from within the constructor to
143
     * initialize the form.
209
     * initialize the form.
Lines 165-170 Link Here
165
        jUsageCheck = new javax.swing.JCheckBox();
231
        jUsageCheck = new javax.swing.JCheckBox();
166
        lblUsageInfo = new javax.swing.JLabel();
232
        lblUsageInfo = new javax.swing.JLabel();
167
        lblLearnMore = new javax.swing.JLabel();
233
        lblLearnMore = new javax.swing.JLabel();
234
        errorLabel = new javax.swing.JLabel();
168
235
169
        lWebBrowser.setLabelFor(cbWebBrowser);
236
        lWebBrowser.setLabelFor(cbWebBrowser);
170
        org.openide.awt.Mnemonics.setLocalizedText(lWebBrowser, org.openide.util.NbBundle.getMessage(GeneralOptionsPanel.class, "GeneralOptionsPanel.lWebBrowser.text")); // NOI18N
237
        org.openide.awt.Mnemonics.setLocalizedText(lWebBrowser, org.openide.util.NbBundle.getMessage(GeneralOptionsPanel.class, "GeneralOptionsPanel.lWebBrowser.text")); // NOI18N
Lines 236-241 Link Here
236
            }
303
            }
237
        });
304
        });
238
305
306
        org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(GeneralOptionsPanel.class, "GeneralOptionsPanel.errorLabel.text")); // NOI18N
307
239
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
308
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
240
        this.setLayout(layout);
309
        this.setLayout(layout);
241
        layout.setHorizontalGroup(
310
        layout.setHorizontalGroup(
Lines 246-252 Link Here
246
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
315
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
247
                        .add(lWebBrowser)
316
                        .add(lWebBrowser)
248
                        .add(18, 18, 18)
317
                        .add(18, 18, 18)
249
                        .add(cbWebBrowser, 0, 1131, Short.MAX_VALUE)
318
                        .add(cbWebBrowser, 0, 1132, Short.MAX_VALUE)
250
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
319
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
251
                        .add(editBrowserButton))
320
                        .add(editBrowserButton))
252
                    .add(jSeparator2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1291, Short.MAX_VALUE)
321
                    .add(jSeparator2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1291, Short.MAX_VALUE)
Lines 260-270 Link Here
260
                            .add(layout.createSequentialGroup()
329
                            .add(layout.createSequentialGroup()
261
                                .add(17, 17, 17)
330
                                .add(17, 17, 17)
262
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
331
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
263
                                    .add(bMoreProxy)
332
                                    .add(layout.createSequentialGroup()
333
                                        .add(bMoreProxy)
334
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
335
                                        .add(errorLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1105, Short.MAX_VALUE))
264
                                    .add(layout.createSequentialGroup()
336
                                    .add(layout.createSequentialGroup()
265
                                        .add(lProxyHost)
337
                                        .add(lProxyHost)
266
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
338
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
267
                                        .add(tfProxyHost, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 957, Short.MAX_VALUE)
339
                                        .add(tfProxyHost, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1016, Short.MAX_VALUE)
268
                                        .add(12, 12, 12)
340
                                        .add(12, 12, 12)
269
                                        .add(lProxyPort)
341
                                        .add(lProxyPort)
270
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
342
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
Lines 274-283 Link Here
274
                        .add(lUsage)
346
                        .add(lUsage)
275
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
347
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
276
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
348
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
277
                            .add(lblUsageInfo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1171, Short.MAX_VALUE)
349
                            .add(lblUsageInfo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1205, Short.MAX_VALUE)
278
                            .add(layout.createSequentialGroup()
350
                            .add(layout.createSequentialGroup()
279
                                .add(jUsageCheck)
351
                                .add(jUsageCheck)
280
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 690, Short.MAX_VALUE))
352
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 838, Short.MAX_VALUE))
281
                            .add(lblLearnMore))))
353
                            .add(lblLearnMore))))
282
                .add(0, 0, 0))
354
                .add(0, 0, 0))
283
        );
355
        );
Lines 307-313 Link Here
307
                    .add(tfProxyHost, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
379
                    .add(tfProxyHost, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
308
                    .add(lProxyPort))
380
                    .add(lProxyPort))
309
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
381
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
310
                .add(bMoreProxy)
382
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
383
                    .add(bMoreProxy)
384
                    .add(errorLabel))
311
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
385
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
312
                .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
386
                .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
313
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
387
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
Lines 358-363 Link Here
358
        advancedPanel = new AdvancedProxyPanel (model);
432
        advancedPanel = new AdvancedProxyPanel (model);
359
    }
433
    }
360
    DialogDescriptor dd = new DialogDescriptor (advancedPanel, loc ("LBL_AdvancedProxyPanel_Title"));
434
    DialogDescriptor dd = new DialogDescriptor (advancedPanel, loc ("LBL_AdvancedProxyPanel_Title"));
435
    advancedPanel.setDialogDescriptor(dd);
436
    dd.createNotificationLineSupport();
361
    advancedPanel.update (tfProxyHost.getText (), tfProxyPort.getText ());
437
    advancedPanel.update (tfProxyHost.getText (), tfProxyPort.getText ());
362
    DialogDisplayer.getDefault ().createDialog (dd).setVisible (true);
438
    DialogDisplayer.getDefault ().createDialog (dd).setVisible (true);
363
    if (DialogDescriptor.OK_OPTION.equals (dd.getValue ())) {
439
    if (DialogDescriptor.OK_OPTION.equals (dd.getValue ())) {
Lines 407-412 Link Here
407
    private javax.swing.JButton bMoreProxy;
483
    private javax.swing.JButton bMoreProxy;
408
    private javax.swing.JComboBox cbWebBrowser;
484
    private javax.swing.JComboBox cbWebBrowser;
409
    private javax.swing.JButton editBrowserButton;
485
    private javax.swing.JButton editBrowserButton;
486
    private javax.swing.JLabel errorLabel;
410
    private javax.swing.JSeparator jSeparator2;
487
    private javax.swing.JSeparator jSeparator2;
411
    private javax.swing.JSeparator jSeparator3;
488
    private javax.swing.JSeparator jSeparator3;
412
    private javax.swing.JCheckBox jUsageCheck;
489
    private javax.swing.JCheckBox jUsageCheck;
Lines 560-566 Link Here
560
    }
637
    }
561
    
638
    
562
    boolean dataValid () {
639
    boolean dataValid () {
563
        return true;
640
        return isPortValid();
564
    }
641
    }
565
    
642
    
566
    boolean isChanged () {
643
    boolean isChanged () {
Lines 569-574 Link Here
569
        if (!tfProxyPort.getText ().equals (model.getHttpProxyPort ())) return true;
646
        if (!tfProxyPort.getText ().equals (model.getHttpProxyPort ())) return true;
570
        return changed;
647
        return changed;
571
    }
648
    }
649
650
    public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {
651
        support.addPropertyChangeListener(l);
652
    }
653
654
    public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
655
        support.removePropertyChangeListener(l);
656
    }
572
    
657
    
573
    public void actionPerformed (ActionEvent e) {
658
    public void actionPerformed (ActionEvent e) {
574
        changed = true;
659
        changed = true;

Return to bug 105236