Does vaadin support mouse move listener?

Specifically I want to use it over the Canvas component. Trying to implement a paint type application.

Not by default. Vaadin apps would slow down to an unusable state if everything would implement mouse move listeners, as every event would be sent back to the server and you would have hundreds of roundtrips every second.

This can, however, be added by extending a specific component. “Dropping down” to GWT will give you control to add what ever handler you want to the component’s client side. So you’d need to extend Canvas and (the probably named) VCanvas.

As a side note: AbstractComponent supports registering listeners so, that the client side is informed of the types of events being listened to. Using this mechanism, the client can skip sending the server updates about events the server is not interested in at that moment. Alternatively, if the events are not too frequent, they can be filtered out on the server side.

For focus and blur events, most/all client side widgets only send these when there is a listener for them on the server side. Most other events, as far as I can recall, are currently filtered on the server side.

I’m afraid there is not much of an “overview” documentation about this mechanism.

See AbstractComponent.addListener(String eventIdentifier, Class<?> eventType, Object target, Method method), ApplicationConnection.hasEventListeners(Paintable paintable, String eventIdentifier) and their callers.

Hi,

I am building a sql editor. i would like to give the feature of commenting and uncommenting a line. is there anyway i can attach a mouse listener event to a text area to identify the selected content on the text area? If not what are my options to achieve this idea?