google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

cannot fire an event with mouse position #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In my widget, I execute some specific logic check the mouse click
position like below.

       @UiHandler("arrows")
       void onArrowsClick(final ClickEvent e) {
               final int pos = e.getY();
               ....
       }

MouseEvent positions methods are not nicely handled.

It would be nice to add some methods in EventBuidler to enable developper to 
add event position information.

Original issue reported on code.google.com by gael.laz...@gmail.com on 28 Jul 2011 at 1:42

GoogleCodeExporter commented 9 years ago
You can now set MouseEvent position with those EventBuilder methods :

EventBuilder.setMouseX(int x)
EventBuilder.setMouseY(int y)
EventBuilder.setMouseScreenX(int x)
EventBuilder.setMouseScreenY(int y)

Also note that in gwt-test-utils, MouseEvent.getClientX() will always return 
the same value as MouseEvent.getX(). This is also true with Y position.

I just deploy a new 0.32-SNAPSHOT with those features.

Original comment by gael.laz...@gmail.com on 29 Jul 2011 at 6:22

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 29 Aug 2011 at 6:33