Example #1
0
  /**
   * Restores the previously stored focus Element.
   *
   * <p>Current use case is to restore the focus when a Window is closed. Does currently handle only
   * a single value. Needs to be extended for #12158
   *
   * @return the lastFocusElementBeforeDialogOpened
   */
  public void focusStoredElement() {
    if (storedFocus != null) {
      storedFocus.focus();

      Scheduler.get()
          .scheduleDeferred(
              new ScheduledCommand() {
                @Override
                public void execute() {
                  storedFocus.focus();
                }
              });
    }
  }
Example #2
0
 public void focus(Element elem) {
   elem.focus();
 }