/** * Scrolls screen to the top of the screen. */ public void scrollToTop() { Window.scrollTo(0, 0); } /**
@Override public void execute() { Window.scrollTo(0, 1); } });
@Override public void scrollTo(final int x, final int y) { Window.scrollTo(x, y); }
@Override public void run() { Window.scrollTo(0, 0); }
@Override public void run() { Window.scrollTo(0, 0); }
@Override public void storeFail(String identifier, String reason) { clientContext.raiseStatusMessage(reason, true); Window.scrollTo(0, 0); } });
@Override public void storeFail(String identifier, String reason) { clientContext.raiseStatusMessage(reason, true); Window.scrollTo(0, 0); } });
@Override public void onValueChange(ValueChangeEvent<String> event) { // first clear the slate clear(); final String strToken = ( event != null ) ? event.getValue() : ""; final String pageParams = strToken.indexOf( '?' ) == -1 ? "" : strToken.substring( strToken.indexOf( '?' ) + 1 ); if ( appContext.isInstancePage() ) { showInstancePage( ); // Recording analytics in InstancePage so we can access additional instance info } else { showResultsPage( ); final String paramsToRecord = ( pageParams.isEmpty() ) ? "Empty_Search" : pageParams; } // now scroll to top Window.scrollTo(0, 0); setLocationJSNI(); }
/** * Set a general error on the form. */ public void setError(String string) { Label errorLabel = new Label(string); errorLabel.setStyleName(JQM4GWT_ERROR_LABEL_STYLENAME); errorLabel.addStyleName(JQM4GWT_GENERAL_ERROR_LABEL_STYLENAME); generalErrors.add(errorLabel); Window.scrollTo(0, 0); }
@Override public void execute() { int top = NavSpy.this.getElementTop(heading) - NavSpy.this.spyOffset; if (NavSpy.this.isBodyScrollWidget()) { Window.scrollTo(Document.get().getScrollLeft(), top); } else { NavSpy.this.scrollWidget.getElement().setScrollTop(top); } } });
/** * Set a general error on the form. */ public void setError(String string) { Label errorLabel = new Label(string); errorLabel.setStyleName(JQM4GWT_ERROR_LABEL_STYLENAME); errorLabel.addStyleName(JQM4GWT_GENERAL_ERROR_LABEL_STYLENAME); generalErrors.add(errorLabel); Window.scrollTo(0, 0); }
@Override public void execute() { int top = NavSpy.this.getElementTop(heading) - NavSpy.this.spyOffset; if (NavSpy.this.isBodyScrollWidget()) { Window.scrollTo(Document.get().getScrollLeft(), top); } else { NavSpy.this.scrollWidget.getElement().setScrollTop(top); } } });
/** * The scroll top offset is set to the passed value on all matched elements. This method works for * both visible and hidden elements. */ public GQuery scrollTop(int top) { for (Element e : elements) { if (e == window || e.getNodeName() == null || e == (Node) document) { Window.scrollTo($(e).scrollLeft(), top); } else { e.setPropertyInt("scrollTop", top); } } return this; }
/** * The scroll left offset is set to the passed value on all matched elements. This method works * for both visible and hidden elements. */ public GQuery scrollLeft(int left) { for (Element e : elements) { if (e == window || e.getNodeName() == null || e == (Node) document) { Window.scrollTo(left, $(e).scrollTop()); } else { e.setPropertyInt("scrollLeft", left); } } return this; }
Window.scrollTo(0, 0); return;