Package com.google.gwt.event.dom.client

Examples of com.google.gwt.event.dom.client.MouseMoveEvent


    public void forwardMouseMove(final int clientX, final int clientY) {
        if (hiddenAvatar == null) {
            return;
        }

        MouseMoveEvent mouseEvent = new MouseMoveEvent() {
            @Override
            public int getClientX() {
                return clientX;
            }

            @Override
            public int getClientY() {
                return clientY;
            }

            @Override
            public int getRelativeX(com.google.gwt.dom.client.Element target) {
                return getClientX() - target.getAbsoluteLeft()
                        + target.getScrollLeft()
                        + target.getOwnerDocument().getScrollLeft();
            }

            @Override
            public int getRelativeY(com.google.gwt.dom.client.Element target) {
                return getClientY() - target.getAbsoluteTop()
                        + target.getScrollTop()
                        + target.getOwnerDocument().getScrollTop();
            }

            @Override
            public Object getSource() {
                return hiddenAvatar;
            }

        };
        mouseEvent.setRelativeElement(hiddenAvatar.getElement());
        hiddenAvatar.fireEvent(mouseEvent);
    }
View Full Code Here


    public void forwardMouseMove(NativeEvent e) {
        if (hiddenAvatar == null) {
            return;
        }

        MouseMoveEvent mouseEvent = new MouseMoveEvent() {
            @Override
            public Object getSource() {
                return hiddenAvatar;
            }
        };
        mouseEvent.setRelativeElement(hiddenAvatar.getElement());
        mouseEvent.setNativeEvent(e);
        hiddenAvatar.fireEvent(mouseEvent);
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.event.dom.client.MouseMoveEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.