code: public static ClickHandler createHider (final PopupPanel popup)
      {
          return new ClickHandler() {
              public void onClick (ClickEvent event) {
                  popup.hide();
              }
          };
      }
docs: Creates a click handler that hides the specified popup. Useful when creating popups that
  behave like menus.