Java 类com.google.gwt.user.client.Window.ScrollHandler 实例源码

项目:dtgov    文件:EditableInlineLabelPopover.java   
/**
 * 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();
        }
    });
}