Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 @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);
 }
Esempio n. 4
0
 @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);
 }
Esempio n. 5
0
 @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>");
 }
Esempio n. 6
0
 public boolean isSaveCredentials() {
   if (pnlCredentials == null) return false;
   return pnlCredentials.isSaveCredentials();
 }
Esempio n. 7
0
 public char[] getPassword() {
   if (pnlCredentials == null) return null;
   return pnlCredentials.getPassword();
 }
Esempio n. 8
0
 public String getUsername() {
   if (pnlCredentials == null) return null;
   return pnlCredentials.getUserName();
 }