@Override protected int getTargetPosition() { return target.getAbsoluteTop(); }
@Override public void handleDrag(int absX, int absY) { Widget moveTarget = LoggingPopup.this; RootPanel.get().setWidgetPosition(moveTarget, moveTarget.getAbsoluteLeft() + absX, moveTarget.getAbsoluteTop() + absY); } }
@Override public int getTop() { return source.getAbsoluteTop(); } });
@Override public int getTop() { return source.getAbsoluteTop(); } });
private int getContentAbsoluteTop() { return contentArea.getAbsoluteTop(); } }
@Override public int getAbsoluteTop() { return delegate.getAbsoluteTop(); }
@Override protected int getTargetPosition() { return target.getAbsoluteTop(); }
/*************************************** * Returns the vertical position of the component's top edge. * * @return The y coordinate of the component location */ public int getY() { return getWidget().getAbsoluteTop(); }
protected double getBaseOffset() { return rows.get(0).getAbsoluteTop() - rows.get(0).getParent().getAbsoluteTop() - rows.size() * getRowHeight(); }
private int getY(TouchEvent<?> event) { Touch touch = getRelevantTouch(event); return touch == null ? 0 : (touch.getClientY() - widget.getAbsoluteTop()); }
public static int calculateSpaceToBottom(Widget widget) { return Window.getClientHeight() - widget.getAbsoluteTop() - widget.getOffsetHeight(); }
private int getTopPosition( final Widget widget ) { int top = widget.getAbsoluteTop(); // if top is negative (due to scrolling) we try to align with the parent // to make sure the notifications are always visible if ( top < 0 && widget.getParent() != null ) { top = getTopPosition( widget.getParent() ); } return Math.max(top, 0); }
private int getTopPosition(final Widget widget) { int top = widget.getAbsoluteTop(); // if top is negative (due to scrolling) we try to align with the parent // to make sure the notifications are always visible if (top < 0 && widget.getParent() != null) { top = getTopPosition(widget.getParent()); } return Math.max(top, 0); }
private int getTopPosition(final Widget widget) { int top = widget.getAbsoluteTop(); // if top is negative (due to scrolling) we try to align with the parent // to make sure the notifications are always visible if (top < 0 && widget.getParent() != null) { top = getTopPosition(widget.getParent()); } return Math.max(top, 0); }
@Override public void handleDrag(int absX, int absY) { Widget moveTarget = LoggingPopup.this; RootPanel.get().setWidgetPosition(moveTarget, moveTarget.getAbsoluteLeft() + absX, moveTarget.getAbsoluteTop() + absY); } }
@Override public void handleDrag(int absX, int absY) { Widget moveTarget = LoggingPopup.this; RootPanel.get().setWidgetPosition(moveTarget, moveTarget.getAbsoluteLeft() + absX, moveTarget.getAbsoluteTop() + absY); } }
private void internalSetWidget(Widget widget) { // this.widget = widget; if (widget == null || widget == RootPanel.get()) { widgetLeft = 0; widgetTop = 0; } else { widgetLeft = widget.getAbsoluteLeft() - widget.getElement().getScrollLeft(); widgetTop = widget.getAbsoluteTop() - widget.getElement().getScrollTop(); } }
private void internalSetReference(Widget reference) { // this.reference = reference; if (reference == null || reference == RootPanel.get()) { referenceAdjustLeft = 0; referenceAdjustTop = 0; } else { referenceAdjustLeft = reference.getAbsoluteLeft() + DOMUtil.getBorderLeft(reference.getElement()); referenceAdjustTop = reference.getAbsoluteTop() + DOMUtil.getBorderTop(reference.getElement()); } }
/** * Checks whether the specified item is visible in the scroll area.<p/> * The result is <code>true</code> if whole item is visible. * * @param index is an index of the item. * @return a result of check. */ public boolean isItemVisible(int index) { Widget item = getList().getWidget(index); int itemTop = item.getAbsoluteTop(); int top = getScrollPanel().getAbsoluteTop(); return itemTop >= top && itemTop + item.getOffsetHeight() <= top + getScrollPanel().getOffsetHeight(); }
public OriginalStyleInfo(final Widget w) { absoluteLeft = w.getAbsoluteLeft(); absoluteTop = w.getAbsoluteTop(); clientHeight = w.getElement().getClientHeight(); clientWidth = w.getElement().getClientWidth(); final Style style = w.getElement().getStyle(); position = style.getPosition(); top = style.getTop(); left = style.getLeft(); width = style.getWidth(); height = style.getHeight(); zIndex = style.getZIndex(); }