Java 类com.google.gwt.event.dom.client.MouseEvent 实例源码

项目:platypus-js    文件:DraggablePanel.java   
@Override
protected boolean changeTarget(Widget aMovableTarget, Widget aResizableTarget, int dx, int dy, MouseEvent<?> aEvent) {
    if (isNresizable()) {
        double newTop = targetScrollTop + dy;
        aMovableTarget.getElement().getStyle().setTop(newTop >= 0 ? newTop : 0, Style.Unit.PX);
        if (newTop >= 0) {
            aResizableTarget.getElement().getStyle().setHeight(targetHeight - dy, Style.Unit.PX);
            /*
            if (aResizableTarget instanceof RequiresResize) {
                ((RequiresResize) aResizableTarget).onResize();
            }
            */
        }
        return true;
    } else {
        return false;
    }
}
项目:platypus-js    文件:DraggablePanel.java   
@Override
protected boolean changeTarget(Widget aMovableTarget, Widget aResizableTarget, int dx, int dy, MouseEvent<?> aEvent) {
    if (isWresizable()) {
        double newLeft = targetScrollLeft + dx;
        aMovableTarget.getElement().getStyle().setLeft(newLeft >= 0 ? newLeft : 0, Style.Unit.PX);
        if (newLeft >= 0) {
            aResizableTarget.getElement().getStyle().setWidth(targetWidth - dx, Style.Unit.PX);
            /*
            if (aResizableTarget instanceof RequiresResize) {
                ((RequiresResize) aResizableTarget).onResize();
            }
            */
        }
        return true;
    } else {
        return false;
    }
}
项目:qafe-platform    文件:EventFactory.java   
private static Map<String,String> getMouseInfo(MouseEvent event) {
    Map<String,String> mouseInfo = new HashMap<String,String>();
    int posX = -1;
    int posY = -1;
    try {
        // In QTree class a SelectionEvent is translated to a ClickEvent,
        // so position X and Y are not present (nativeEvent is null, is used to get the clientX and clientY)
        posX = event.getClientX();
        posY = event.getClientY();          
    } catch (Exception e) {
        // Ignore
    }
    mouseInfo.put(EventDataI.MOUSE_X, String.valueOf(posX));
    mouseInfo.put(EventDataI.MOUSE_Y, String.valueOf(posY));
    return mouseInfo;
}
项目:geomajas-project-client-gwt    文件:AbstractGraphicsController.java   
@Override
public Coordinate getLocation(HumanInputEvent<?> event, RenderSpace renderSpace) {
    switch (renderSpace) {
        case WORLD:
            Coordinate screen = getLocation(event, RenderSpace.SCREEN);
            return mapWidget.getMapModel().getMapView().getWorldViewTransformer().viewToWorld(screen);
        case SCREEN:
        default:
            if (event instanceof MouseEvent<?>) {
                Element element = mapWidget.getDOM();
                double offsetX = ((MouseEvent<?>) event).getRelativeX(element);
                double offsetY = ((MouseEvent<?>) event).getRelativeY(element);
                return new Coordinate(offsetX, offsetY);
            } else if (event instanceof TouchEvent<?>) {
                Touch touch = ((TouchEvent<?>) event).getTouches().get(0);
                return new Coordinate(touch.getClientX(), touch.getClientY());
            }
            return new Coordinate(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY());
    }
}
项目:geomajas-project-client-gwt    文件:PolygonEditController.java   
protected void createTempLines(FeatureTransaction featureTransaction, MouseEvent<?> event) {
    if (featureTransaction.getNewFeatures() != null && featureTransaction.getNewFeatures().length > 0
            && tempLine1 == null) {
        Coordinate position = getPanPosition(event);
        Geometry geom = getGeometryIndex().getGeometry(featureTransaction);
        LineString lineString = geom.getGeometryFactory().createLineString(new Coordinate[] { position, position });
        tempLine1 = new GfxGeometry("LineStringEditController.updateLine1");
        tempLine1.setGeometry(lineString);
        tempLine1.setStyle(new ShapeStyle("#FFFFFF", 0, "#FF3322", 1, 1));
        mapWidget.render(tempLine1, RenderGroup.VECTOR, RenderStatus.ALL);
        tempLine2 = new GfxGeometry("LineStringEditController.updateLine2");
        tempLine2.setGeometry(lineString);
        tempLine2.setStyle(new ShapeStyle("#FFFFFF", 0, "#FF3322", 1, 1));
        mapWidget.render(tempLine2, RenderGroup.VECTOR, RenderStatus.ALL);
    }
}
项目:WebConsole    文件:PressCancelEvent.java   
public PressCancelEvent(MouseEvent<MouseOutHandler> sourceEvent) {
    super(sourceEvent);

    clientXPos = sourceEvent.getClientX();
    clientYPos = sourceEvent.getClientY();
    screenXPos = sourceEvent.getScreenX();
    screenYPos = sourceEvent.getScreenY();
}
项目:componentrenderer    文件:ComponentRenderer.java   
private void handleClickEvent(MouseEvent clickEvent) {
    Element clickedTarget = Element.as(clickEvent.getNativeEvent().getEventTarget());

    if (clickedTarget.getClassName().contains("cr-component-cell") ||
        clickedTarget.getClassName().contains("v-layout"))
    {
        NativeEvent event = cloneClickEvent(clickEvent);
        clickedTarget.getParentElement().dispatchEvent(event);
    } else {
        clickEvent.stopPropagation();
    }
}
项目:componentrenderer    文件:ComponentRenderer.java   
private NativeEvent cloneClickEvent(MouseEvent clickEvent) {
    return Document.get().createClickEvent(SINGLE_CLICK,
            clickEvent.getNativeEvent().getScreenX(),
            clickEvent.getNativeEvent().getScreenY(),
            clickEvent.getNativeEvent().getClientX(),
            clickEvent.getNativeEvent().getClientY(),
            clickEvent.getNativeEvent().getCtrlKey(),
            clickEvent.getNativeEvent().getAltKey(),
            clickEvent.getNativeEvent().getShiftKey(),
            clickEvent.getNativeEvent().getMetaKey());
}
项目:firefly    文件:PopupPane.java   
private int getAbsoluteX(HumanInputEvent ev) {
    if (ev instanceof MouseEvent) {
        return  ((MouseEvent)ev).getClientX()+Window.getScrollLeft();
    }
    if (ev instanceof TouchEvent) {
        JsArray<Touch> tAry= ((TouchEvent)ev).getTargetTouches();
        return  tAry.get(0).getClientX()+Window.getScrollLeft();
    }
    return 0;
}
项目:firefly    文件:PopupPane.java   
private int getAbsoluteY(HumanInputEvent ev) {
    if (ev instanceof MouseEvent) {
        return  ((MouseEvent)ev).getClientY()+ Window.getScrollTop();
    }
    if (ev instanceof TouchEvent) {
        JsArray<Touch> tAry= ((TouchEvent)ev).getTargetTouches();
        return tAry.get(0).getClientY() + Window.getScrollTop();
    }
    return 0;
}
项目:umlet    文件:EventHandlingUtils.java   
private static Point getPoint(EventHandlingTarget drawPanelCanvas, HumanInputEvent<?> event) {
    Element e = drawPanelCanvas.getElement();
    if (event instanceof MouseEvent<?>) {
        return new Point(((MouseEvent<?>) event).getRelativeX(e), ((MouseEvent<?>) event).getRelativeY(e));
    }
    else if (event instanceof TouchEndEvent) {
        return new Point(((TouchEvent<?>) event).getChangedTouches().get(0).getRelativeX(e), ((TouchEvent<?>) event).getChangedTouches().get(0).getRelativeY(e));
    }
    else if (event instanceof TouchEvent<?>) {
        return new Point(((TouchEvent<?>) event).getTouches().get(0).getRelativeX(e), ((TouchEvent<?>) event).getTouches().get(0).getRelativeY(e));
    }
    else {
        throw new RuntimeException("Unknown Event Type: " + event);
    }
}
项目:umlet    文件:EventHandlingUtils.java   
private static Point getPointAbsolute(HumanInputEvent<?> event) {
    if (event instanceof MouseEvent<?>) {
        return new Point(((MouseEvent<?>) event).getClientX(), ((MouseEvent<?>) event).getClientY());
    }
    else if (event instanceof TouchEndEvent) {
        return new Point(((TouchEvent<?>) event).getChangedTouches().get(0).getPageX(), ((TouchEvent<?>) event).getChangedTouches().get(0).getPageY());
    }
    else if (event instanceof TouchEvent<?>) {
        return new Point(((TouchEvent<?>) event).getTouches().get(0).getPageX(), ((TouchEvent<?>) event).getTouches().get(0).getPageY());
    }
    else {
        throw new RuntimeException("Unknown Event Type: " + event);
    }
}
项目:daris    文件:GraphWidget.java   
@SuppressWarnings("rawtypes")
private Node findAtomicNodeForMouseEvent(MouseEvent me) {

    double x = (((double) me.getX()) / ((double) _gc.width()));
    double y = (((double) me.getY()) / ((double) _gc.height()));
    return _graph.findAtomicNodeAt(new Point(x, y));
}
项目:platypus-js    文件:DraggablePanel.java   
@Override
protected boolean changeTarget(Widget aMovableTarget, Widget aResizableTarget, int dx, int dy, MouseEvent<?> aEvent) {
    if (isSresizable()) {
        aResizableTarget.getElement().getStyle().setHeight(targetHeight + dy, Style.Unit.PX);
        /*
        if (aResizableTarget instanceof RequiresResize) {
            ((RequiresResize) aResizableTarget).onResize();
        }
        */
        return true;
    } else {
        return false;
    }
}
项目:platypus-js    文件:DraggablePanel.java   
@Override
protected boolean changeTarget(Widget aMovableTarget, Widget aResizableTarget, int dx, int dy, MouseEvent<?> aEvent) {
    if (isEresizable()) {
        aResizableTarget.getElement().getStyle().setWidth(targetWidth + dx, Style.Unit.PX);
        /*
        if (aResizableTarget instanceof RequiresResize) {
            ((RequiresResize) aResizableTarget).onResize();
        }
        */
        return true;
    } else {
        return false;
    }
}
项目:platypus-js    文件:DraggablePanel.java   
@Override
protected boolean changeTarget(Widget aMovableTarget, Widget aResizableTarget, int dx, int dy, MouseEvent<?> aEvent) {
    n.assignMouseState(nw);
    n.changeTarget(aMovableTarget, aResizableTarget, dx, dy, aEvent);
    w.assignMouseState(nw);
    w.changeTarget(aMovableTarget, aResizableTarget, dx, dy, aEvent);
    return true;
}
项目:platypus-js    文件:DraggablePanel.java   
@Override
protected boolean changeTarget(Widget aMovableTarget, Widget aResizableTarget, int dx, int dy, MouseEvent<?> aEvent) {
    n.assignMouseState(ne);
    n.changeTarget(aMovableTarget, aResizableTarget, dx, dy, aEvent);
    e.assignMouseState(ne);
    e.changeTarget(aMovableTarget, aResizableTarget, dx, dy, aEvent);
    return true;
}
项目:platypus-js    文件:DraggablePanel.java   
@Override
protected boolean changeTarget(Widget aMovableTarget, Widget aResizableTarget, int dx, int dy, MouseEvent<?> aEvent) {
    s.assignMouseState(sw);
    s.changeTarget(aMovableTarget, aResizableTarget, dx, dy, aEvent);
    w.assignMouseState(sw);
    w.changeTarget(aMovableTarget, aResizableTarget, dx, dy, aEvent);
    return true;
}
项目:platypus-js    文件:DraggablePanel.java   
@Override
protected boolean changeTarget(Widget aMovableTarget, Widget aResizableTarget, int dx, int dy, MouseEvent<?> aEvent) {
    s.assignMouseState(se);
    s.changeTarget(aMovableTarget, aResizableTarget, dx, dy, aEvent);
    e.assignMouseState(se);
    e.changeTarget(aMovableTarget, aResizableTarget, dx, dy, aEvent);
    return true;
}
项目:gwt-gantt    文件:HTMLTable.java   
/**
 * Given a click event, return the Cell that was clicked, or null if the event
 * did not hit this table.  The cell can also be null if the click event does
 * not occur on a specific cell.
 *
 * @param event A click event of indeterminate origin
 * @return The appropriate cell, or null
 */
public Cell getCellForEvent(MouseEvent<? extends EventHandler> event) {
  Element td = getEventTargetCell(Event.as(event.getNativeEvent()));
  if (td == null) {
    return null;
  }

  int row = TableRowElement.as(td.getParentElement()).getSectionRowIndex();
  int column = TableCellElement.as(td).getCellIndex();
  return new Cell(row, column);
}
项目:geomajas-project-client-gwt    文件:LineStringDrawController.java   
protected void updateTempLineAfterMove(MouseEvent<?> event) {
    if (tempLine == null) {
        updateTempLineAfterClick();
    }

    if (currentLineStringCoordinates != null && currentLineStringCoordinates.length > 0) {
        Coordinate[] newCoords = new Coordinate[currentLineStringCoordinates.length + 1];
        System.arraycopy(currentLineStringCoordinates, 0, newCoords, 0, currentLineStringCoordinates.length);
        newCoords[currentLineStringCoordinates.length] = getPanPosition(event);

        LineString lineString = geometry.getGeometryFactory().createLineString(newCoords);
        tempLine.setGeometry(lineString);
        mapWidget.render(tempLine, RenderGroup.VECTOR, RenderStatus.UPDATE);
    }
}
项目:geomajas-project-client-gwt    文件:PolygonDrawController.java   
@Override
protected void updateTempLineAfterMove(MouseEvent<?> event) {
    if (tempPolygon == null) {
        updateTempLineAfterClick();
    }

    Polygon polygon = (Polygon) geometry;

    if (polygon != null && polygon.getCoordinates() != null && polygon.getCoordinates().length > 0) {

        LinearRing ring = geometry.getGeometryFactory().createLinearRing(polygon.getCoordinates());
        if (ring != null && geometry.getCoordinates().length > 0) {

            Coordinate[] coordinates = ring.getCoordinates();
            Coordinate firstCoordinate = coordinates[0];
            Coordinate lastCoordinate = coordinates[coordinates.length - 2];

            LineString lineStringPan = geometry.getGeometryFactory().createLineString(new Coordinate[] {
                            getTransformer().worldToPan(lastCoordinate),
                            getPanPosition(event),
                            getTransformer().worldToPan(firstCoordinate) });
            tempLine.setGeometry(lineStringPan);

            mapWidget.render(tempLine, RenderGroup.VECTOR, RenderStatus.ALL);
        }
    }
}
项目:geomajas-project-client-gwt    文件:AbstractCircleController.java   
private void updateGraphics(MouseEvent<?> event) {
    Coordinate position = getScreenPosition(event);
    double deltaX = position.getX() - getScreenCenter().getX();
    double deltaY = position.getY() - getScreenCenter().getY();
    radius = Math.sqrt((deltaX * deltaX) + (deltaY * deltaY));

    LineString radiusLine = mapWidget.getMapModel().getGeometryFactory().createLineString(
            new Coordinate[] { center, position });
    mapWidget.getVectorContext().drawCircle(circleGroup, "outer", center, radius, circleStyle);
    mapWidget.getVectorContext().drawLine(circleGroup, "radius", radiusLine, circleStyle);
}
项目:geomajas-project-client-gwt    文件:MeasureDistanceController.java   
protected void updateMeasure(MouseEvent event, boolean complete) {
    Geometry lastClickedLineGeometry = (Geometry) distanceLine.getOriginalLocation();
    Coordinate lastClickedCoordinate = lastClickedLineGeometry.getCoordinates()[distanceLine.getGeometry()
            .getNumPoints() - 1];
    Coordinate mouseCoordinate = getWorldPosition(event);
    lineSegment.setGeometry(getFactory().createLineString(
            new Coordinate[] { lastClickedCoordinate, mouseCoordinate }));
    mapWidget.render(mapWidget.getMapModel(), RenderGroup.VECTOR, RenderStatus.UPDATE);
}
项目:geomajas-project-client-gwt    文件:AbstractSnappingController.java   
/**
 * Return the screen position of the mouse event, unless snapping is activated. If that is the case, a snapped
 * point will be returned (still in screen space).
 */
protected Coordinate getScreenPosition(MouseEvent<?> event) {
    if (snappingActive) {
        return getTransformer().worldToView(getWorldPosition(event));
    }
    return super.getScreenPosition(event);
}
项目:geomajas-project-client-gwt    文件:AbstractSnappingController.java   
/**
 * Return the screen position of the mouse event, unless snapping is activated. If that is the case, a snapped
 * point will be returned (still in pan space).
 */
protected Coordinate getPanPosition(MouseEvent<?> event) {
    if (snappingActive) {
        return getTransformer().worldToPan(getWorldPosition(event));
    }
    return super.getPanPosition(event);
}
项目:geomajas-project-client-gwt    文件:AbstractSnappingController.java   
/**
 * Return the world position of the mouse event, unless snapping is activated. If that is the case, a snapped point
 * will be returned (still in world space).
 */
protected Coordinate getWorldPosition(MouseEvent<?> event) {
    Coordinate world = super.getWorldPosition(event);
    if (snappingActive) {
        return snapper.snap(world);
    }
    return world;
}
项目:geomajas-project-client-gwt    文件:LineStringEditController.java   
private void createTempLine(FeatureTransaction featureTransaction, MouseEvent<?> event) {
    if (featureTransaction.getNewFeatures() != null && featureTransaction.getNewFeatures().length > 0
            && tempLine == null) {
        Coordinate position = getPanPosition(event);
        LineString lineString = getGeometryIndex().getGeometry(featureTransaction).getGeometryFactory()
                .createLineString(new Coordinate[] { position, position });
        tempLine = new GfxGeometry("LineStringEditController.updateLine");
        tempLine.setGeometry(lineString);
        tempLine.setStyle(new ShapeStyle("#FFFFFF", 0, "#FF3322", 1, 1));
        mapWidget.render(tempLine, RenderGroup.VECTOR, RenderStatus.ALL);
    }
}
项目:geomajas-project-client-gwt    文件:LineStringEditController.java   
private void updateTempLine(FeatureTransaction featureTransaction, MouseEvent<?> event) {
    if (featureTransaction.getNewFeatures() != null && featureTransaction.getNewFeatures().length > 0) {
        if (tempLine == null) {
            createTempLine(featureTransaction, event);
        }
        Coordinate[] coordinates = getGeometryIndex().getGeometry(featureTransaction).getCoordinates();
        if (coordinates != null && coordinates.length > 0) {
            Coordinate lastCoordinate = getTransformer().worldToPan(coordinates[coordinates.length - 1]);
            LineString lineString = featureTransaction.getNewFeatures()[0].getGeometry().getGeometryFactory()
                    .createLineString(new Coordinate[] { lastCoordinate, getPanPosition(event) });
            tempLine.setGeometry(lineString);
            mapWidget.render(tempLine, RenderGroup.VECTOR, RenderStatus.ALL);
        }
    }
}
项目:geomajas-project-client-gwt    文件:PolygonEditController.java   
protected void updateTempLines(FeatureTransaction featureTransaction, MouseEvent<?> event) {
    if (featureTransaction.getNewFeatures() != null && featureTransaction.getNewFeatures().length > 0) {
        if (tempLine1 == null) {
            createTempLines(featureTransaction, event);
        }
        Polygon polygon = (Polygon) getGeometryIndex().getGeometry(featureTransaction);
        LinearRing ring = getGeometryIndex().getLinearRing(polygon);
        if (ring != null) {
            Coordinate[] coordinates = ring.getCoordinates();
            if (coordinates != null && coordinates.length > 0) {
                Coordinate lastCoordinate = coordinates[coordinates.length - 2];
                LineString lineString1 = featureTransaction.getNewFeatures()[index.getFeatureIndex()].getGeometry()
                        .getGeometryFactory().createLineString(
                                new Coordinate[] {getTransformer().worldToPan(lastCoordinate),
                                        getPanPosition(event)});
                tempLine1.setGeometry(lineString1);
                mapWidget.render(tempLine1, RenderGroup.VECTOR, RenderStatus.ALL);

                LineString lineString2 = featureTransaction.getNewFeatures()[index.getFeatureIndex()].getGeometry()
                        .getGeometryFactory().createLineString(
                                new Coordinate[] {getTransformer().worldToPan(coordinates[0]),
                                        getPanPosition(event)});
                tempLine2.setGeometry(lineString2);
                mapWidget.render(tempLine2, RenderGroup.VECTOR, RenderStatus.ALL);
            }
        }
    }
}
项目:geomajas-project-client-gwt    文件:MultiPolygonEditController.java   
protected void updateTempLines(FeatureTransaction featureTransaction, MouseEvent<?> event) {
    if (featureTransaction.getNewFeatures() != null && featureTransaction.getNewFeatures().length > 0) {
        if (tempLine1 == null) {
            createTempLines(featureTransaction, event);
        }
        MultiPolygon multiPolygon = (MultiPolygon) getGeometryIndex().getGeometry(featureTransaction);
        LinearRing ring = getGeometryIndex().getLinearRing(multiPolygon.getGeometryN(0));
        if (ring != null) {
            Coordinate[] coordinates = ring.getCoordinates();
            if (coordinates != null && coordinates.length > 0) {
                Coordinate lastCoordinate = coordinates[coordinates.length - 2];
                LineString lineString1 = featureTransaction.getNewFeatures()[index.getFeatureIndex()].getGeometry()
                        .getGeometryFactory().createLineString(
                                new Coordinate[] {getTransformer().worldToPan(lastCoordinate),
                                        getPanPosition(event)});
                tempLine1.setGeometry(lineString1);
                mapWidget.render(tempLine1, RenderGroup.VECTOR, RenderStatus.ALL);

                LineString lineString2 = featureTransaction.getNewFeatures()[index.getFeatureIndex()].getGeometry()
                        .getGeometryFactory().createLineString(
                                new Coordinate[] {getTransformer().worldToPan(coordinates[0]),
                                        getPanPosition(event)});
                tempLine2.setGeometry(lineString2);
                mapWidget.render(tempLine2, RenderGroup.VECTOR, RenderStatus.ALL);
            }
        }
    }
}
项目:geomajas-project-client-gwt2    文件:AbstractController.java   
@Override
public boolean isRightMouseButton(HumanInputEvent<?> event) {
    if (event instanceof MouseEvent<?>) {
        return ((MouseEvent<?>) event).getNativeButton() == NativeEvent.BUTTON_RIGHT;
    }
    return false;
}
项目:kie-wb-common    文件:AbstractActionsToolboxViewTest.java   
@SuppressWarnings("unchecked")
protected void testAddButton(final Consumer<MouseClickEvent> clickEventConsumer) {
    // Verify tootlip.
    verify(toolboxTooltip,
           times(1)).createItem(eq("title1"));
    verify(buttonItem,
           times(1)).tooltip(any(TooltipItem.class));
    // Verify mouse enter.
    final ArgumentCaptor<NodeMouseEnterHandler> enterHandlerArgumentCaptor =
            ArgumentCaptor.forClass(NodeMouseEnterHandler.class);
    verify(buttonItem,
           times(1)).onMouseEnter(enterHandlerArgumentCaptor.capture());
    final NodeMouseEnterHandler enterHandler = enterHandlerArgumentCaptor.getValue();
    final NodeMouseEnterEvent mouseEnterEvent = mock(NodeMouseEnterEvent.class);
    enterHandler.onNodeMouseEnter(mouseEnterEvent);
    verify(canvasView,
           times(1)).setCursor(eq(AbstractCanvas.Cursors.POINTER));
    // Verify mouse exit.
    final ArgumentCaptor<NodeMouseExitHandler> exitHandlerArgumentCaptor =
            ArgumentCaptor.forClass(NodeMouseExitHandler.class);
    verify(buttonItem,
           times(1)).onMouseExit(exitHandlerArgumentCaptor.capture());
    final NodeMouseExitHandler exitHandler = exitHandlerArgumentCaptor.getValue();
    final NodeMouseExitEvent mouseExitEvent = mock(NodeMouseExitEvent.class);
    exitHandler.onNodeMouseExit(mouseExitEvent);
    verify(canvasView,
           times(1)).setCursor(eq(AbstractCanvas.Cursors.AUTO));
    // Verify mouse click.
    final ArgumentCaptor<NodeMouseClickHandler> clickHandlerArgumentCaptor =
            ArgumentCaptor.forClass(NodeMouseClickHandler.class);
    verify(buttonItem,
           times(1)).onClick(clickHandlerArgumentCaptor.capture());
    final NodeMouseClickHandler clickHandler = clickHandlerArgumentCaptor.getValue();
    final NodeMouseClickEvent mouseClickEvent = mock(NodeMouseClickEvent.class);
    when(mouseClickEvent.getMouseEvent()).thenReturn(mock(MouseEvent.class));
    clickHandler.onNodeMouseClick(mouseClickEvent);
    verify(clickEventConsumer,
           times(1)).accept(any(MouseClickEvent.class));
}
项目:obsolete-web-boards-gwt    文件:SVGZoomAndPanHandler.java   
private void updateMousePosition(MouseEvent<?> e) {
    mouse.x = e.getClientX();
    mouse.y = e.getClientY();
    OMSVGRect viewbox = svg.getViewBox().getBaseVal();
    offset.x = (int) viewbox.getX();
    offset.y = (int) viewbox.getY();
}
项目:cuba    文件:CubaSourceCodeEditorConnector.java   
@Override
public void contextHelpIconClick(MouseEvent event) {
    contextHelpIconClick(event.getNativeEvent());
}
项目:rxcanvas-gwt    文件:RxCanvas.java   
private double[] canvasPosition(Canvas canvas, MouseEvent<?> e) {
    return new double[] { e.getRelativeX(canvas.getElement()), e.getRelativeY(canvas.getElement()) };
}
项目:GraphemeColourSynaesthesiaApp    文件:ColourPickerCanvasView.java   
private void setColour(MouseEvent event, Canvas targetCanvas, VerticalPanel targetPanel) {
    setColour(event.getRelativeX(targetCanvas.getElement()), event.getRelativeY(targetCanvas.getElement()), targetCanvas, targetPanel);
}
项目:GraphemeColourSynaesthesiaApp    文件:ColourPickerCanvasView.java   
private void setHue(MouseEvent event, Canvas targetCanvas) {
    setHue(event.getRelativeX(targetCanvas.getElement()), event.getRelativeY(targetCanvas.getElement()), targetCanvas);
}
项目:preferanser    文件:Point.java   
public static Point FromMouseEvent(MouseEvent event) {
    return new Point(event.getClientX(), event.getClientY());
}
项目:preferanser    文件:Point.java   
public static Point FromMouseEvent(MouseEvent event, Document doc) {
    return FromMouseEvent(event).plus(new Point(doc.getScrollLeft(), doc.getScrollTop()));
}