本文整理了Java中com.google.gwt.dom.client.Element.getOffsetLeft()
方法的一些代码示例,展示了Element.getOffsetLeft()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getOffsetLeft()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getOffsetLeft
[英]The number of pixels that the upper left corner of the current element is offset to the left within the offsetParent node.
[中]当前元素左上角在offsetParent节点内向左偏移的像素数。
代码示例来源:origin: stephenh/tessell
@Override
public int getOffsetLeft() {
return element.getOffsetLeft();
}
代码示例来源:origin: de.esoco/gewt
/***************************************
* Returns the integer coordinate of the right side of a widget relative to
* it's parent.
*
* @param rWidget The widget to calculate the right coordinate of
*
* @return The right coordinate of the widget
*/
private int getRightOfWidget(Widget rWidget)
{
Element rElement = rWidget.getElement();
return rElement.getOffsetLeft() + rElement.getOffsetWidth();
}
代码示例来源:origin: com.googlecode.mgwt/mgwt
private int[] offSet(com.google.gwt.dom.client.Element el) {
int left = -el.getOffsetLeft();
int top = -el.getOffsetTop();
com.google.gwt.dom.client.Element domElem = el;
while (true) {
domElem = domElem.getOffsetParent();
if (domElem == null)
break;
left -= domElem.getOffsetLeft();
top -= domElem.getOffsetTop();
}
if (el != this.wrapper.getElement()) {
left *= this.scale;
top *= this.scale;
}
return new int[] {left, top};
}
代码示例来源:origin: dankurka/mgwt
private int[] offSet(com.google.gwt.dom.client.Element el) {
int left = -el.getOffsetLeft();
int top = -el.getOffsetTop();
com.google.gwt.dom.client.Element domElem = el;
while (true) {
domElem = domElem.getOffsetParent();
if (domElem == null)
break;
left -= domElem.getOffsetLeft();
top -= domElem.getOffsetTop();
}
if (el != this.wrapper.getElement()) {
left *= this.scale;
top *= this.scale;
}
return new int[] {left, top};
}
代码示例来源:origin: fr.putnami.pwt/pwt
@Override
public void execute() {
Element itemElement = item.getElement();
InputSwitch.this.slider.getElement().getStyle().setWidth(itemElement.getClientWidth(), Unit.PX);
InputSwitch.this.slider.getElement().getStyle().setMarginLeft(itemElement.getOffsetLeft() - 5, Unit.PX);
}
});
代码示例来源:origin: Putnami/putnami-web-toolkit
@Override
public void execute() {
Element itemElement = item.getElement();
InputSwitch.this.slider.getElement().getStyle().setWidth(itemElement.getClientWidth(), Unit.PX);
InputSwitch.this.slider.getElement().getStyle().setMarginLeft(itemElement.getOffsetLeft() - 5, Unit.PX);
}
});
代码示例来源:origin: sk.seges.acris/acris-recorder-client-core
private int getSubPixelAbsoluteLeft(com.google.gwt.dom.client.Element elem) {
int left = 0;
com.google.gwt.dom.client.Element curr = elem;
while (curr.getOffsetParent() != null) {
left -= curr.getScrollLeft();
curr = curr.getParentElement();
}
while (elem != null) {
left += elem.getOffsetLeft();
elem = elem.getOffsetParent();
}
return left;
};
代码示例来源:origin: fr.putnami.pwt/pwt
int targetHeight = relativeElement.getOffsetHeight();
int targetTop = relativeElement.getOffsetTop();
int targetLeft = relativeElement.getOffsetLeft();
代码示例来源:origin: Putnami/putnami-web-toolkit
int targetHeight = relativeElement.getOffsetHeight();
int targetTop = relativeElement.getOffsetTop();
int targetLeft = relativeElement.getOffsetLeft();
代码示例来源:origin: com.extjs/gxt
int cleft = cellEl.getOffsetLeft();
int cright = cleft + cellEl.getOffsetWidth();
int sleft = c.getScrollLeft();
内容来源于网络,如有侵权,请联系作者删除!