com.google.gwt.event.dom.client.MouseEvent Java Examples
The following examples show how to use
com.google.gwt.event.dom.client.MouseEvent.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FakeMouseEvent.java From openchemlib-js with BSD 3-Clause "New" or "Revised" License | 5 votes |
public FakeMouseEvent(MouseEvent evt) { x = evt.getX(); y = evt.getY(); shift = evt.isShiftKeyDown(); ctrl = evt.isControlKeyDown(); alt = evt.isAltKeyDown(); }
Example #2
Source File: DateCell.java From calendar-component with Apache License 2.0 | 4 votes |
private void handleEventRange(final MouseEvent event) { if (event.getNativeButton() != NativeEvent.BUTTON_LEFT) { return; } if (eventRangeStart >= 0) { int newY = event.getY(); int fromY, toY; if (newY < eventRangeStart) { fromY = newY; toY = eventRangeStart; } else { fromY = eventRangeStart; toY = newY; } eventRangeStop = newY; Element main = getElement(); NodeList<Node> nodes = main.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { Element c = (Element) nodes.getItem(i); if (Arrays.stream(slotElements).anyMatch(e -> e == c)) { int elemStart = c.getOffsetTop(); int elemStop = elemStart + getSlotHeight(); if (elemStart >= fromY && elemStart <= toY) { c.addClassName("v-daterange"); } else if (elemStop >= fromY && elemStop <= toY) { c.addClassName("v-daterange"); } else if (elemStop >= fromY && elemStart <= toY) { c.addClassName("v-daterange"); } else { c.removeClassName("v-daterange"); } } } } event.preventDefault(); }
Example #3
Source File: CubaSourceCodeEditorConnector.java From cuba with Apache License 2.0 | 4 votes |
@Override public void contextHelpIconClick(MouseEvent event) { contextHelpIconClick(event.getNativeEvent()); }