new EventCallback(callback, context [, id] [, priority])
Creates an instance of EventCallback
.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
callback |
function | Function callback |
||
context |
olympe.df.ExecutionContext | Node to use as creator for nodes created by that callback |
||
id |
string |
<optional> |
Will be auto-generated if omitted |
|
priority |
number |
<optional> |
0 | Priority of callback (higher number = higher priority) |
Methods
-
clearNext()
-
Clears the next element pointer
-
getCallback()
-
Gets the function associated with this
EventCallback
.Returns:
Callback function
- Type
- function
-
getExecutorNode()
-
Gets the executor node that this
EventCallback
uses.Returns:
Node which must be the executor node of this callback
-
getId()
-
Gets the ID for this
EventCallback
.Returns:
ID of callback
- Type
- string
-
getNext()
-
Returns the next event of this. Returns null if no next event.
Returns:
-
getPriority()
-
Gets the priority for this
EventCallback
.Returns:
Priority of callback (higher number = higher priority)
- Type
- number
-
hasNext()
-
Returns true if next event is not null, false otherwise
Returns:
- Type
- boolean
-
removeNext()
-
Removes the next event in the list.
-
setNext(event)
-
Inserts the specified event in the list as the next event of this.
Parameters:
Name Type Description event
olympe.ui.events.EventCallback