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

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

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

Element.getScrollHeight介绍

暂无

代码示例

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

@Override
public void add(Widget w) {
 logArea.add(w);
 scrollPanel.setScrollPosition(scrollPanel.getElement().getScrollHeight());
}

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

public int getMaximumVerticalScrollPosition() {
 return getScrollableElement().getScrollHeight() - getScrollableElement().getClientHeight();
}

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

private void startResizingFrom(int x, int y) {
 isResizing = true;
 onSplitterResizeStarted(x, y);
 // Resize glassElem to take up the entire scrollable window area
 int height = RootPanel.getBodyElement().getScrollHeight() - 1;
 int width = RootPanel.getBodyElement().getScrollWidth() - 1;
 glassElem.getStyle().setProperty("height", height + "px");
 glassElem.getStyle().setProperty("width", width + "px");
 RootPanel.getBodyElement().appendChild(glassElem);
}

代码示例来源:origin: com.extjs/gxt

/**
 * Returns whether the element is scrollable on the y-axis.
 * 
 * @return true if scrollable on the y-axis
 */
public boolean isScrollableY() {
 return dom.getScrollHeight() > dom.getClientHeight();
}

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

@Override
public void add(Widget w) {
 logArea.add(w);
 scrollPanel.setScrollPosition(scrollPanel.getElement().getScrollHeight());
}

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

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

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

@Override
public void add(Widget w) {
 logArea.add(w);
 scrollPanel.setScrollPosition(scrollPanel.getElement().getScrollHeight());
}

代码示例来源:origin: dennisjzh/GwtMobile-UI

@Override
public void onKeyUp(KeyUpEvent event) {
  Element ele = getElement();
  final int extraLineHeight = 15; 
  int scrollHeight = ele.getScrollHeight();
  int clientHeight = ele.getClientHeight();
  Utils.Console(scrollHeight + " " + clientHeight);
  if ( clientHeight < scrollHeight ) {
    ele.getStyle().setHeight(scrollHeight + extraLineHeight, Unit.PX);
  }
}

代码示例来源:origin: dennisjzh/GwtMobile-UI

@Override
  public void execute() {
    _content.setHeight(_content.getElement().getScrollHeight() - Utils.getPaddingHeight(_content.getElement()) + "px");
  }
});

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

private Panel scrollPanel() {
  final Panel panel = mock(AbsolutePanel.class);
  final Element element = mock(Element.class);
  doReturn(SCROLL_LEFT).when(element).getScrollLeft();
  doReturn(SCROLL_TOP).when(element).getScrollTop();
  doReturn(SCROLL_WIDTH).when(element).getScrollWidth();
  doReturn(SCROLL_HEIGHT).when(element).getScrollHeight();
  doReturn(CLIENT_WIDTH).when(element).getClientWidth();
  doReturn(CLIENT_HEIGHT).when(element).getClientHeight();
  doReturn(element).when(panel).getElement();
  return panel;
}

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

private Panel scrollPanel() {
  final Panel panel = mock(AbsolutePanel.class);
  final Element element = mock(Element.class);
  doReturn(SCROLL_LEFT).when(element).getScrollLeft();
  doReturn(SCROLL_TOP).when(element).getScrollTop();
  doReturn(SCROLL_WIDTH).when(element).getScrollWidth();
  doReturn(SCROLL_HEIGHT).when(element).getScrollHeight();
  doReturn(CLIENT_WIDTH).when(element).getClientWidth();
  doReturn(CLIENT_HEIGHT).when(element).getClientHeight();
  doReturn(element).when(panel).getElement();
  return panel;
}

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

private Panel emptyPanel() {

    final Panel panel = mock(AbsolutePanel.class);
    final Element element = mock(Element.class);

    doReturn(0).when(element).getScrollLeft();
    doReturn(0).when(element).getScrollTop();
    doReturn(0).when(element).getScrollWidth();
    doReturn(0).when(element).getScrollHeight();
    doReturn(0).when(element).getClientWidth();
    doReturn(0).when(element).getClientHeight();

    doReturn(element).when(panel).getElement();

    return panel;
  }
}

代码示例来源: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: org.uberfire/uberfire-wires-core-grids

void setVerticalScrollPosition(final Double percentage) {
  final Integer scrollHeight = scrollPanel().getElement().getScrollHeight();
  final Integer clientHeight = scrollPanel().getElement().getClientHeight();
  final Integer max = scrollHeight - clientHeight;
  setScrollTop((int) ((max * percentage) / 100));
}

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

void setVerticalScrollPosition(final Double percentage) {
  final Integer scrollHeight = scrollPanel().getElement().getScrollHeight();
  final Integer clientHeight = scrollPanel().getElement().getClientHeight();
  final Integer max = scrollHeight - clientHeight;
  setScrollTop((int) ((max * percentage) / 100));
}

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

Double getVerticalScrollPosition() {
  final Integer scrollTop = scrollPanel().getElement().getScrollTop();
  final Integer scrollHeight = scrollPanel().getElement().getScrollHeight();
  final Integer clientHeight = scrollPanel().getElement().getClientHeight();
  final Integer level = scrollHeight - clientHeight;
  return level == 0 ? 0d : 100d * scrollTop / level;
}

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

Double getVerticalScrollPosition() {
  final Integer scrollTop = scrollPanel().getElement().getScrollTop();
  final Integer scrollHeight = scrollPanel().getElement().getScrollHeight();
  final Integer clientHeight = scrollPanel().getElement().getClientHeight();
  final Integer level = scrollHeight - clientHeight;
  return level == 0 ? 0d : 100d * scrollTop / level;
}

代码示例来源:origin: dennisjzh/GwtMobile-UI

public void setPositionToBottom() {
  Utils.setTransitionDuration(getWidget().getElement(), 0);
  Utils.setTranslateY(getWidget().getElement(), 
      this.getElement().getClientHeight() - this.getElement().getScrollHeight());
}

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

private void startResizingFrom(int x, int y) {
 isResizing = true;
 onSplitterResizeStarted(x, y);
 // Resize glassElem to take up the entire scrollable window area
 int height = RootPanel.getBodyElement().getScrollHeight() - 1;
 int width = RootPanel.getBodyElement().getScrollWidth() - 1;
 glassElem.getStyle().setProperty("height", height + "px");
 glassElem.getStyle().setProperty("width", width + "px");
 RootPanel.getBodyElement().appendChild(glassElem);
}

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

private void startResizingFrom(int x, int y) {
 isResizing = true;
 onSplitterResizeStarted(x, y);
 // Resize glassElem to take up the entire scrollable window area
 int height = RootPanel.getBodyElement().getScrollHeight() - 1;
 int width = RootPanel.getBodyElement().getScrollWidth() - 1;
 glassElem.getStyle().setProperty("height", height + "px");
 glassElem.getStyle().setProperty("width", width + "px");
 RootPanel.getBodyElement().appendChild(glassElem);
}

相关文章

Element类方法