- useProxy.setSelected(Cache.getDefault("USE_PROXY", false));
- useProxy_actionPerformed(); // make sure useProxy is correctly initialised
- proxyServerTB.setText(Cache.getDefault("PROXY_SERVER", ""));
- proxyPortTB.setText(Cache.getDefault("PROXY_PORT", ""));
+ String proxyTypeString = Cache.getDefault("USE_PROXY", "false");
+ previousProxyType = proxyTypeString;
+ switch (proxyTypeString)
+ {
+ case Cache.PROXYTYPE_NONE:
+ proxyType.setSelected(noProxy.getModel(), true);
+ break;
+ case Cache.PROXYTYPE_SYSTEM:
+ proxyType.setSelected(systemProxy.getModel(), true);
+ break;
+ case Cache.PROXYTYPE_CUSTOM:
+ proxyType.setSelected(customProxy.getModel(), true);
+ break;
+ default:
+ Cache.log.warn(
+ "Incorrect PROXY_TYPE - should be 'none' (clear proxy properties), 'false' (system settings), 'true' (custom settings): "
+ + proxyTypeString);
+ }
+ proxyServerHttpTB.setText(Cache.getDefault("PROXY_SERVER", ""));
+ proxyPortHttpTB.setText(Cache.getDefault("PROXY_PORT", ""));
+ proxyServerHttpsTB.setText(Cache.getDefault("PROXY_SERVER_HTTPS", ""));
+ proxyPortHttpsTB.setText(Cache.getDefault("PROXY_PORT_HTTPS", ""));
+ proxyAuth.setSelected(Cache.getDefault("PROXY_AUTH", false));
+ proxyAuthUsernameTB
+ .setText(Cache.getDefault("PROXY_AUTH_USERNAME", ""));
+ // we are not storing or retrieving proxy password from .jalview_properties
+ proxyAuthPasswordPB.setText(Cache.proxyAuthPassword == null ? ""
+ : new String(Cache.proxyAuthPassword));
+ setCustomProxyEnabled();