public abstract class AbstractPluginOptionsFactory<T extends AbstractPluginOptions> extends AbstractChartsLifecycleListener implements NativeObjectContainerFactory<T>
Modifier | Constructor and Description |
---|---|
protected |
AbstractPluginOptionsFactory(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 AbstractPluginOptions |
getOptions(NativeObject nativeObject)
Returns the cached plugin options instance if there is, otherwise returns
null . |
void |
onAfterInit(AbstractChart<?,?> chart)
Called after 'chart' has been initialized and before the first update.
|
void |
onBeforeDestroy(AbstractChart<?,?> chart)
Called before the chart as been destroyed.
|
onAfterDestroy, onBeforeInit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
protected AbstractPluginOptionsFactory(String pluginId)
pluginId
- plugin idpublic final void onAfterInit(AbstractChart<?,?> chart)
ChartsLifecycleListener
onAfterInit
in interface ChartsLifecycleListener
onAfterInit
in class AbstractChartsLifecycleListener
chart
- the chart instance.public final void onBeforeDestroy(AbstractChart<?,?> chart)
ChartsLifecycleListener
onBeforeDestroy
in interface ChartsLifecycleListener
onBeforeDestroy
in class AbstractChartsLifecycleListener
chart
- the chart instance.protected final AbstractPluginOptions getOptions(NativeObject nativeObject)
null
.nativeObject
- native object instance to be readnull
.