@Override
  public void onClick(ClickEvent event) {
    event.preventDefault();
    event.stopPropagation();

    select();

    if (Gerrit.isSignedIn()) {
      // If the user is signed-in, remember this choice for future panels.
      //
      AccountGeneralPreferences pref = Gerrit.getUserAccount().getGeneralPreferences();
      pref.setDownloadCommand(cmdType);
      com.google.gerrit.client.account.Util.ACCOUNT_SVC.changePreferences(
          pref,
          new AsyncCallback<VoidResult>() {
            @Override
            public void onFailure(Throwable caught) {}

            @Override
            public void onSuccess(VoidResult result) {}
          });
    }
  }
 /**
  * Create a star icon for the given change, and current status. Returns null if the user is not
  * signed in and cannot support starred changes.
  */
 public static Icon createIcon(Change.Id source, boolean starred) {
   return Gerrit.isSignedIn() ? new Icon(source, starred) : null;
 }
 public AccountDashboardScreen(final Account.Id id) {
   ownerId = id;
   mine = Gerrit.isSignedIn() && ownerId.equals(Gerrit.getUserAccount().getId());
 }