本文整理了Java中com.google.gwt.dom.client.Element.getAbsoluteTop()
方法的一些代码示例,展示了Element.getAbsoluteTop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getAbsoluteTop()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getAbsoluteTop
[英]Gets an element's absolute top coordinate in the document's coordinate system.
[中]获取元素在文档坐标系中的绝对顶部坐标。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets an element's absolute top coordinate in the document's coordinate
* system.
*
* @param elem the element to be measured
* @return the element's absolute top coordinate
* @deprecated Use {@link Element#getAbsoluteTop()} instead.
*/
@Deprecated
public static int getAbsoluteTop(Element elem) {
return elem.getAbsoluteTop();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets an element's absolute bottom coordinate in the document's coordinate
* system.
*/
public final int getAbsoluteBottom() {
return getAbsoluteTop() + getOffsetHeight();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public void setPosition(int offsetWidth, int offsetHeight) {
panel.setPopupPosition(lastParent.getAbsoluteLeft() + offsetX,
lastParent.getAbsoluteTop() + offsetY);
}
});
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the touch y-position relative to a given element.
*
* @param target the element whose coordinate system is to be used
* @return the relative y-position
*/
public final int getRelativeY(Element target) {
return getClientY() - target.getAbsoluteTop() + target.getScrollTop()
+ target.getOwnerDocument().getScrollTop();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the mouse y-position relative to a given element.
*
* @param target the element whose coordinate system is to be used
* @return the relative y-position
*/
public int getRelativeY(Element target) {
NativeEvent e = getNativeEvent();
return e.getClientY() - target.getAbsoluteTop() + target.getScrollTop() +
target.getOwnerDocument().getScrollTop();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets an element's absolute top coordinate in the document's coordinate
* system.
*
* @param elem the element to be measured
* @return the element's absolute top coordinate
* @deprecated Use {@link Element#getAbsoluteTop()} instead.
*/
@Deprecated
public static int getAbsoluteTop(Element elem) {
return elem.getAbsoluteTop();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets an element's absolute bottom coordinate in the document's coordinate
* system.
*/
public final int getAbsoluteBottom() {
return getAbsoluteTop() + getOffsetHeight();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
+ senderElem.getPropertyInt("scrollLeft")
+ Window.getScrollLeft();
int y = event.getClientY() - senderElem.getAbsoluteTop()
+ senderElem.getPropertyInt("scrollTop")
+ Window.getScrollTop();
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
public void setPosition(int offsetWidth, int offsetHeight) {
panel.setPopupPosition(lastParent.getAbsoluteLeft() + offsetX,
lastParent.getAbsoluteTop() + offsetY);
}
});
代码示例来源:origin: net.wetheinter/gwt-user
public void setPosition(int offsetWidth, int offsetHeight) {
panel.setPopupPosition(lastParent.getAbsoluteLeft() + offsetX,
lastParent.getAbsoluteTop() + offsetY);
}
});
代码示例来源:origin: com.google.gwt/gwt-servlet
int top = selectedElem.getAbsoluteTop() - containerTop;
int width = selectedElem.getPropertyInt("offsetWidth");
int height = selectedElem.getPropertyInt("offsetHeight");
代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib
public static boolean isMouseCursorWithinElement(Element element, int mousePosX, int mousePosY){
int elementTop = element.getAbsoluteTop();
int elementLeft = element.getAbsoluteLeft();
int elementBottom = element.getAbsoluteBottom();
int elementRight = element.getAbsoluteRight();
if (mousePosX > elementLeft && mousePosX < elementRight && mousePosY > elementTop && mousePosY < elementBottom) {
return true;
}
return false;
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the touch y-position relative to a given element.
*
* @param target the element whose coordinate system is to be used
* @return the relative y-position
*/
public final int getRelativeY(Element target) {
return getClientY() - target.getAbsoluteTop() + target.getScrollTop()
+ target.getOwnerDocument().getScrollTop();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the touch y-position relative to a given element.
*
* @param target the element whose coordinate system is to be used
* @return the relative y-position
*/
public final int getRelativeY(Element target) {
return getClientY() - target.getAbsoluteTop() + target.getScrollTop()
+ target.getOwnerDocument().getScrollTop();
}
代码示例来源:origin: playn/playn
/**
* Gets the event's y-position relative to a given element.
*
* @param e native event
* @param target the element whose coordinate system is to be used
* @return the relative y-position
*/
static float getRelativeY (NativeEvent e, Element target) {
return (e.getClientY() - target.getAbsoluteTop() + target.getScrollTop() +
target.getOwnerDocument().getScrollTop()) / HtmlGraphics.experimentalScale;
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
@Override
public void updateSizes() {
super.updateSizes();
splitHeight = splitter.getOffsetHeight();
if (splitTop == 0) {
splitTop = splitter.getAbsoluteTop();
}
if (isAttached()) {
updateDockButtonPosition();
}
}
代码示例来源:origin: threerings/playn
/**
* Gets the event's y-position relative to a given element.
*
* @param e native event
* @param target the element whose coordinate system is to be used
* @return the relative y-position
*/
static float getRelativeY(NativeEvent e, Element target) {
return (e.getClientY() - target.getAbsoluteTop() + target.getScrollTop()
+ target.getOwnerDocument().getScrollTop()) / HtmlGraphics.experimentalScale;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the mouse y-position relative to a given element.
*
* @param target the element whose coordinate system is to be used
* @return the relative y-position
*/
public int getRelativeY(Element target) {
NativeEvent e = getNativeEvent();
return e.getClientY() - target.getAbsoluteTop() + target.getScrollTop() +
target.getOwnerDocument().getScrollTop();
}
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
private int getRelativeY(final ContextMenuEvent event) {
final NativeEvent e = event.getNativeEvent();
final Element target = event.getRelativeElement();
return e.getClientY() - target.getAbsoluteTop() + target.getScrollTop() + target.getOwnerDocument().getScrollTop();
}
代码示例来源:origin: kiegroup/appformer
public static int getRelativeYOfEvent(final DomEvent event) {
final NativeEvent e = event.getNativeEvent();
final Element target = event.getRelativeElement();
return e.getClientY() - target.getAbsoluteTop() + target.getScrollTop() + target.getOwnerDocument().getScrollTop();
}
}
内容来源于网络,如有侵权,请联系作者删除!