本文整理了Java中com.google.gwt.user.client.Window.scrollTo()
方法的一些代码示例,展示了Window.scrollTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.scrollTo()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Window
类名称:Window
方法名:scrollTo
[英]Scroll the window to the specified position.
[中]将窗口滚动到指定位置。
代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt
/**
* Scrolls screen to the top of the screen.
*/
public void scrollToTop() {
Window.scrollTo(0, 0);
}
/**
代码示例来源:origin: dennisjzh/GwtMobile-UI
@Override
public void execute() {
Window.scrollTo(0, 1);
}
});
代码示例来源:origin: stephenh/tessell
@Override
public void scrollTo(final int x, final int y) {
Window.scrollTo(x, y);
}
代码示例来源:origin: com.googlecode.mgwt/mgwt
@Override
public void run() {
Window.scrollTo(0, 0);
}
代码示例来源:origin: dankurka/mgwt
@Override
public void run() {
Window.scrollTo(0, 0);
}
代码示例来源:origin: net.sf.javaprinciples.client/client-presentation
@Override
public void storeFail(String identifier, String reason)
{
clientContext.raiseStatusMessage(reason, true);
Window.scrollTo(0, 0);
}
});
代码示例来源:origin: net.sf.javaprinciples.client/client-presentation
@Override
public void storeFail(String identifier, String reason)
{
clientContext.raiseStatusMessage(reason, true);
Window.scrollTo(0, 0);
}
});
代码示例来源:origin: org.eagle-i/eagle-i-search-gwt
@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();
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
/**
* 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);
}
代码示例来源:origin: fr.putnami.pwt/pwt
@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);
}
}
});
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
/**
* 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);
}
代码示例来源:origin: Putnami/putnami-web-toolkit
@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);
}
}
});
代码示例来源:origin: com.googlecode.gwtquery/gwtquery
/**
* 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;
}
代码示例来源:origin: com.googlecode.gwtquery/gwtquery
/**
* 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;
}
代码示例来源:origin: net.sf.javaprinciples.client/client-presentation
Window.scrollTo(0, 0);
return;
内容来源于网络,如有侵权,请联系作者删除!