How do I detect which zoom level clicked by user in vaadin timeline by a click listener?
zoom levels are added in following manner.
timeline.addZoomLevel("Day", 86400000L);
timeline.addZoomLevel("Week", 7 * 86400000L);
timeline.addZoomLevel("Month", 2629743830L);
timeline.addZoomLevel("3 Months", 3 * 2629743830L);
timeline.addZoomLevel("1 Year", 31556926000L);
timeline.addZoomLevel("5 Year", 5 * 31556926000L);
The following date range listner fires when a user clicks on a zoom level and also when date range changed, but i cannot find which zoom level clicked by the user.(eg:- Day, Week, Month, etc.)
timeline.addListener(new Timeline.DateRangeListener()
{
@Override
public void dateRangeChanged(DateRangeChangedEvent event)
{
System.out.println("DateRangeChangedEvent Fired!");
}
});