Class DefaultPlugins

  • All Implemented Interfaces:
    IsDefaultPlugins

    public final class DefaultPlugins
    extends Object
    implements IsDefaultPlugins
    CHART.JS default values for LEGEND element.
    Author:
    Andrea "Stock" Stocchero
    • 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.