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

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

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

Element.getOffsetTop介绍

暂无

代码示例

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

public Point translatePoints(Point p) {
 List<String> list = new ArrayList<String>(3);
 list.add("position");
 list.add("left");
 list.add("top");
 Map<String, String> map = getStyleAttribute(list);
 boolean relative = "relative".equals(map.get("position"));
 int l = Util.parseInt(map.get("left"), -11234);
 int t = Util.parseInt(map.get("top"), -11234);
 l = l != -11234 ? l : (relative ? 0 : dom.getOffsetLeft());
 t = t != -11234 ? t : (relative ? 0 : dom.getOffsetTop());
 Point o = getXY();
 return new Point(p.x - o.x + l, p.y - o.y + t);
}

代码示例来源:origin: Putnami/putnami-web-toolkit

private int getElementTop(Element heading) {
  if (this.isBodyScrollWidget()) {
    return heading.getAbsoluteTop();
  }
  return heading.getOffsetTop() - this.scrollWidget.getElement().getOffsetTop();
}

代码示例来源:origin: fr.putnami.pwt/pwt

private int getElementTop(Element heading) {
  if (this.isBodyScrollWidget()) {
    return heading.getAbsoluteTop();
  }
  return heading.getOffsetTop() - this.scrollWidget.getElement().getOffsetTop();
}

代码示例来源:origin: OpenNMS/opennms

private void updateScrollPanelSize() {
  Element topologyComponent = DOM.getElementById("TopologyComponent");
  int topoHeight = topologyComponent.getOffsetHeight();
  int containerHeight = topoHeight - (m_focusedContainer.getElement().getOffsetTop() + 5);
  int tableHeight = m_focusedContainer.getOffsetHeight();
  if(containerHeight >= 0){
    m_scrollContainer.setHeight("" + Math.min(containerHeight, tableHeight) + "px");
    if(tableHeight > containerHeight){
      m_scrollContainer.getElement().getStyle().setOverflowY(Style.Overflow.SCROLL);
    } else{
      m_scrollContainer.getElement().getStyle().setOverflowY(Style.Overflow.HIDDEN);
    }
  }
}

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app

private void updateScrollPanelSize() {
  Element topologyComponent = DOM.getElementById("TopologyComponent");
  int topoHeight = topologyComponent.getOffsetHeight();
  int containerHeight = topoHeight - (m_focusedContainer.getElement().getOffsetTop() + 5);
  int tableHeight = m_focusedContainer.getOffsetHeight();
  if(containerHeight >= 0){
    m_scrollContainer.setHeight("" + Math.min(containerHeight, tableHeight) + "px");
    if(tableHeight > containerHeight){
      m_scrollContainer.getElement().getStyle().setOverflowY(Style.Overflow.SCROLL);
    } else{
      m_scrollContainer.getElement().getStyle().setOverflowY(Style.Overflow.HIDDEN);
    }
  }
}

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

int topMargin = element.getOffsetTop();
int bottomMargin = 0;
if ("light".equals(getState().modalityLevel)){

相关文章

Element类方法