/**
  * Positions the specified dialog within its parent.
  *
  * @param dialog the dialog to be positioned on the screen.
  */
 public static void centerDialogInParent(final Dialog dialog) {
   positionDialogRelativeToParent(dialog, 0.5, 0.5);
 }