Class CollectionEvent
Extends
EventObject.
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CollectionEvent(source, item, index, type)
Creates an event for an item with its index.
|
Method Attributes | Method Name and Description |
---|---|
getIndex()
Returns the index of the item in collection or -1 if this index is unknown.
|
|
getItem()
Returns the added or deleted item.
|
|
getType()
Returns the type of event.
|
- Methods borrowed from class EventObject:
- getSource
Class Detail
CollectionEvent(source, item, index, type)
Creates an event for an item with its index.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {Object} source
- the object to which an item was added or deleted
- {Object} item
- the added or deleted item
- {number} index
- the index at which the item was added or deleted, or -1 if unknown
- {CollectionEvent.Type} type
CollectionEvent.Type.ADD
orCollectionEvent.Type.DELETE
Method Detail
{number}
getIndex()
Returns the index of the item in collection or -1 if this index is unknown.
- Returns:
- {number}
{Object}
getItem()
Returns the added or deleted item.
- Returns:
- {Object}
{CollectionEvent.Type}
getType()
Returns the type of event.
- Returns:
- {CollectionEvent.Type}