Class AbstractExtensionPlugin<T extends AbstractPluginOptions>
- java.lang.Object
-
- org.pepstock.charba.client.plugins.AbstractExtensionPlugin<T>
-
- Type Parameters:
T
- type of plugin options
- Direct Known Subclasses:
AnnotationPlugin
,DataLabelsPlugin
,GradientPlugin
,ZoomPlugin
public abstract class AbstractExtensionPlugin<T extends AbstractPluginOptions> extends Object
Commons methods of extension, plugins out-of-the-box written in java script, to import and manage by Charba.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractExtensionPlugin()
Reduces the visibility of constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyingDefaults(T options)
This is invoked before storing the plugins options as default.
Applies the default to the options passed as argument.protected T
getDefaults()
Returns the original defaults of plugin.protected boolean
isRegistered()
Returnstrue
if the plugin has been already registered.protected void
loadDefaults(AbstractPluginOptionsFactory<T> factory)
Loads the default values from CHART.JS default in order to maintain the defaults.
-
-
-
Method Detail
-
isRegistered
protected final boolean isRegistered()
Returnstrue
if the plugin has been already registered.- Returns:
true
if the plugin has been already registered
-
getDefaults
protected final T getDefaults()
Returns the original defaults of plugin.- Returns:
- the original defaults of plugin
-
applyingDefaults
protected final void applyingDefaults(T options)
This is invoked before storing the plugins options as default.
Applies the default to the options passed as argument.- Parameters:
options
- options instance where to apply the defaults.
-
loadDefaults
protected final void loadDefaults(AbstractPluginOptionsFactory<T> factory)
Loads the default values from CHART.JS default in order to maintain the defaults.- Parameters:
factory
- factory to load default options
-
-