/**
  * Shows image resize modal.
  *
  * @param inImageWidth Width of original image to resize.
  * @param inImageHeight Height of original image to resize.
  */
 public void showResizeModal(final String inImageWidth, final String inImageHeight) {
   imageCropDialog =
       widget.createImageCropContent(strategy, avatarId, inImageWidth, inImageHeight);
   Dialog dialog = widget.createDialog(imageCropDialog);
   dialog.setBgVisible(true);
   dialog.center();
 }
  /**
   * Gets fired off when the avatar id is changed.
   *
   * @param inAvatarId - the avatar id.
   * @param inDisplayDelete - flag telling to display or hide the delete button.
   * @param inDisplayEdit - flag telling to display or hide the edit button
   */
  public void onAvatarIdChanged(
      final String inAvatarId, final boolean inDisplayDelete, final boolean inDisplayEdit) {
    Session.getInstance().getCurrentPerson().setAvatarId(inAvatarId);

    avatarId = inAvatarId;
    Widget avatar = widget.createImage(strategy, avatarId);
    avatarContainer.clear();
    avatarContainer.add(avatar);

    if (editButton != null) {
      editButton.setVisible(inDisplayEdit);
    }

    if (deleteButton != null) {
      deleteButton.setVisible(inDisplayDelete);
    }
  }