I have the following code:
public void draw(Context2d context) {
context.beginPath();
context.rect(x, y, width, height);
context.fill();
context.closePath();
context.stroke();
}
I would like to add a mouse event for when the mouse moves over the
rectangle. What's the best way to do this?
I don't want to discourage you from trying your own implementation but you
might want to take a look at Lienzo and see if it works for what you need.
It's 100% built on GWT and lighting fast. It should do all the things you
will need and likely more. It's released under Apache.
Explorer:
We are just a couple of weeks from having GA by the way and some of the
things we are adding are just amazing. Take a look for instance at this
transform.
http://www.emitrom-lienzo.appspot.com/#ExplorerPlaceImpl:transform_3_points
For the user of our API ... one line of code for that complicated