com.google.gwt.user.client.Element.setScrollTop()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(206)

本文整理了Java中com.google.gwt.user.client.Element.setScrollTop()方法的一些代码示例,展示了Element.setScrollTop()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setScrollTop()方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:setScrollTop

Element.setScrollTop介绍

暂无

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Sets the vertical scroll position.
 * 
 * @param position the new vertical scroll position, in pixels
 * @deprecated as of GWT 2.3, replaced by
 *             {@link #setVerticalScrollPosition(int)}
 */
@Deprecated
public void setScrollPosition(int position) {
 getScrollableElement().setScrollTop(position);
}

代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl

public void setScrollTop(final int scrolloffset) {
  scrollElement.setScrollTop(scrolloffset);
}

代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl

public void setScrollTop(int scrollTop) {
  wrapper.setScrollTop(scrollTop);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

getElement().setScrollTop(0);

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Sets the vertical scroll position.
 * 
 * @param position the new vertical scroll position, in pixels
 * @deprecated as of GWT 2.3, replaced by
 *             {@link #setVerticalScrollPosition(int)}
 */
@Deprecated
public void setScrollPosition(int position) {
 getScrollableElement().setScrollTop(position);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Sets the vertical scroll position.
 * 
 * @param position the new vertical scroll position, in pixels
 * @deprecated as of GWT 2.3, replaced by
 *             {@link #setVerticalScrollPosition(int)}
 */
@Deprecated
public void setScrollPosition(int position) {
 getScrollableElement().setScrollTop(position);
}

代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit

public void setScrollTop(int scrollTop) {
  this.scrollTop = scrollTop;
  scrollBoxStateTrigger.cancel();
  getElement().setScrollTop(scrollTop);
}

代码示例来源:origin: org.uberfire/uberfire-wires-core-grids

void setScrollTop(final Integer scrollTop) {
  scrollPanel().getElement().setScrollTop(scrollTop);
}

代码示例来源:origin: kiegroup/appformer

void setScrollTop(final Integer scrollTop) {
  scrollPanel().getElement().setScrollTop(scrollTop);
}

代码示例来源:origin: org.eclipse.che.plugin/che-plugin-git-ext-git

/** {@inheritDoc} */
@Override
public void scrollBottom() {
 scrollPanel.getElement().setScrollTop(scrollPanel.getElement().getScrollHeight());
}

代码示例来源:origin: kiegroup/appformer

@Override
  public void onScroll(final ScrollEvent scrollEvent) {
    domElementContainer.getElement().setScrollTop(0);
    domElementContainer.getElement().setScrollLeft(0);
  }
},

代码示例来源:origin: org.uberfire/uberfire-wires-core-grids

@Override
  public void onScroll(final ScrollEvent scrollEvent) {
    domElementContainer.getElement().setScrollTop(0);
    domElementContainer.getElement().setScrollLeft(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: 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: org.eclipse.che.core/che-core-ide-app

@Override
 public boolean execute() {
  if (scrollPanel.getElement().getOffsetParent() != null) {
   scrollPanel
     .getElement()
     .setScrollTop(scrollPanel.getElement().getScrollHeight());
   scrollBottomRequired = false;
   return false;
  }
  return true;
 }
},

代码示例来源:origin: tadglines/Socket.IO-Java

private void addLine(String line) {
  Element p = DOM.createElement("p");
  p.setInnerHTML(line);
  htmlPanel.getElement().appendChild(p);
  htmlPanel.getElement().setScrollTop(1000000);
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-widgets

void onCanvasFocusedSelectionEvent(final @Observes CanvasFocusedShapeEvent event) {
  getSessionContainer().getElement().setScrollLeft(event.getX());
  getSessionContainer().getElement().setScrollTop(event.getY());
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-widgets

@Test
public void testOnCanvasFocusedSelectionEvent() {
  final SessionPresenterView view = spy(new SessionPresenterView());
  final CanvasFocusedShapeEvent event = mock(CanvasFocusedShapeEvent.class);
  final com.google.gwt.user.client.Element element = mock(com.google.gwt.user.client.Element.class);
  final int eventX = 101;
  final int eventY = 110;
  when(event.getX()).thenReturn(eventX);
  when(event.getY()).thenReturn(eventY);
  when(sessionContainer.getElement()).thenReturn(element);
  doReturn(sessionContainer).when(view).getSessionContainer();
  view.onCanvasFocusedSelectionEvent(event);
  verify(element).setScrollLeft(eventX);
  verify(element).setScrollTop(eventY);
}

代码示例来源:origin: net.wetheinter/gwt-user

getElement().setScrollTop(0);

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

getElement().setScrollTop(0);

相关文章

Element类方法