public class Plugins extends Object
Modifier and Type | Method and Description |
---|---|
<T extends NativeObjectContainer> |
getOptions(String pluginId,
NativeObjectContainerFactory<T> factory)
Returns the plugin options, if exist.
|
<T extends NativeObjectContainer> |
getOptionsAsList(String pluginId,
NativeObjectContainerFactory<T> factory)
Returns the plugin options as list of object containers, if exist.
|
ObjectType |
getOptionsType(String pluginId)
Returns the options type.
|
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(String pluginId)
Returns if a global plugin is enabled or not.
|
boolean |
isForcedlyDisabled(DefaultPlugin plugin)
Returns if a default CHART.JS plugin is enabled or not, forced directly by global plugin manager
|
boolean |
isForcedlyDisabled(String pluginId)
Returns if a global plugin is enabled or not, forced directly by global plugin manager
|
void |
setEnabled(DefaultPlugin plugin,
boolean enabled)
Sets if a default CHART.JS plugin must be enabled or not.
|
void |
setEnabled(String pluginId,
boolean enabled)
Sets if a global plugin must be enabled or not.
|
<T extends NativeObjectContainer> |
setOptions(String pluginId,
List<T> objects)
Sets the plugin options as array.
|
<T extends NativeObjectContainer> |
setOptions(String pluginId,
T object)
Sets the plugin options.
|
public void setEnabled(String pluginId, boolean enabled)
pluginId
- plugin id.enabled
- false
disable a global plugin.public void setEnabled(DefaultPlugin plugin, boolean enabled)
plugin
- default CHART.JS plugin instance.enabled
- false
disable a default CHART.JS plugin.public boolean isEnabled(String pluginId)
pluginId
- plugin id.false
if a global plugin is not enabled otherwise true
.public boolean isForcedlyDisabled(String pluginId)
pluginId
- plugin id.true
if a global plugin is not enabled otherwise false
.public boolean isForcedlyDisabled(DefaultPlugin plugin)
plugin
- a default CHART.JS plugin.true
if a default CHART.JS plugin is not enabled otherwise false
.public boolean hasEnabled(String pluginId)
pluginId
- plugin id.false
if a global plugin has not been set otherwise true
.public <T extends NativeObjectContainer> void setOptions(String pluginId, T object)
T
- type of native object container to storepluginId
- plugin id.object
- java script object used to configure the plugin. Pass null
to remove the configuration if
exist.public <T extends NativeObjectContainer> void setOptions(String pluginId, List<T> objects)
T
- type of native object container to storepluginId
- plugin id.objects
- list of native object container used to configure the plugin. Pass null
to remove the
configuration if exist.public boolean hasOptions(String pluginId)
pluginId
- plugin id.true
if there is an options, otherwise false
.public ObjectType getOptionsType(String pluginId)
pluginId
- plugin id.public <T extends NativeObjectContainer> T getOptions(String pluginId, NativeObjectContainerFactory<T> factory)
T
- type of native object container to returnpluginId
- plugin id.factory
- factory instance to create a native object container.public <T extends NativeObjectContainer> List<T> getOptionsAsList(String pluginId, NativeObjectContainerFactory<T> factory)
T
- type of native object container to returnpluginId
- plugin id.factory
- factory instance to create a native object container.