Class DefaultChartPlugins

  • All Implemented Interfaces:
    IsDefaultPlugins

    public final class DefaultChartPlugins
    extends Object
    implements IsDefaultPlugins
    Defaults for plugins options, based on chart type.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • DefaultChartPlugins

        public DefaultChartPlugins​(IsDefaultPlugins plugins)
        Creates the object by plugins option element instance.
        Parameters:
        plugins - plugins option element instance.
    • Method Detail

      • isEnabled

        public boolean isEnabled​(String pluginId)
        Description copied from interface: IsDefaultPlugins
        Returns if a global plugin is enabled or not.
        Specified by:
        isEnabled in interface IsDefaultPlugins
        Parameters:
        pluginId - plugin id.
        Returns:
        false if a global plugin is not enabled otherwise true.
      • hasOptions

        public boolean hasOptions​(String pluginId)
        Description copied from interface: IsDefaultPlugins
        Checks if there is any options for a specific plugin, by its id.
        Specified by:
        hasOptions in interface IsDefaultPlugins
        Parameters:
        pluginId - plugin id.
        Returns:
        true if there is an options, otherwise false.
      • getOptions

        public <T extends AbstractPluginOptions> T getOptions​(String pluginId,
                                                              AbstractPluginOptionsFactory<T> factory)
        Description copied from interface: IsDefaultPlugins
        Returns the plugin options, if exist. It uses a factory instance to create a native object container.
        If factory argument is not consistent, null is returned.
        Specified by:
        getOptions in interface IsDefaultPlugins
        Type Parameters:
        T - type of native object container to return
        Parameters:
        pluginId - plugin id.
        factory - factory instance to create a native object container.
        Returns:
        java script object used to configure the plugin or an empty object if not exist. If factory argument is not consistent, null is returned.