public boolean isModified() {
    boolean isModified = false;
    HttpConfigurable httpConfigurable = myHttpConfigurable;
    if (!Comparing.equal(myProxyExceptions.getText().trim(), httpConfigurable.PROXY_EXCEPTIONS))
      return true;
    isModified |= httpConfigurable.USE_PROXY_PAC != myAutoDetectProxyRb.isSelected();
    isModified |= httpConfigurable.USE_PAC_URL != myPacUrlCheckBox.isSelected();
    isModified |= !Comparing.strEqual(httpConfigurable.PAC_URL, myPacUrlTextField.getText());
    isModified |= httpConfigurable.USE_HTTP_PROXY != myUseHTTPProxyRb.isSelected();
    isModified |= httpConfigurable.PROXY_AUTHENTICATION != myProxyAuthCheckBox.isSelected();
    isModified |=
        httpConfigurable.KEEP_PROXY_PASSWORD != myRememberProxyPasswordCheckBox.isSelected();
    isModified |= httpConfigurable.PROXY_TYPE_IS_SOCKS != mySocks.isSelected();

    isModified |=
        !Comparing.strEqual(httpConfigurable.PROXY_LOGIN, myProxyLoginTextField.getText());
    isModified |=
        !Comparing.strEqual(
            httpConfigurable.getPlainProxyPassword(),
            new String(myProxyPasswordTextField.getPassword()));

    try {
      isModified |=
          httpConfigurable.PROXY_PORT != Integer.valueOf(myProxyPortTextField.getText()).intValue();
    } catch (NumberFormatException e) {
      isModified = true;
    }
    isModified |= !Comparing.strEqual(httpConfigurable.PROXY_HOST, myProxyHostTextField.getText());
    return isModified;
  }
  @Override
  public void reset(@NotNull HttpConfigurable settings) {
    myNoProxyRb.setSelected(true); // default
    myAutoDetectProxyRb.setSelected(settings.USE_PROXY_PAC);
    myPacUrlCheckBox.setSelected(settings.USE_PAC_URL);
    myPacUrlTextField.setText(settings.PAC_URL);
    myUseHTTPProxyRb.setSelected(settings.USE_HTTP_PROXY);
    myProxyAuthCheckBox.setSelected(settings.PROXY_AUTHENTICATION);

    enableProxy(settings.USE_HTTP_PROXY);

    myProxyLoginTextField.setText(settings.getProxyLogin());
    myProxyPasswordTextField.setText(settings.getPlainProxyPassword());

    myProxyPortTextField.setNumber(settings.PROXY_PORT);
    myProxyHostTextField.setText(settings.PROXY_HOST);
    myProxyExceptions.setText(StringUtil.notNullize(settings.PROXY_EXCEPTIONS));

    myRememberProxyPasswordCheckBox.setSelected(settings.KEEP_PROXY_PASSWORD);
    mySocks.setSelected(settings.PROXY_TYPE_IS_SOCKS);
    myHTTP.setSelected(!settings.PROXY_TYPE_IS_SOCKS);

    boolean showError = !StringUtil.isEmptyOrSpaces(settings.LAST_ERROR);
    myErrorLabel.setVisible(showError);
    myErrorLabel.setText(showError ? errorText(settings.LAST_ERROR) : null);

    final String oldStyleText =
        CommonProxy.getMessageFromProps(CommonProxy.getOldStyleProperties());
    myOtherWarning.setVisible(oldStyleText != null);
    if (oldStyleText != null) {
      myOtherWarning.setText(oldStyleText);
      myOtherWarning.setIcon(Messages.getWarningIcon());
    }
  }
  public void reset() {
    myNoProxyRb.setSelected(true); // default
    HttpConfigurable httpConfigurable = myHttpConfigurable;
    myAutoDetectProxyRb.setSelected(httpConfigurable.USE_PROXY_PAC);
    myPacUrlCheckBox.setSelected(httpConfigurable.USE_PAC_URL);
    myPacUrlTextField.setText(httpConfigurable.PAC_URL);
    myUseHTTPProxyRb.setSelected(httpConfigurable.USE_HTTP_PROXY);
    myProxyAuthCheckBox.setSelected(httpConfigurable.PROXY_AUTHENTICATION);

    enableProxy(httpConfigurable.USE_HTTP_PROXY);

    myProxyLoginTextField.setText(httpConfigurable.PROXY_LOGIN);
    myProxyPasswordTextField.setText(httpConfigurable.getPlainProxyPassword());

    myProxyPortTextField.setText(Integer.toString(httpConfigurable.PROXY_PORT));
    myProxyHostTextField.setText(httpConfigurable.PROXY_HOST);
    myProxyExceptions.setText(httpConfigurable.PROXY_EXCEPTIONS);

    myRememberProxyPasswordCheckBox.setSelected(httpConfigurable.KEEP_PROXY_PASSWORD);
    mySocks.setSelected(httpConfigurable.PROXY_TYPE_IS_SOCKS);
    myHTTP.setSelected(!httpConfigurable.PROXY_TYPE_IS_SOCKS);

    final boolean showError = !StringUtil.isEmptyOrSpaces(httpConfigurable.LAST_ERROR);
    myErrorLabel.setVisible(showError);
    myErrorLabel.setText(showError ? errorText(httpConfigurable.LAST_ERROR) : "");

    final String oldStyleText =
        CommonProxy.getMessageFromProps(CommonProxy.getOldStyleProperties());
    myOtherWarning.setVisible(oldStyleText != null);
    if (oldStyleText != null) {
      myOtherWarning.setText(oldStyleText);
      myOtherWarning.setUI(new MultiLineLabelUI());
      myOtherWarning.setIcon(Messages.getWarningIcon());
    }
  }
  @Override
  public boolean isModified(@NotNull HttpConfigurable settings) {
    if (!isValid()) {
      return false;
    }

    return !Comparing.strEqual(myProxyExceptions.getText().trim(), settings.PROXY_EXCEPTIONS)
        || settings.USE_PROXY_PAC != myAutoDetectProxyRb.isSelected()
        || settings.USE_PAC_URL != myPacUrlCheckBox.isSelected()
        || !Comparing.strEqual(settings.PAC_URL, myPacUrlTextField.getText())
        || settings.USE_HTTP_PROXY != myUseHTTPProxyRb.isSelected()
        || settings.PROXY_AUTHENTICATION != myProxyAuthCheckBox.isSelected()
        || settings.KEEP_PROXY_PASSWORD != myRememberProxyPasswordCheckBox.isSelected()
        || settings.PROXY_TYPE_IS_SOCKS != mySocks.isSelected()
        || !Comparing.strEqual(settings.getProxyLogin(), myProxyLoginTextField.getText())
        || !Comparing.strEqual(
            settings.getPlainProxyPassword(), new String(myProxyPasswordTextField.getPassword()))
        || settings.PROXY_PORT != myProxyPortTextField.getNumber()
        || !Comparing.strEqual(settings.PROXY_HOST, myProxyHostTextField.getText());
  }