本文整理了Java中com.google.gwt.dom.client.Element.getOwnerDocument()
方法的一些代码示例,展示了Element.getOwnerDocument()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getOwnerDocument()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getOwnerDocument
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public int getAbsoluteLeft(Element elem) {
Document doc = elem.getOwnerDocument();
return getBoundingClientRectLeft(elem) + doc.getScrollLeft();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public int getAbsoluteTop(Element elem) {
return getAbsoluteTopImpl(elem.getOwnerDocument().getViewportElement(),
elem);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public int getAbsoluteTop(Element elem) {
Document doc = elem.getOwnerDocument();
return getBoundingClientRectTop(elem) + doc.getScrollTop();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public int getAbsoluteLeft(Element elem) {
return getAbsoluteLeftImpl(elem.getOwnerDocument().getViewportElement(),
elem);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the touch x-position relative to a given element.
*
* @param target the element whose coordinate system is to be used
* @return the relative x-position
*/
public final int getRelativeX(Element target) {
return getClientX() - target.getAbsoluteLeft() + target.getScrollLeft()
+ target.getOwnerDocument().getScrollLeft();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public int getAbsoluteLeft(Element elem) {
ClientRect rect = getBoundingClientRect(elem);
double left = rect != null ? rect.getSubPixelLeft()
+ getScrollLeft(elem.getOwnerDocument())
: getAbsoluteLeftUsingOffsets(elem);
return toInt32(left);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public int getAbsoluteTop(Element elem) {
ClientRect rect = getBoundingClientRect(elem);
double top = rect != null ? rect.getSubPixelTop()
+ getScrollTop(elem.getOwnerDocument())
: getAbsoluteTopUsingOffsets(elem);
return toInt32(top);
}
代码示例来源: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 x-position relative to a given element.
*
* @param target the element whose coordinate system is to be used
* @return the relative x-position
*/
public int getRelativeX(Element target) {
NativeEvent e = getNativeEvent();
return e.getClientX() - target.getAbsoluteLeft() + target.getScrollLeft() +
target.getOwnerDocument().getScrollLeft();
}
代码示例来源: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: net.wetheinter/gwt-user
@Override
public int getAbsoluteTop(Element elem) {
return getAbsoluteTopImpl(elem.getOwnerDocument().getViewportElement(),
elem);
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public int getAbsoluteLeft(Element elem) {
Document doc = elem.getOwnerDocument();
return getBoundingClientRectLeft(elem) + doc.getScrollLeft();
}
代码示例来源: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.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.uberfire/uberfire-wires-core-grids
public static int getRelativeXOfEvent(final DomEvent event) {
final NativeEvent e = event.getNativeEvent();
final Element target = event.getRelativeElement();
return e.getClientX() - target.getAbsoluteLeft() + target.getScrollLeft() + target.getOwnerDocument().getScrollLeft();
}
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
private int getRelativeX(final ContextMenuEvent event) {
final NativeEvent e = event.getNativeEvent();
final Element target = event.getRelativeElement();
return e.getClientX() - target.getAbsoluteLeft() + target.getScrollLeft() + target.getOwnerDocument().getScrollLeft();
}
代码示例来源: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();
}
}
内容来源于网络,如有侵权,请联系作者删除!