@Override protected int getTargetPosition() { return target.getAbsoluteLeft(); }
@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 getLeft() { return source.getAbsoluteLeft(); }
@Override protected int getTargetPosition() { return target.getAbsoluteLeft(); }
private int getContentAbsoluteLeft() { return contentArea.getAbsoluteLeft(); } }
@Override protected int getTargetPosition() { return target.getAbsoluteLeft(); }
@Override protected int getTargetPosition() { return target.getAbsoluteLeft(); }
/*************************************** * Returns the horizontal position of the component's left edge. * * @return The x coordinate of the component location */ public int getX() { return getWidget().getAbsoluteLeft(); }
private int getX(TouchEvent<?> event) { Touch touch = getRelevantTouch(event); return touch == null ? 0 : (touch.getClientX() - widget.getAbsoluteLeft()); }
private boolean canFitOnLeftEdge(int popupWidth) { int windowRight = Window.getClientWidth() + Window.getScrollLeft(); return windowRight - popupWidth > widget.getAbsoluteLeft(); }
protected int getLtrLeft(int popupWidth) { if (!canFitOnLeftEdge(popupWidth) && (canFitOnRightEdge(popupWidth) || clipToWindow)) { return Math.max(0, getRightEdge(popupWidth)); } else { return widget.getAbsoluteLeft(); } }
protected int getRtlLeft(int popupWidth) { if (!canFitOnRightEdge(popupWidth) && (canFitOnLeftEdge(popupWidth) || !clipToWindow)) { return widget.getAbsoluteLeft(); } else { return Math.max(0, getRightEdge(popupWidth)); } }
private int getLeftPosition(final Widget widget) { int left = widget.getAbsoluteLeft(); // if left is negative (due to scrolling) we try to align with the parent // to make sure the notifications are always visible if (left < 0 && widget.getParent() != null) { left = getLeftPosition(widget.getParent()); } return Math.max(left, 0); }
private int getLeftPosition( final Widget widget ) { int left = widget.getAbsoluteLeft(); // if left is negative (due to scrolling) we try to align with the parent // to make sure the notifications are always visible if ( left < 0 && widget.getParent() != null ) { left = getLeftPosition( widget.getParent() ); } return Math.max(left, 0); }
private int getLeftPosition(final Widget widget) { int left = widget.getAbsoluteLeft(); // if left is negative (due to scrolling) we try to align with the parent // to make sure the notifications are always visible if (left < 0 && widget.getParent() != null) { left = getLeftPosition(widget.getParent()); } return Math.max(left, 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 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()); } }
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 showToolTip(final String toolTipText, final DecoratedPopupPanel simplePopup, final MouseOverEvent event) { simplePopup.setStyleName( "fakeTooltip" ); simplePopup.setWidget( new HTML( toolTipText ) ); final Widget source = (Widget)event.getSource(); final int left = source.getAbsoluteLeft() + 10; final int top = source.getAbsoluteTop() + 10; simplePopup.setPopupPosition( left, top ); // Show the popup if ( !simplePopup.isShowing() ) { simplePopup.show(); } }