本文整理了Java中com.google.gwt.user.client.Element.setScrollLeft()
方法的一些代码示例,展示了Element.setScrollLeft()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setScrollLeft()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:setScrollLeft
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Sets the horizontal scroll position.
*
* @param position the new horizontal scroll position, in pixels
*/
public void setHorizontalScrollPosition(int position) {
getScrollableElement().setScrollLeft(position);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected void onUpdate(double progress) {
int diff = targetScrollLeft - startScrollLeft;
getElement().setScrollLeft(startScrollLeft + (int) (diff * progress));
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected void onComplete() {
getElement().setScrollLeft(targetScrollLeft);
}
代码示例来源:origin: sk.seges.acris/acris-widgets-beantable
/**
* Sets the scroll property of the header and footers wrappers when scrolling
* so that the header, footer, and data tables line up.
*
* @param baseHeader true to scroll the data table as well
*/
protected void scrollTables(boolean baseHeader) {
if (scrollPolicy == ScrollPolicy.DISABLED) {
return;
}
if (lastScrollLeft >= 0) {
headerWrapper.setScrollLeft(lastScrollLeft);
if (baseHeader) {
dataWrapper.setScrollLeft(lastScrollLeft);
}
if (footerWrapper != null) {
footerWrapper.setScrollLeft(lastScrollLeft);
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
getElement().setScrollLeft(0);
代码示例来源:origin: net.wetheinter/gwt-user
@Override
protected void onComplete() {
getElement().setScrollLeft(targetScrollLeft);
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
protected void onUpdate(double progress) {
int diff = targetScrollLeft - startScrollLeft;
getElement().setScrollLeft(startScrollLeft + (int) (diff * progress));
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Sets the horizontal scroll position.
*
* @param position the new horizontal scroll position, in pixels
*/
public void setHorizontalScrollPosition(int position) {
getScrollableElement().setScrollLeft(position);
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Sets the horizontal scroll position.
*
* @param position the new horizontal scroll position, in pixels
*/
public void setHorizontalScrollPosition(int position) {
getScrollableElement().setScrollLeft(position);
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
protected void onUpdate(double progress) {
int diff = targetScrollLeft - startScrollLeft;
getElement().setScrollLeft(startScrollLeft + (int) (diff * progress));
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
protected void onComplete() {
getElement().setScrollLeft(targetScrollLeft);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
public void setScrollLeft(int scrollLeft) {
this.scrollLeft = scrollLeft;
scrollBoxStateTrigger.cancel();
getElement().setScrollLeft(scrollLeft);
}
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-grids
void setScrollLeft(final Integer scrollLeft) {
scrollPanel().getElement().setScrollLeft(scrollLeft);
}
代码示例来源:origin: kiegroup/appformer
void setScrollLeft(final Integer scrollLeft) {
scrollPanel().getElement().setScrollLeft(scrollLeft);
}
代码示例来源: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: sk.seges.acris/acris-widgets-beantable
@Override
public void setColumnWidth(HTMLTable table, Element ghostRow, int column,
int width) {
super.setColumnWidth(table, ghostRow, column, width);
Element tableElem = table.getElement();
Element parentElem = DOM.getParent(tableElem);
int scrollLeft = 0;
if (parentElem != null) {
scrollLeft = parentElem.getScrollLeft();
}
tableElem.getStyle().setProperty("display", "none");
tableElem.getStyle().setProperty("display", "");
if (parentElem != null) {
parentElem.setScrollLeft(scrollLeft);
}
}
}
代码示例来源:origin: geogebra/geogebra
/**
* @param latexItem
* panel to be scrolled
* @param margin
* minimal distance from cursor to left/right border
*/
public static void scrollParent(FlowPanel latexItem, int margin) {
if (latexItem.getOffsetWidth() + latexItem.getElement().getScrollLeft()
- margin < CursorBox.startX) {
latexItem.getElement().setScrollLeft((int) CursorBox.startX
- latexItem.getOffsetWidth() + margin);
} else if (CursorBox.startX < latexItem.getElement().getScrollLeft()
+ margin) {
latexItem.getElement()
.setScrollLeft((int) CursorBox.startX - margin);
}
}
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!