Class CollectionChangeSupport
Defined in: SweetHome3D.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
CollectionChangeSupport(source)
Creates a collection change support.
|
| Method Attributes | Method Name and Description |
|---|---|
|
addCollectionListener(listener)
Adds the
listener in parameter to the list of listeners that may be notified. |
|
|
fireCollectionChanged(item, index, eventType)
Fires a collection event about
item at a given index. |
|
|
removeCollectionListener(listener)
Removes the
listener in parameter to the list of listeners that may be notified. |
Class Detail
CollectionChangeSupport(source)
Creates a collection change support.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {Object} source
- the collection to which data will be added.
Method Detail
addCollectionListener(listener)
Adds the
listener in parameter to the list of listeners that may be notified.
- Parameters:
- {Object} listener
- the listener to add
fireCollectionChanged(item, index, eventType)
Fires a collection event about
item at a given index.
- Parameters:
- {Object} item
- the added ore deleted item
- {number} index
- the optional index at which the item was added or deleted
- {CollectionEvent.Type} eventType
CollectionEvent.Type.ADDorCollectionEvent.Type.DELETE
removeCollectionListener(listener)
Removes the
listener in parameter to the list of listeners that may be notified.
- Parameters:
- {Object} listener
- the listener to remove. If it doesn't exist, it's simply ignored.
