/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
public float getAbsoluteY() { return this.getElement().getAbsoluteTop(); }
/** * 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(); }
/** * 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(); }
/*************************************** * Get the offset for the vertical scroll * * @return The offset */ private int getPageScrollTop() { Element rBodyElement = RootPanel.getBodyElement(); return DOM.getParent(rBodyElement).getAbsoluteTop(); }
public int getTableAbsoluteTop() { return this.table.getElement().getAbsoluteTop() + this.table.getGridHeaderHeight(); }
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; }
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; }
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; }
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); }
/** * 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(); }
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; } }
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(); } }