public abstract class AbstractPluginCachedOptionsFactory<T extends AbstractPluginCachedOptions> extends AbstractChartsLifecycleListener implements NativeObjectContainerFactory<T>
Modifier | Constructor and Description |
---|---|
protected |
AbstractPluginCachedOptionsFactory(String pluginId)
Adds itself as charts life cycle listener to manage the cache of plugin options, in order to clean the instances when the
charts will be destroy.
|
Modifier and Type | Method and Description |
---|---|
protected AbstractPluginCachedOptions |
getOptions(NativeObject nativeObject)
Returns the cached plugin options instance if there is, otherwise returns
null . |
String |
getPluginId()
Returns the plugin id related to this options.
|
void |
onAfterInit(IsChart chart)
Called after 'chart' has been initialized and before the first update.
|
void |
onBeforeDestroy(IsChart chart)
Called before the chart has been destroyed.
|
onAfterDestroy, onBeforeInit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, create
protected AbstractPluginCachedOptionsFactory(String pluginId)
pluginId
- plugin idpublic final String getPluginId()
public final void onAfterInit(IsChart chart)
ChartsLifecycleListener
onAfterInit
in interface ChartsLifecycleListener
onAfterInit
in class AbstractChartsLifecycleListener
chart
- the chart instance.public final void onBeforeDestroy(IsChart chart)
ChartsLifecycleListener
onBeforeDestroy
in interface ChartsLifecycleListener
onBeforeDestroy
in class AbstractChartsLifecycleListener
chart
- the chart instance.protected final AbstractPluginCachedOptions getOptions(NativeObject nativeObject)
null
.nativeObject
- native object instance to be readnull
.