import EventDispatcher from 'flexicious-react-datagrid/js/core/EventDispatcher.js'
EventDispatcher
Extends:
Direct Subclass:
Indirect Subclass:
A base class for all objects that are capable of dispatching events.
Constructor Summary
Public Constructor | ||
public |
constructor(props: *, arg1: *, arg2: *) |
Member Summary
Public Members | ||
public |
[prop]: * |
|
public |
|
|
public |
A list of event listeners for this event dispatcher object. |
|
public |
typeCache: {} |
Method Summary
Public Methods | ||
public |
addEventListener(context: *, type: *, listener: *) Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. |
|
public |
|
|
public |
dispatchEvent(event: *): boolean Dispatches an event into the event flow. |
|
public |
getClassNames(): string[] |
|
public |
getStyle(prop: *): * Gets the value of the prop property on this object |
|
public |
hasEventListener(type: *): Boolean Returns true if an event listener exists |
|
public |
implementsOrExtends(name: *): Boolean Returns true if the class name to check is in the list of class names defined for this class. |
|
public |
kill() Removes all event listeners |
|
public |
killArray(arr: *) Given an array of event dispatchers, calls the kill method on each of them. |
|
public |
removeEventListener(type: *, listener: *) Removes a listener from the EventDispatcher object. |
|
public |
setStyle(prop: *, val: *) Sets the value of the prop property on this object |
Public Constructors
public constructor(props: *, arg1: *, arg2: *) source
Params:
Name | Type | Attribute | Description |
props | * | ||
arg1 | * | ||
arg2 | * |
Public Methods
public addEventListener(context: *, type: *, listener: *) source
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. If you no longer need an event listener, remove it by calling removeEventListener(), or memory problems could result. Event listeners are not automatically removed from memory because the garbage collector does not remove the listener as long as the dispatching object exists.
Params:
Name | Type | Attribute | Description |
context | * | The "this" property in the event listener function will be set to the value of this parameter. |
|
type | * | The type of event. |
|
listener | * | The listener function that processes the event. This function must accept an Event object as its only parameter and must return nothing |
public constructed() source
public dispatchEvent(event: *): boolean source
Dispatches an event into the event flow. The event target is the EventDispatcher object upon which the dispatchEvent() method is called.
Params:
Name | Type | Attribute | Description |
event | * | The Event object that is dispatched into the event flow. |
public getStyle(prop: *): * source
Gets the value of the prop property on this object
Params:
Name | Type | Attribute | Description |
prop | * |
Return:
* |
public hasEventListener(type: *): Boolean source
Returns true if an event listener exists
Params:
Name | Type | Attribute | Description |
type | * | The type of event. |
public implementsOrExtends(name: *): Boolean source
Returns true if the class name to check is in the list of class names defined for this class.
Params:
Name | Type | Attribute | Description |
name | * | Name of the class to check |
public killArray(arr: *) source
Given an array of event dispatchers, calls the kill method on each of them.
Params:
Name | Type | Attribute | Description |
arr | * | The list of event dispatchers to kill. |
public removeEventListener(type: *, listener: *) source
Removes a listener from the EventDispatcher object. If there is no matching listener registered with the EventDispatcher object, a call to this method has no effect.
Params:
Name | Type | Attribute | Description |
type | * | The type of event. |
|
listener | * | The listener function that processes the event. This function must accept an Event object as its only parameter and must return nothing |
public setStyle(prop: *, val: *) source
Sets the value of the prop property on this object
Params:
Name | Type | Attribute | Description |
prop | * | ||
val | * |