Class Plugins
- java.lang.Object
-
- org.pepstock.charba.client.plugins.Plugins
-
- All Implemented Interfaces:
ConfigurationElement
public final class Plugins extends Object implements ConfigurationElement
Is the manager of plugins which can manage the list of plugins and returns them as java script object to store in the chart configuration.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description Plugins()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Plugin plugin)Adds a new plugin to the chart.
If another plugin instance with the same id has been already loaded, it will remove, storing the new one.
If the chart is already initialized, to get this update the chart must be drawn again.voidadd(PluginContainer container)Adds a new plugin to the chart, by a containervoidadd(SmartPlugin plugin)Adds a new plugin to the chart.
If another plugin instance with the same id has been already loaded, it will remove, storing the new one.
If the chart is already initialized, to get this update the chart must be drawn again.voidadd(SmartPluginContainer container)Adds a new plugin to the chart, by a containerbooleanhas(String id)Returnstrueif a plugin is already added, otherwisefalse.voidload(IsChart chart, Configuration configuration)Called to enable to load in the a configuration object the specific configuration item (by native object).voidonChartConfigure(Configuration config, IsChart chart)Invokes the on configuration method to inform the plugins that the chart is going to be initialized.voidremove(String pluginId)Removes a plugin from the chart.
If the chart is already initialized, to get this update the chart must be drawn again.
-
-
-
Method Detail
-
add
public void add(PluginContainer container)
Adds a new plugin to the chart, by a container- Parameters:
container- plugin container instance
-
add
public void add(Plugin plugin)
Adds a new plugin to the chart.
If another plugin instance with the same id has been already loaded, it will remove, storing the new one.
If the chart is already initialized, to get this update the chart must be drawn again.- Parameters:
plugin- plugin instance
-
add
public void add(SmartPluginContainer container)
Adds a new plugin to the chart, by a container- Parameters:
container- plugin container instance
-
add
public void add(SmartPlugin plugin)
Adds a new plugin to the chart.
If another plugin instance with the same id has been already loaded, it will remove, storing the new one.
If the chart is already initialized, to get this update the chart must be drawn again.- Parameters:
plugin- plugin instance
-
has
public boolean has(String id)
Returnstrueif a plugin is already added, otherwisefalse.- Parameters:
id- plugin id to search.- Returns:
trueif a plugin is already added, otherwisefalse
-
remove
public void remove(String pluginId)
Removes a plugin from the chart.
If the chart is already initialized, to get this update the chart must be drawn again.- Parameters:
pluginId- plugin id to remove.
-
onChartConfigure
public void onChartConfigure(Configuration config, IsChart chart)
Invokes the on configuration method to inform the plugins that the chart is going to be initialized.- Parameters:
config- configuration item. Added only to reduce visibility of public method.chart- instance of the chart
-
load
public void load(IsChart chart, Configuration configuration)
Description copied from interface:ConfigurationElementCalled to enable to load in the a configuration object the specific configuration item (by native object).- Specified by:
loadin interfaceConfigurationElement- Parameters:
chart- chart instanceconfiguration- chart configuration instance
-
-