Catching mouse events in a Timeline graph

My limited knowledge of Java Listeners is on display here… I have built a number of Timeline graphs and displayed them in a GridLayout on a page. I would like to be able to detect when the user clicks inside any of the graphs and determine which graph has been selected. I’m not trying to figure out what value in the graph they are looking at, just in which graph the mouse up/down event occurred. Can someone give me a starting point? I was trying to add a listener to the Timeline object, but I’m not sure what type of listener to add, or what the routine would actually look like. A pointer to the appropriate documentation, or a small sample routine would be great.

Thanks in advance,

nbc

The Vaadin Timeline does not provide any server side listeners for mouse events but you can accomplish what you want by instead attaching a LayoutClickListeners to the GridLayout where the Timeline components are. The listener should get a reference on which component was clicked in the layout.