コード例 #1
0
 /**
  * Load component state from settings
  *
  * @param settings the settings to use
  */
 public void load(PasswordSafeSettings settings) {
   PasswordSafeSettings.ProviderType t = settings.getProviderType();
   switch (t) {
     case DO_NOT_STORE:
       myDoNotRememberPasswordsRadioButton.setSelected(true);
       break;
     case MEMORY_ONLY:
       myRememberPasswordsUntilClosingRadioButton.setSelected(true);
       break;
     case MASTER_PASSWORD:
       myRememberOnDiskProtectedRadioButton.setSelected(true);
       break;
     default:
       throw new IllegalStateException("Unknown provider type: " + t);
   }
 }
コード例 #2
0
 /**
  * Check if the option panel modified the settings
  *
  * @param settings the settings to compare with
  * @return true, if values were modified
  */
 public boolean isModified(PasswordSafeSettings settings) {
   return getProviderType() != settings.getProviderType();
 }