Class DatasetSelectionEvent


  • public final class DatasetSelectionEvent
    extends AbstractEvent
    Event which is fired when the user clicks on the chart and selects a dataset.
    This event doesn't suppress the click event on the chart.
    Author:
    Andrea "Stock" Stocchero
    • Field Detail

      • TYPE

        public static final EventType TYPE
        Event type
    • Constructor Detail

      • DatasetSelectionEvent

        public DatasetSelectionEvent​(BaseNativeEvent nativeEvent,
                                     DatasetReference item)
        Creates the event with dataset reference item related to the click
        Parameters:
        nativeEvent - native event of this custom event
        item - dataset reference item related to the click
      • DatasetSelectionEvent

        public DatasetSelectionEvent​(BaseNativeEvent nativeEvent,
                                     IsChart chart,
                                     DatasetReference item)
        Creates the event with dataset reference item related to the click and the chart instance
        Parameters:
        nativeEvent - native event of this custom event
        chart - chart instance
        item - dataset reference item related to the click
    • Method Detail

      • getItem

        public DatasetReference getItem()
        Returns the item with dataset metadata related to the click
        Returns:
        the item with dataset metadata related to the click
      • getChart

        public IsChart getChart()
        Description copied from class: AbstractEvent
        Returns the chart instance, stored in the event as source.
        Overrides:
        getChart in class AbstractEvent
        Returns:
        the chart instance
      • dispatch

        protected void dispatch​(EventHandler handler)
        Description copied from class: Event
        Implemented by subclasses to dispatch event on the handler.
        Specified by:
        dispatch in class Event
        Parameters:
        handler - handler instance