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

项目: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();
        }
    });
}
项目:touchkit    文件:Ios7SafariHackLoader.java   
@Override
public void onWindowScroll(ScrollEvent event) {
    if (ignoreNextScrollEvent) {
        ignoreNextScrollEvent = false;
    } else if (deviceInLandscapeMode() && state == State.STOPPED
            && height != getWindowHeight()) {
        onScreenKeyboardMightBeVisible &= Document.get()
                .getDocumentElement().getOffsetHeight() != getWindowHeight();
        if (!onScreenKeyboardMightBeVisible) {
            schedule(2);
        }
    }
}