Class AbstractDatasetContext

  • Direct Known Subclasses:
    DataLabelsContext, DatasetContext, LabelsContext

    public abstract class AbstractDatasetContext
    extends ChartContext
    The option context is used to give contextual information when resolving options where the data set locator (data and data set index) must be used.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • AbstractDatasetContext

        protected AbstractDatasetContext​(NativeObject nativeObject)
        Creates the object with native object instance to be wrapped.
        Parameters:
        nativeObject - native object instance to be wrapped
    • Method Detail

      • isActive

        public final boolean isActive()
        Returns true if element is active (hovered).
        Returns:
        true if element is active (hovered)
      • getMode

        public final TransitionKey getMode()
        Returns the update mode.
        Returns:
        the update mode
      • getDatasetIndex

        public final int getDatasetIndex()
        Returns the index of the current data set.
        Returns:
        the index of the current data set.
      • getDataIndex

        public final int getDataIndex()
        Returns the index of the current data.
        Returns:
        the index of the current data.
      • getDatasetItem

        public final DatasetItem getDatasetItem()
        Returns the DatasetItem related to the context, if there is, otherwise null.
        Returns:
        the DatasetItem related to the context, if there is, otherwise null
      • getElement

        public final ChartElement getElement()
        Returns the ChartElement related to the context, if there is, otherwise null.
        Returns:
        the ChartElement related to the context, if there is, otherwise null
      • checkIfPropertyIsValid

        protected boolean checkIfPropertyIsValid​(Key property)
        Description copied from class: ChartContext
        Checks if the key passed as argument is a key already used for other context properties.
        Overrides:
        checkIfPropertyIsValid in class ChartContext
        Parameters:
        property - property to use to store a custom attribute
        Returns:
        true if the property can be used to store an attribute.