public final class GlobalPlugins extends Object
chart.plugins
.Constructor and Description |
---|
GlobalPlugins()
Builds the object by the native object which maps
chart.registry.plugins |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getIds()
Gets all global registered plugins ids.
|
boolean |
isEnabledAllCharts(String pluginId)
Returns
true if the plugin is enabled to all charts, otherwise false . |
void |
onChartConfigure(Configuration config,
IsChart chart)
Invokes the on configuration method to inform the plugins that the chart is going to be initialized.
|
boolean |
register(Plugin plugin)
Registers a plugin as global, to apply to all charts.
|
void |
setEnabledAllCharts(String pluginId,
boolean enable)
Setting
false for plugin id, the global plugin is disable to all charts and to activate the plugin on a specific chart, is it enough to enable the plugin by
options. |
boolean |
unregister(String pluginId)
Unregisters a global plugin.
|
public GlobalPlugins()
chart.registry.plugins
public boolean register(Plugin plugin)
plugin
- plugin instancetrue
if registered, otherwise false
if the plugin is already registered with the plugin id of plugin instance.public boolean unregister(String pluginId)
pluginId
- plugin instancetrue
if unregistered, otherwise false
if the plugin is not a custom one.public Set<String> getIds()
public void setEnabledAllCharts(String pluginId, boolean enable)
false
for plugin id, the global plugin is disable to all charts and to activate the plugin on a specific chart, is it enough to enable the plugin by
options.pluginId
- plug id to enableenable
- true
to enable to all charts, otherwise false
.public boolean isEnabledAllCharts(String pluginId)
true
if the plugin is enabled to all charts, otherwise false
.pluginId
- plug id to checktrue
if the plugin is enabled to all charts, otherwise false
.public void onChartConfigure(Configuration config, IsChart chart)
config
- configuration item. Added only to reduce visibility of public method.chart
- instance of the chart