Class DatasetsItemsSelectorOptions


  • public final class DatasetsItemsSelectorOptions
    extends AbstractPluginOptions
    Configuration options of DatasetsItemsSelector.ID plugin.
    It is managing:
    • the X axis ID
    • the selection color
    • the border color
    • the border width
    • the border dash
    • the border dash offset
    • flag to fire event on update
    • "clear" options
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • DatasetsItemsSelectorOptions

        public DatasetsItemsSelectorOptions()
        Builds the object with new java script object setting the default value of plugin.
        The global plugin options is used, if exists, as defaults values.
      • DatasetsItemsSelectorOptions

        public DatasetsItemsSelectorOptions​(IsChart chart)
        Builds the object with a chart instance in order to get the right defaults.
        If the plugin options have not been set by chart type, it will use the global.
        Parameters:
        chart - chart instance related to the plugin options
    • Method Detail

      • getSelectionCleaner

        public SelectionCleaner getSelectionCleaner()
        Returns the selection cleaner element.
        Returns:
        the selection cleaner element
      • setEnabled

        public void setEnabled​(boolean enabled)
        Sets true if plugin is enabled.
        Parameters:
        enabled - true if plugin is enabled.
      • isEnabled

        public boolean isEnabled()
        Returns true if plugin is enabled.
        Returns:
        true if plugin is enabled.
      • setXAxisID

        public void setXAxisID​(String xAxisID)
        Sets the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
        Parameters:
        xAxisID - the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
      • setXAxisID

        public void setXAxisID​(ScaleId xAxisID)
        Sets the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
        Parameters:
        xAxisID - the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
      • getXAxisID

        public ScaleId getXAxisID()
        Returns the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
        Returns:
        the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
      • getColorAsString

        public String getColorAsString()
        Returns the color.
        Returns:
        the color.
      • getColor

        public IsColor getColor()
        Returns the color.
        Returns:
        the color.
      • setColor

        public void setColor​(String color)
        Sets the color.
        Parameters:
        color - the color.
      • setColor

        public void setColor​(IsColor color)
        Sets the color.
        Parameters:
        color - the color.
      • setBorderDash

        public void setBorderDash​(int... borderDash)
        Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Parameters:
        borderDash - the line dash pattern used when stroking lines
      • getBorderDash

        public List<Integer> getBorderDash()
        Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Returns:
        the line dash pattern used when stroking lines.
      • setBorderDashOffset

        public void setBorderDashOffset​(double borderDashOffset)
        Sets the line dash pattern offset.
        Parameters:
        borderDashOffset - the line dash pattern offset.
      • getBorderDashOffset

        public double getBorderDashOffset()
        Returns the line dash pattern offset.
        Returns:
        the line dash pattern offset.
      • setBorderWidth

        public void setBorderWidth​(int borderWidth)
        Sets the border width of the selection.
        Parameters:
        borderWidth - the border width of the selection.
      • getBorderWidth

        public int getBorderWidth()
        Returns the border width of the selection.
        Returns:
        list of the border width of the selection.
      • getBorderColorAsString

        public String getBorderColorAsString()
        Returns the color.
        Returns:
        the color.
      • getBorderColor

        public IsColor getBorderColor()
        Returns the color.
        Returns:
        the color.
      • setBorderColor

        public void setBorderColor​(String color)
        Sets the color.
        Parameters:
        color - the color.
      • setBorderColor

        public void setBorderColor​(IsColor color)
        Sets the color.
        Parameters:
        color - the color.
      • setModifierKey

        public void setModifierKey​(ModifierKey modifierKey)
        Sets the modifier key to activate selection.
        Parameters:
        modifierKey - the modifier key to activate selection
      • getModifierKey

        public ModifierKey getModifierKey()
        Returns the modifier key to activate selection.
        Returns:
        the modifier key to activate selection