/** * Add to the root panel and then position appropriately. */ public void showOver(Element element) { rootPanel.add(this); getElement().removeClassName("hide"); //$NON-NLS-1$ positionOver(getElement(), element); registration = Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { close(); } }); }