public void prepareForProxyCredentials(String username, String password) { setTitle(tr("Enter credentials for HTTP proxy")); pnlCredentials = new HttpProxyCredentialsPanel(this); getContentPane().add(pnlCredentials, BorderLayout.CENTER); pnlCredentials.init(username, password); validate(); }
public void prepareForOtherHostCredentials(String username, String password, String host) { setTitle(tr("Enter credentials for host")); pnlCredentials = new OtherHostCredentialsPanel(this, host); getContentPane().add(pnlCredentials, BorderLayout.CENTER); pnlCredentials.init(username, password); validate(); }
@Override protected void build() { super.build(); tfUserName.setToolTipText(tr("Please enter the user name of your account")); tfPassword.setToolTipText(tr("Please enter the password of your account")); lblHeading.setText( "<html>" + tr( "Authenticating at the host ''{0}'' failed. Please enter a valid username and a valid password.", host) + "</html>"); updateWarningLabel(host); }
@Override protected void build() { super.build(); tfUserName.setToolTipText(tr("Please enter the user name of your OSM account")); tfPassword.setToolTipText(tr("Please enter the password of your OSM account")); String apiUrl = OsmApi.getOsmApi().getBaseUrl(); lblHeading.setText( "<html>" + tr( "Authenticating at the OSM API ''{0}'' failed. Please enter a valid username and a valid password.", apiUrl) + "</html>"); updateWarningLabel(apiUrl); }
@Override protected void build() { super.build(); tfUserName.setToolTipText( tr("Please enter the user name for authenticating at your proxy server")); tfPassword.setToolTipText( tr("Please enter the password for authenticating at your proxy server")); lblHeading.setText( "<html>" + tr( "Authenticating at the HTTP proxy ''{0}'' failed. Please enter a valid username and a valid password.", Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_HOST) + ':' + Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_PORT)) + "</html>"); lblWarning.setText( "<html>" + tr( "Warning: depending on the authentication method the proxy server uses the password may be transferred unencrypted.") + "</html>"); }
public boolean isSaveCredentials() { if (pnlCredentials == null) return false; return pnlCredentials.isSaveCredentials(); }
public char[] getPassword() { if (pnlCredentials == null) return null; return pnlCredentials.getPassword(); }
public String getUsername() { if (pnlCredentials == null) return null; return pnlCredentials.getUserName(); }