Class sap.ui.core.IntervalTriggerModule: sap/ui/core/IntervalTrigger

extends Object

Provides a trigger that triggers in a set interval and calls all registered listeners. If the interval is <= 0 the trigger is switched off and won't trigger at all.


Since: 1.11.0.
Constructor Summary
new sap.ui.core.IntervalTrigger(iInterval)Creates an instance of EventBus.
Method Summary
sap.ui.core.IntervalTrigger.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.IntervalTrigger with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.IntervalTrigger.getMetadata()Returns a metadata object for class sap.ui.core.IntervalTrigger.
addListener(fnFunction, oListener?)Adds a listener to the list that should be triggered.
destroy()Destructor method for objects.
removeListener(fnFunction, oListener?)Removes corresponding listener from list.
setInterval(iInterval)Sets the trigger interval.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.core.IntervalTrigger(iInterval)
Creates an instance of EventBus.
Parameters:
{int}iInterval is the interval the trigger should be used. If the trigger is >0 triggering starts/runs and if the interval is set to <=0 triggering stops.
Method Detail
sap.ui.core.IntervalTrigger.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.IntervalTrigger with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.base.Object.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.core.IntervalTrigger.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.IntervalTrigger.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addListener(fnFunction, oListener?)
Adds a listener to the list that should be triggered.
Parameters:
{function}fnFunction is the called function that should be called when the trigger want to trigger the listener.
{object}oListener? that should be triggered.
destroy()
Destructor method for objects.
removeListener(fnFunction, oListener?)
Removes corresponding listener from list.
Parameters:
{function}fnFunction is the previously registered function
{object}oListener? that should be removed
setInterval(iInterval)
Sets the trigger interval. If the value is >0 triggering will start if there are any registered listeners. If the interval is set to <=0 triggering will stop.
Parameters:
{int}iInterval sets the interval in milliseconds when a new triggering should occur.