/** * 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); }
public void setScrollTop(final int scrolloffset) { scrollElement.setScrollTop(scrolloffset); }
public void setScrollTop(int scrollTop) { wrapper.setScrollTop(scrollTop); }
getElement().setScrollTop(0);
/** * 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); }
/** * 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); }
public void setScrollTop(int scrollTop) { this.scrollTop = scrollTop; scrollBoxStateTrigger.cancel(); getElement().setScrollTop(scrollTop); }
void setScrollTop(final Integer scrollTop) { scrollPanel().getElement().setScrollTop(scrollTop); }
void setScrollTop(final Integer scrollTop) { scrollPanel().getElement().setScrollTop(scrollTop); }
/** {@inheritDoc} */ @Override public void scrollBottom() { scrollPanel.getElement().setScrollTop(scrollPanel.getElement().getScrollHeight()); }
@Override public void onScroll(final ScrollEvent scrollEvent) { domElementContainer.getElement().setScrollTop(0); domElementContainer.getElement().setScrollLeft(0); } },
@Override public void onScroll(final ScrollEvent scrollEvent) { domElementContainer.getElement().setScrollTop(0); domElementContainer.getElement().setScrollLeft(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); } } });
@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); } } });
@Override public boolean execute() { if (scrollPanel.getElement().getOffsetParent() != null) { scrollPanel .getElement() .setScrollTop(scrollPanel.getElement().getScrollHeight()); scrollBottomRequired = false; return false; } return true; } },
private void addLine(String line) { Element p = DOM.createElement("p"); p.setInnerHTML(line); htmlPanel.getElement().appendChild(p); htmlPanel.getElement().setScrollTop(1000000); }
void onCanvasFocusedSelectionEvent(final @Observes CanvasFocusedShapeEvent event) { getSessionContainer().getElement().setScrollLeft(event.getX()); getSessionContainer().getElement().setScrollTop(event.getY()); }
@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); }
getElement().setScrollTop(0);
getElement().setScrollTop(0);