_getdown = getdown;
_msgs = msgs;
+ String[] hostPortAuthUser = ProxyUtil.jalviewProxyProperties(getdown._app);
+ String host = hostPortAuthUser[0];
+ String port = hostPortAuthUser[1];
+ boolean proxyAuth = Boolean.parseBoolean(hostPortAuthUser[2]);
+ String username = hostPortAuthUser[3];
+
setLayout(new VGroupLayout());
setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
add(new SaneLabelField(get("m.configure_proxy")));
JPanel row = new JPanel(new GridLayout());
row.add(new SaneLabelField(get("m.proxy_host")), BorderLayout.WEST);
row.add(_host = new SaneTextField());
+ _host.setText(host);
add(row);
row = new JPanel(new GridLayout());
row.add(new SaneLabelField(get("m.proxy_port")), BorderLayout.WEST);
row.add(_port = new SaneTextField());
+ _port.setText(port);
add(row);
add(new Spacer(5, 5));
row = new JPanel(new GridLayout());
row.add(new SaneLabelField(get("m.proxy_auth_required")), BorderLayout.WEST);
_useAuth = new JCheckBox();
+ _useAuth.setSelected(proxyAuth);
row.add(_useAuth);
add(row);
row = new JPanel(new GridLayout());
row.add(new SaneLabelField(get("m.proxy_username")), BorderLayout.WEST);
_username = new SaneTextField();
- _username.setEnabled(false);
+ _username.setText(username);
+ _username.setEnabled(_useAuth.isSelected());
row.add(_username);
add(row);
row = new JPanel(new GridLayout());
row.add(new SaneLabelField(get("m.proxy_password")), BorderLayout.WEST);
_password = new SanePasswordField();
- _password.setEnabled(false);
+ _password.setEnabled(_useAuth.isSelected());
row.add(_password);
add(row);