本文整理了Java中com.google.gwt.user.client.Element.getAbsoluteTop()
方法的一些代码示例,展示了Element.getAbsoluteTop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getAbsoluteTop()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:getAbsoluteTop
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the popup's top position relative to the browser's client area.
*
* @return the popup's top position
*/
public int getPopupTop() {
return getElement().getAbsoluteTop();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the object's absolute top position in pixels, as measured from the
* browser window's client area.
*
* @return the object's absolute top position
*/
public int getAbsoluteTop() {
return getElement().getAbsoluteTop();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the position of the top outer border edge of the widget relative to
* the top outer border edge of the panel.
*
* @param w the widget whose position is to be retrieved
* @return the widget's top position
*/
public int getWidgetTop(Widget w) {
checkWidgetParent(w);
return w.getElement().getAbsoluteTop()
- getElement().getAbsoluteTop();
}
代码示例来源:origin: com.extjs/gxt
/**
* Gets the current Y position of the element based on page coordinates.
*
* @return the y position of the element
*/
public int getY() {
return dom.getAbsoluteTop();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the popup's top position relative to the browser's client area.
*
* @return the popup's top position
*/
public int getPopupTop() {
return getElement().getAbsoluteTop();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the object's absolute top position in pixels, as measured from the
* browser window's client area.
*
* @return the object's absolute top position
*/
public int getAbsoluteTop() {
return getElement().getAbsoluteTop();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the popup's top position relative to the browser's client area.
*
* @return the popup's top position
*/
public int getPopupTop() {
return getElement().getAbsoluteTop();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the object's absolute top position in pixels, as measured from the
* browser window's client area.
*
* @return the object's absolute top position
*/
public int getAbsoluteTop() {
return getElement().getAbsoluteTop();
}
代码示例来源:origin: com.ebmwebsourcing.geasytools/geasy-ui
public float getAbsoluteY() {
return this.getElement().getAbsoluteTop();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the position of the top outer border edge of the widget relative to
* the top outer border edge of the panel.
*
* @param w the widget whose position is to be retrieved
* @return the widget's top position
*/
public int getWidgetTop(Widget w) {
checkWidgetParent(w);
return w.getElement().getAbsoluteTop()
- getElement().getAbsoluteTop();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the position of the top outer border edge of the widget relative to
* the top outer border edge of the panel.
*
* @param w the widget whose position is to be retrieved
* @return the widget's top position
*/
public int getWidgetTop(Widget w) {
checkWidgetParent(w);
return w.getElement().getAbsoluteTop()
- getElement().getAbsoluteTop();
}
代码示例来源:origin: de.esoco/gewt
/***************************************
* Get the offset for the vertical scroll
*
* @return The offset
*/
private int getPageScrollTop()
{
Element rBodyElement = RootPanel.getBodyElement();
return DOM.getParent(rBodyElement).getAbsoluteTop();
}
代码示例来源:origin: oVirt/ovirt-engine
public int getTableAbsoluteTop() {
return this.table.getElement().getAbsoluteTop() + this.table.getGridHeaderHeight();
}
代码示例来源:origin: com.googlecode.mgwt/mgwt
protected void calculateSelection(int y) {
int absoluteTop = getElement().getAbsoluteTop();
int absoluteBottom = getElement().getAbsoluteBottom();
int normalized_y = y - absoluteTop;
int height = absoluteBottom - absoluteTop;
int index = (normalized_y * renderedEntries) / height;
if (index != selectedIndex) {
SelectionEvent.fire(this, mapping.get(index));
}
selectedIndex = index;
}
代码示例来源:origin: dankurka/mgwt
protected void calculateSelection(int y) {
int absoluteTop = getElement().getAbsoluteTop();
int absoluteBottom = getElement().getAbsoluteBottom();
int normalized_y = y - absoluteTop;
int height = absoluteBottom - absoluteTop;
int index = (normalized_y * renderedEntries) / height;
if (index != selectedIndex) {
SelectionEvent.fire(this, mapping.get(index));
}
selectedIndex = index;
}
代码示例来源:origin: stackoverflow.com
public static boolean isVisible(Element e)
{
//vp = viewPort, b = bottom, l = left, t = top, r = right
int vpWidth = Window.getClientWidth();
int vpHeight = Window.getClientHeight();
boolean tViz = ( e.getAbsoluteTop() >= 0 && e.getAbsoluteTop()< vpHeight);
boolean bViz = (e.getAbsoluteBottom() > 0 && e.getAbsoluteBottom() <= vpHeight);
boolean lViz = (e.getAbsoluteLeft() >= 0 && e.getAbsoluteLeft() < vpWidth);
boolean rViz = (e.getAbsoluteRight() > 0 && e.getAbsoluteRight() <= vpWidth);
boolean vVisible = tViz && bViz;
boolean hVisible = lViz && rViz;
return hVisible && vVisible;
}
代码示例来源:origin: bedatadriven/activityinfo
private void showOptionsMenu(MapLayer mapLayer, int index) {
if (layerMenu == null) {
createLayerMenu();
}
int x = this.getAbsoluteLeft() - CONTEXT_MENU_WIDTH;
int y = view.getElement(index).getAbsoluteTop();
clusterMenuItem.setVisible(mapLayer instanceof PointMapLayer);
layerMenu.showAt(x, y);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-client-common
/**
* Gets the mouse y-position relative to the canvas element.
* @param clientY The event's clienty value.
* @return the relative y-position
*/
private double getRelativeY(final double clientY) {
return clientY - getCanvasElement().getAbsoluteTop() + getCanvasElement().getScrollTop() +
getCanvasElement().getOwnerDocument().getScrollTop();
}
代码示例来源:origin: ManfredTremmel/gwt-bean-validators
private boolean isInViewPort() {
final int pageTop = Window.getScrollTop();
final int pageBottom = pageTop + Window.getClientHeight();
final int elementTop = asWidget().getElement().getAbsoluteTop();
final int elementBottom = elementTop + asWidget().getElement().getClientHeight();
return elementTop <= pageBottom && elementBottom >= pageTop;
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
private void beginMovingWindow(Event event) {
if (draggable) {
showDraggingCurtain();
dragging = true;
startX = WidgetUtil.getTouchOrMouseClientX(event);
startY = WidgetUtil.getTouchOrMouseClientY(event);
origX = getElement().getAbsoluteLeft();
origY = getElement().getAbsoluteTop();
DOM.setCapture(getElement());
event.preventDefault();
}
}
内容来源于网络,如有侵权,请联系作者删除!