本文整理了Java中com.google.gwt.user.client.Element.getOffsetTop()
方法的一些代码示例,展示了Element.getOffsetTop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getOffsetTop()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称: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)){
内容来源于网络,如有侵权,请联系作者删除!