예제 #1
0
 public static CredentialDialog getHttpProxyCredentialDialog(
     String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {
   CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText);
   dialog.prepareForProxyCredentials(username, password);
   dialog.pack();
   return dialog;
 }
예제 #2
0
 public static CredentialDialog getOsmApiCredentialDialog(
     String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {
   CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText);
   if (Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
     dialog.prepareForOsmApiCredentials(username, password);
   } else {
     dialog.prepareForOtherHostCredentials(username, password, host);
   }
   dialog.pack();
   return dialog;
 }