public class Plugins extends AbstractModel<Options,IsDefaultPlugins> implements IsDefaultPlugins
| Modifier | Constructor and Description |
|---|---|
protected |
Plugins(ChartEnvelop<Plugins> envelop)
Creates the object wrapping another plugin.
This constructor is used ONLY from GlobalOptions. |
| Modifier and Type | Method and Description |
|---|---|
List<Key> |
getAllIds()
Returns the unmodifiable list of registered plugin ids.
|
<T extends AbstractPluginOptions> |
getOptions(AbstractPluginOptionsFactory<T> factory)
Returns the plugin options, if exist.
It uses a factory instance to create a plugin options. If factory argument is not consistent, null is returned. |
<T extends AbstractPluginOptions> |
getOptions(String pluginId,
AbstractPluginOptionsFactory<T> factory)
Returns the plugin options, if exist.
It uses a factory instance to create a plugin options. If factory argument is not consistent, null is returned. |
boolean |
hasEnabled(String pluginId)
Returns if a global plugin has been set or not.
|
boolean |
hasOptions(String pluginId)
Checks if there is any options for a specific plugin, by its id.
|
boolean |
isEnabled(DefaultPluginId pluginId)
Returns if a plugin is enabled or not.
|
boolean |
isEnabled(String pluginId)
Returns if a plugin is enabled or not.
|
void |
removeOptions(String pluginId)
Removes the plugin options.
|
void |
setEnabled(ConfigurationEnvelop<DefaultPluginId> envelop,
boolean enabled)
Sets if a default CHART.JS plugin must be enabled or not.
Callable only for chart configuration scope (no global or other). |
void |
setEnabled(String pluginId,
boolean enabled)
Sets if a global plugin must be enabled or not.
|
<T extends AbstractPluginOptions> |
setOptions(String pluginId,
T options)
Sets the plugin options.
If passed options is null, the configuration of plugin will be removed. |
<T extends AbstractPluginOptions> |
setOptions(T options)
Sets the plugin options.
|
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModelcheckAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParentcheckDefaultValuesArgument, empty, getArrayValue, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typeprotected Plugins(ChartEnvelop<Plugins> envelop)
GlobalOptions.envelop - envelop passed by chart package in oredr to wrap another plugin.public final List<Key> getAllIds()
public final void setEnabled(String pluginId, boolean enabled)
pluginId - plugin id.enabled - false disable a global plugin.public final void setEnabled(ConfigurationEnvelop<DefaultPluginId> envelop, boolean enabled)
envelop - default CHART.JS plugin instance.enabled - false disable a default CHART.JS plugin.public final boolean isEnabled(DefaultPluginId pluginId)
pluginId - plugin id.false if a global plugin is not enabled otherwise true.public final boolean isEnabled(String pluginId)
isEnabled in interface IsDefaultPluginspluginId - plugin id.false if a plugin is not enabled otherwise true.public final boolean hasEnabled(String pluginId)
pluginId - plugin id.false if a global plugin has not been set otherwise true.public final void removeOptions(String pluginId)
pluginId - plugin id.public <T extends AbstractPluginOptions> void setOptions(T options)
T - type of plugin options to storeoptions - plugin options used to configure the pluginpublic <T extends AbstractPluginOptions> void setOptions(String pluginId, T options)
null, the configuration of plugin will be removed.T - type of plugin options to storepluginId - plugin id.options - plugin options used to configure the plugin.null to remove the configuration if exist.public final boolean hasOptions(String pluginId)
hasOptions in interface IsDefaultPluginspluginId - plugin id.true if there is an options, otherwise false.public final <T extends AbstractPluginOptions> T getOptions(AbstractPluginOptionsFactory<T> factory)
null is returned.T - type of plugin options to returnfactory - factory instance to create a plugin optionsnull is returned.public final <T extends AbstractPluginOptions> T getOptions(String pluginId, AbstractPluginOptionsFactory<T> factory)
null is returned.getOptions in interface IsDefaultPluginsT - type of plugin options to returnpluginId - plugin id.factory - factory instance to create a plugin optionsnull is returned.