code: public boolean close() {
          boolean canClose = getAdvisor().onPreWindowClose(this);
          if (canClose) {
              // check if page can be closed
              if (currentApplicationPage != null) {
                  canClose = currentApplicationPage.close();
                  // page cannot be closed, exit method and do not dispose
                  if (!canClose)
                      return canClose;
              }
  
              if (control != null) {
                  control.dispose();
                  control = null;
              }
  
              if (windowManager != null) {
                  windowManager.remove(this);
              }
              windowManager = null;
          }
          return canClose;
      }
docs: Close this window. First checks with the advisor by calling the
  {@link ApplicationLifecycleAdvisor#onPreWindowClose(ApplicationWindow)}
  method. Then tries to close it's currentPage. If both are successfull,
  the window will be disposed and removed from the {@link WindowManager}.
  
  @return boolean <code>true</code> if both, the advisor and the
  currentPage allow the closing action.