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

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

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

Element.setScrollTop介绍

[英]The number of pixels that an element's content is scrolled to the top.
[中]元素内容滚动到顶部的像素数。

代码示例

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

  1. public void setScrollTop(Document doc, int top) {
  2. ensureDocumentScrollingElement(doc).setScrollTop(top);
  3. }

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

  1. public void setVerticalScrollPosition(int position) {
  2. getScrollableElement().setScrollTop(position);
  3. }

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

  1. expandableInner.getStyle().setHeight(height, Unit.PX);
  2. expandableInner.getStyle().setWidth(width, Unit.PX);
  3. expandable.setScrollTop(height);
  4. expandable.setScrollLeft(width);
  5. collapsible.setScrollTop(collapsible.getScrollHeight() + 100);
  6. collapsible.setScrollLeft(collapsible.getScrollWidth() + 100);

代码示例来源:origin: stephenh/tessell

  1. @Override
  2. public void setScrollTop(int scrollTop) {
  3. element.setScrollTop(scrollTop);
  4. }

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

  1. public void setScrollTop(Document doc, int top) {
  2. ensureDocumentScrollingElement(doc).setScrollTop(top);
  3. }

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

  1. public void setVerticalScrollPosition(int position) {
  2. getScrollableElement().setScrollTop(position);
  3. }

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

  1. public void setScrollTop(Document doc, int top) {
  2. doc.getViewportElement().setScrollTop(top);
  3. }

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

  1. public void setVerticalScrollPosition(int position) {
  2. getScrollableElement().setScrollTop(position);
  3. }

代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

  1. @Override
  2. public void postLayout() {
  3. VPanel panel = getWidget();
  4. if (uidlScrollTop != null) {
  5. // IE / Safari fix for when scroll top is set to greater than panel
  6. // height
  7. int maxScroll = panel.getWidget().getOffsetHeight();
  8. if (uidlScrollTop > maxScroll) {
  9. uidlScrollTop = maxScroll;
  10. }
  11. panel.contentNode.setScrollTop(uidlScrollTop.intValue());
  12. // Read actual value back to ensure update logic is correct
  13. // TODO Does this trigger reflows?
  14. panel.scrollTop = panel.contentNode.getScrollTop();
  15. uidlScrollTop = null;
  16. }
  17. if (uidlScrollLeft != null) {
  18. panel.contentNode.setScrollLeft(uidlScrollLeft.intValue());
  19. // Read actual value back to ensure update logic is correct
  20. // TODO Does this trigger reflows?
  21. panel.scrollLeft = panel.contentNode.getScrollLeft();
  22. uidlScrollLeft = null;
  23. }
  24. }

代码示例来源:origin: geogebra/geogebra

  1. private void focusTextArea() {
  2. wrap.getElement().focus();
  3. if (html.getElement().getParentElement() != null) {
  4. html.getElement().getParentElement().setScrollTop(0);
  5. }
  6. }

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

  1. private void scrollToWidget() {
  2. try {
  3. com.google.gwt.dom.client.Element e;
  4. if (element == null) {
  5. e = w.getElement().getParentElement();
  6. while (e != null && !isScrollable(e)) {
  7. e = e.getParentElement();
  8. }
  9. } else {
  10. e = element;
  11. }
  12. e.setScrollTop(e.getScrollHeight());
  13. } catch (Exception e) {
  14. }
  15. // Sanity check
  16. w.getElement().scrollIntoView();
  17. }
  18. }

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

  1. expandableInner.getStyle().setHeight(height, Unit.PX);
  2. expandableInner.getStyle().setWidth(width, Unit.PX);
  3. expandable.setScrollTop(height);
  4. expandable.setScrollLeft(width);
  5. collapsible.setScrollTop(collapsible.getScrollHeight() + 100);
  6. collapsible.setScrollLeft(collapsible.getScrollWidth() + 100);

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

  1. expandableInner.getStyle().setHeight(height, Unit.PX);
  2. expandableInner.getStyle().setWidth(width, Unit.PX);
  3. expandable.setScrollTop(height);
  4. expandable.setScrollLeft(width);
  5. collapsible.setScrollTop(collapsible.getScrollHeight() + 100);
  6. collapsible.setScrollLeft(collapsible.getScrollWidth() + 100);

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

  1. c.setScrollTop(ctop);
  2. } else if (cbot > sbot) {
  3. if (hscroll && (cm.getTotalWidth() > scroller.getWidth() - scrollOffset)) {
  4. cbot += scrollOffset;
  5. c.setScrollTop(cbot -= ch);

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

  1. panel.contentNode.setScrollTop(panel.scrollTop);
  2. panel.contentNode.setScrollLeft(panel.scrollLeft);
  3. Profiler.leave("PanelConnector.layout update scroll positions");

相关文章

Element类方法