/** * Returns the mouse position (x coordinate) when the click took place. * The position is relative to the browser client area. * * @return The mouse cursor x position */ public int getClientX() { return details.getClientX(); }
/** * Returns the mouse position (x coordinate) when the click took place. * The position is relative to the browser client area. * * @return The mouse cursor x position or -1 if unknown */ public int getClientX() { if (null != details) { return details.getClientX(); } else { return -1; } }
public double getClientX() { return mouseEvent.getClientX(); }
@Override public void doubleClicked(MouseEventDetails eventDetails) { double scale = getViewManager().getScale() + 0.25; getViewManager().zoomToPoint(scale, new Point(eventDetails.getClientX(), eventDetails.getClientY())); }
@Override public void doubleClicked(MouseEventDetails eventDetails) { double scale = getViewManager().getScale() + 0.25; getViewManager().zoomToPoint(scale, new Point(eventDetails.getClientX(), eventDetails.getClientY())); }
int left = targetDetails.getMouseEvent().getClientX() - targetDetails.getAbsoluteLeft().intValue(); int column = left / ITEM_WIDTH; int row = top / ITEM_HEIGHT;
MouseEventDetails mouseUp = MouseEventDetails.deSerialize( (String) details.getData(Constants.DROP_DETAIL_MOUSE_EVENT)); int movex = mouseUp.getClientX() - mouseDown.getClientX(); int movey = mouseUp.getClientY() - mouseDown.getClientY(); Component comp = transferable.getComponent();
MouseEventDetails mouseUp = MouseEventDetails.deSerialize( (String) details.getData(Constants.DROP_DETAIL_MOUSE_EVENT)); int movex = mouseUp.getClientX() - mouseDown.getClientX(); int movey = mouseUp.getClientY() - mouseDown.getClientY(); Component comp = transferable.getComponent();
MouseEventDetails mouseDown = transferable.getMouseDownEvent(); MouseEventDetails mouseUp = details.getMouseEvent(); int movex = mouseUp.getClientX() - mouseDown.getClientX(); int movey = mouseUp.getClientY() - mouseDown.getClientY();
MouseEventDetails mouseDown = transferable.getMouseDownEvent(); MouseEventDetails mouseUp = details.getMouseEvent(); int movex = mouseUp.getClientX() - mouseDown.getClientX(); int movey = mouseUp.getClientY() - mouseDown.getClientY();
public static MouseEventDetails toMouseEventDetails(com.vaadin.shared.MouseEventDetails vMouseEventDetails) { checkNotNullArgument(vMouseEventDetails); MouseEventDetails mouseEventDetails = new MouseEventDetails(); mouseEventDetails.setButton(toMouseButton(vMouseEventDetails.getButton())); mouseEventDetails.setClientX(vMouseEventDetails.getClientX()); mouseEventDetails.setClientY(vMouseEventDetails.getClientY()); mouseEventDetails.setAltKey(vMouseEventDetails.isAltKey()); mouseEventDetails.setCtrlKey(vMouseEventDetails.isCtrlKey()); mouseEventDetails.setMetaKey(vMouseEventDetails.isMetaKey()); mouseEventDetails.setShiftKey(vMouseEventDetails.isShiftKey()); mouseEventDetails.setDoubleClick(vMouseEventDetails.isDoubleClick()); mouseEventDetails.setRelativeX(vMouseEventDetails.getRelativeX()); mouseEventDetails.setRelativeY(vMouseEventDetails.getRelativeY()); return mouseEventDetails; }