is it possible ?


I want to make an image wich fires mouse clicks events. When image clicked I want to send X and Y mouse coordinates to vaadin component. How to make this ?

Thanks for answers in advance

Like an
? open the tab ‘canvas’ and click on the image.

Discussion about the component can be found on the
and you can download it from the

You could also wrap the image in a layout and add a mouse click listener to the layout.

No need to wrap it in a layout as you can add a ClickListener directly to an Embedded. The problem however is that you only get coordinates relative to the screen and not relative to the component (

is there a way to convert them into local coordinates ?

You would have to do that on client side, in practice by fixing
. Extending com.vaadin.terminal.gwt.client.MouseEventDetails (NativeEvent evt) constructor, figuring out the needed coordinates, adding them to serialize/deserialize and add a getter should be all that is needed. If you want to contribute, please add a patch to the aforementioned ticket.