@Override protected int getEventPosition(Event event) { return event.getClientX(); }
/** * Gets the mouse x-position within the browser window's client area. * * @param evt the event to be tested * @return the mouse x-position * @deprecated Use {@link Event#getClientX()} instead. */ @Deprecated public static int eventGetClientX(Event evt) { return evt.getClientX(); }
/** * Returns the event's x coordinate. * * @return the x coordinate or -1 if no dom event. */ public int getX() { return _event.getClientX(); }
/** * Returns the event's x coordinate. * * @return the x coordinate or -1 if no dom event. */ public int getX() { return _event.getClientX(); }
@Override protected int getEventPosition(Event event) { return event.getClientX(); }
@Override public final int getClientX() { return event.getClientX(); }
@Override protected int getEventPosition(Event event) { return event.getClientX(); }
@Override protected int getEventPosition(Event event) { return event.getClientX(); }
/** * Gets the mouse x-position within the browser window's client area. * * @param evt the event to be tested * @return the mouse x-position * @deprecated Use {@link Event#getClientX()} instead. */ @Deprecated public static int eventGetClientX(Event evt) { return evt.getClientX(); }
/** * Gets the mouse x-position within the browser window's client area. * * @param evt the event to be tested * @return the mouse x-position * @deprecated Use {@link Event#getClientX()} instead. */ @Deprecated public static int eventGetClientX(Event evt) { return evt.getClientX(); }
Element target = DOM.eventGetTarget(event); if (splitElem.isOrHasChild(target)) { startResizingFrom(event.getClientX() - getAbsoluteLeft(), event.getClientY() - getAbsoluteTop()); DOM.setCapture(getElement()); if (isResizing()) { assert DOM.getCaptureElement() != null; onSplitterResize(event.getClientX() - getAbsoluteLeft(), event.getClientY() - getAbsoluteTop()); event.preventDefault();
int x = event.getClientX() - senderElem.getAbsoluteLeft() + senderElem.getPropertyInt("scrollLeft") + Window.getScrollLeft();
private boolean cursorInsideBrowserContentArea(Event event) { if (event.getClientX() < 0 || event.getClientY() < 0) { // Outside to the left or above return false; } if (event.getClientX() > Window.getClientWidth() || event.getClientY() > Window.getClientHeight()) { // Outside to the right or below return false; } return true; }
int clientX = event.getClientX() + Window.getScrollLeft(); int clientY = event.getClientY() + Window.getScrollTop(); int rowLeft = hoveringRow.getAbsoluteLeft();
protected int getClientX(Event e) { if (touchSupported) { return e.getTouches().get(0).getClientX(); } else { return e.getClientX(); } }
@Override public void choose(Event event) { if (menu == null) { menu = new DateFilterMenu(); } menu.showAt(event.getClientX(), event.getClientY(), new SelectionCallback<DateRange>() { @Override public void onSelected(DateRange selection) { Filter filter = new Filter(getValue()); filter.setEndDateRange(selection); setValue(filter); } }); }
public void onMouseUp(Event e) { e.preventDefault(); e.stopPropagation(); onEnd(e, new Point(e.getClientX(), e.getClientY())); }
public void onMouseMove(Event e) { e.preventDefault(); e.stopPropagation(); onMove(e, new Point(e.getClientX(), e.getClientY())); }
/** * Returns the point of the event adjusted for the position of the chart. * * @param event the event * @return the adjusted point */ protected PrecisePoint getEventXY(Event event) { return new PrecisePoint(event.getClientX() - this.getAbsoluteLeft() + XDOM.getBodyScrollLeft(), event.getClientY() - this.getAbsoluteTop() + XDOM.getBodyScrollTop()); }
@Override protected void onBrowserEvent2(Event event) { // Enable multiple selection only when Control/Shift key is pressed mousePosition[0] = event.getClientX(); mousePosition[1] = event.getClientY(); if (BrowserEvents.CLICK.equals(event.getType())) { selectionModel.asMultiSelectionModel().setMultiSelectEnabled(event.getCtrlKey()); selectionModel.asMultiSelectionModel().setMultiRangeSelectEnabled(event.getShiftKey()); } // Remove focus from the table so refreshes won't try to focus on the // selected row. This is important when the user has scrolled the selected // row off the screen, we don't want the browser to scroll back. table.setFocus(false); super.onBrowserEvent2(event); }