Allows access to scene nodes in the scene. A single sap.ui.vtm.Scene is shared by the sap.ui.vtm.Viewport objects in all the sap.ui.vtm.Panel objects associated with a sap.ui.vtm.Vtm instance. Visibility, selection, highlighting and opacity can be controlled for each scene node separately in each sap.ui.vtm.Viewport.
This class is not intended to be directly instantiated by application code. A sap.ui.vtm.Scene object is created when a sap.ui.vtm.Vtm object is created.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.vtm.Scene()
Event | Description |
---|---|
downloadCompleted |
Raised when viewables have been downloaded (successfully or unsuccessfully) as a result of a call to #loadViewablesAsync. If no viewables have been successfully downloaded, none of the viewables will be loaded, so no subsequent sap.ui.vtm.Scene.loadStarted, sap.ui.vtm.Scene.loadProgress or sap.ui.vtm.Scene.loadCompleted will occur as a result of the call to #loadViewablesAsync that resulted in the sap.ui.vtm.Scene.downloadCompleted event being raised. |
downloadProgress |
Raised to indicate download progress of a viewable while viewables are being downloaded |
downloadStarted |
Raised when starting a download of a set of viewables. |
hierarchyChanged |
Raised when the scene hierarchy has been modified. |
loadCompleted |
Raised when all viewables specified in a call to #loadViewablesAsync have either loaded or failed to load. |
loadProgress |
Raised to provide progress information for a viewable that is being loaded. |
loadStarted |
Raised when starting to load a set of viewables. |
Raised when viewables have been downloaded (successfully or unsuccessfully) as a result of a call to #loadViewablesAsync.
If no viewables have been successfully downloaded, none of the viewables will be loaded, so no subsequent sap.ui.vtm.Scene.loadStarted, sap.ui.vtm.Scene.loadProgress or sap.ui.vtm.Scene.loadCompleted will occur as a result of the call to #loadViewablesAsync that resulted in the sap.ui.vtm.Scene.downloadCompleted event being raised.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
viewableLoadInfos | sap.ui.vtm.ViewableLoadInfo[] |
A set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable passed to the #loadViewablesAsync call. |
downloadedViewables | sap.ui.vtm.Viewable[] |
The set of viewables that were downloaded successfully in the call to #loadViewablesAsync that resulted in this event being raised. |
Raised to indicate download progress of a viewable while viewables are being downloaded
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
viewable | sap.ui.vtm.Viewable |
The viewable that is being downloaded. |
downloadedBytes | int |
The number of bytes that have been downloaded. |
totalBytes | int |
The total number of bytes that need to be downloaded. |
Raised when starting a download of a set of viewables.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
viewableLoadInfos | sap.ui.vtm.ViewableLoadInfo[] |
A set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable passed to the #loadViewablesAsync call. |
Raised when the scene hierarchy has been modified.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Raised when all viewables specified in a call to #loadViewablesAsync have either loaded or failed to load.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
succeeeded | boolean |
Indicates whether the scene was built/updated successfully. It is possible that this can be |
viewableLoadInfos | sap.ui.vtm.ViewableLoadInfo[] |
A set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable passed to the #loadViewablesAsync call. |
loadedViewables | sap.ui.vtm.Viewable[] |
The set of viewables that were loaded successfully in the call to #loadViewablesAsync that resulted in this event being raised. |
Raised to provide progress information for a viewable that is being loaded.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Raised when starting to load a set of viewables.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
viewableLoadInfos | sap.ui.vtm.ViewableLoadInfo[] |
A set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable passed to the #loadViewablesAsync call. |
Method | Description |
---|---|
attachDownloadCompleted |
Attaches event handler When called, the context of the event handler (its Raised when viewables have been downloaded (successfully or unsuccessfully) as a result of a call to #loadViewablesAsync. If no viewables have been successfully downloaded, none of the viewables will be loaded, so no subsequent sap.ui.vtm.Scene.loadStarted, sap.ui.vtm.Scene.loadProgress or sap.ui.vtm.Scene.loadCompleted will occur as a result of the call to #loadViewablesAsync that resulted in the sap.ui.vtm.Scene.downloadCompleted event being raised. |
attachDownloadProgress |
Attaches event handler When called, the context of the event handler (its Raised to indicate download progress of a viewable while viewables are being downloaded |
attachDownloadStarted |
Attaches event handler When called, the context of the event handler (its Raised when starting a download of a set of viewables. |
attachHierarchyChanged |
Attaches event handler When called, the context of the event handler (its Raised when the scene hierarchy has been modified. |
attachLoadCompleted |
Attaches event handler When called, the context of the event handler (its Raised when all viewables specified in a call to #loadViewablesAsync have either loaded or failed to load. |
attachLoadProgress |
Attaches event handler When called, the context of the event handler (its Raised to provide progress information for a viewable that is being loaded. |
attachLoadStarted |
Attaches event handler When called, the context of the event handler (its Raised when starting to load a set of viewables. |
cloneNode |
Clones a scene node. |
createNode |
Creates a scene node. |
deleteNode |
Deletes a node from the scene. |
detachDownloadCompleted |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachDownloadProgress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachDownloadStarted |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachHierarchyChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachLoadCompleted |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachLoadProgress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachLoadStarted |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.vtm.Scene.extend |
Creates a new subclass of class sap.ui.vtm.Scene with name
|
fireDownloadCompleted |
Fires event downloadCompleted to attached listeners. |
fireDownloadProgress |
Fires event downloadProgress to attached listeners. |
fireDownloadStarted |
Fires event downloadStarted to attached listeners. |
fireHierarchyChanged |
Fires event hierarchyChanged to attached listeners. |
fireLoadCompleted |
Fires event loadCompleted to attached listeners. |
fireLoadProgress |
Fires event loadProgress to attached listeners. |
fireLoadStarted |
Fires event loadStarted to attached listeners. |
getAllIds |
Gets the scene node IDs of all the scene nodes in the scene. |
getAncestorIds |
Gets the scene node IDs of the ancestors of the specified scene node. The root scene node is the first item in the array and the parent is the last. |
getCachedIds |
Gets set of all scene node IDs in the scene that have been discovered via scene traversal performed by the application. Accurate population of this value requires application support (whereas #getAllIds always returns the exact set of all scene nodes in the scene). Scene node IDs are added to this set as they are discovered through methods the application calls: The methods above are also used by the following methods: All of the scene nodes that have been traversed by these traversal methods will be included in the cached set. If during a call to #traverseTree or #traverseBranch the application stops traversal of a particular branch of the scene tree by returning Scene nodes are also added/removed from the to the cached set as required when the following methods are called: If this method is called before any scene traversal has occurred, it populates the set of cached scene node IDs using #getAllIds. |
getChildIds |
Gets the scene node IDs of the children of the specified scene node. |
getDescendantIds |
Gets the scene node IDs of the descendants of the specified scene node. |
getDownloadedViewables |
Gets the set of downloaded viewables. |
getLoadedViewables |
Gets the set of loaded viewables. |
sap.ui.vtm.Scene.getMetadata |
Returns a metadata object for class sap.ui.vtm.Scene. |
getParentId |
Gets the scene node ID of the parent node of the specified scene node or null if the specified scene node is a root scene node. |
getRootIds |
Gets the IDs of the the root scene nodes. |
getViewableLoadInfos |
Gets the set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable that has been passed to a #loadViewablesAsyc call made on this sap.ui.vtm.Scene instance. |
getVtm |
Gets the sap.ui.vtm.Vtm instance that owns this scene. |
loadViewablesAsync |
Load a set of viewables asynchronously. Progress is indicated by the |
traverseBranch |
Recursively traverses a scene tree branch calling a function on each scene node. Does not traverse the descendants of closed nodes. |
traverseNodes |
Traverses a set of scene nodes specified by scene node ID, calling a function on each scene node. |
traverseTree |
Recursively traverses the scene tree calling a function on each scene node. |
Attaches event handler fnFunction
to the downloadCompleted event of this sap.ui.vtm.Scene
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vtm.Scene
itself.
Raised when viewables have been downloaded (successfully or unsuccessfully) as a result of a call to #loadViewablesAsync.
If no viewables have been successfully downloaded, none of the viewables will be loaded, so no subsequent sap.ui.vtm.Scene.loadStarted, sap.ui.vtm.Scene.loadProgress or sap.ui.vtm.Scene.loadCompleted will occur as a result of the call to #loadViewablesAsync that resulted in the sap.ui.vtm.Scene.downloadCompleted event being raised.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the downloadProgress event of this sap.ui.vtm.Scene
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vtm.Scene
itself.
Raised to indicate download progress of a viewable while viewables are being downloaded
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the downloadStarted event of this sap.ui.vtm.Scene
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vtm.Scene
itself.
Raised when starting a download of a set of viewables.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the hierarchyChanged event of this sap.ui.vtm.Scene
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vtm.Scene
itself.
Raised when the scene hierarchy has been modified.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the loadCompleted event of this sap.ui.vtm.Scene
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vtm.Scene
itself.
Raised when all viewables specified in a call to #loadViewablesAsync have either loaded or failed to load.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the loadProgress event of this sap.ui.vtm.Scene
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vtm.Scene
itself.
Raised to provide progress information for a viewable that is being loaded.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the loadStarted event of this sap.ui.vtm.Scene
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vtm.Scene
itself.
Raised when starting to load a set of viewables.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Clones a scene node.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeIdToClone | string |
The ID of the node to clone. |
|
parentNodeId | string |
The ID of the node that will be the parent of the created node. If |
|
insertBeforeNodeId | string |
The created node is added before this specified node. If |
|
name | string |
The name of the new node. |
|
recursive | boolean |
If |
Creates a scene node.
Param | Type | DefaultValue | Description |
---|---|---|---|
parentNodeId | string |
The ID of the node that will be the parent of the created node. If |
|
insertBeforeNodeId | string |
The created node is added before this specified node. If |
|
name | string |
The name of the new node. |
Deletes a node from the scene.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeId | string |
The ID of the node to delete. |
Detaches event handler fnFunction
from the downloadCompleted event of this sap.ui.vtm.Scene
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the downloadProgress event of this sap.ui.vtm.Scene
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the downloadStarted event of this sap.ui.vtm.Scene
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the hierarchyChanged event of this sap.ui.vtm.Scene
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the loadCompleted event of this sap.ui.vtm.Scene
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the loadProgress event of this sap.ui.vtm.Scene
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the loadStarted event of this sap.ui.vtm.Scene
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.ui.vtm.Scene 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.core.Element.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event downloadCompleted to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
viewableLoadInfos | sap.ui.vtm.ViewableLoadInfo[] |
A set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable passed to the #loadViewablesAsync call. |
|
downloadedViewables | sap.ui.vtm.Viewable[] |
The set of viewables that were downloaded successfully in the call to #loadViewablesAsync that resulted in this event being raised. |
Fires event downloadProgress to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
viewable | sap.ui.vtm.Viewable |
The viewable that is being downloaded. |
|
downloadedBytes | int |
The number of bytes that have been downloaded. |
|
totalBytes | int |
The total number of bytes that need to be downloaded. |
Fires event downloadStarted to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
viewableLoadInfos | sap.ui.vtm.ViewableLoadInfo[] |
A set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable passed to the #loadViewablesAsync call. |
Fires event hierarchyChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event loadCompleted to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
succeeeded | boolean |
Indicates whether the scene was built/updated successfully. It is possible that this can be |
|
viewableLoadInfos | sap.ui.vtm.ViewableLoadInfo[] |
A set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable passed to the #loadViewablesAsync call. |
|
loadedViewables | sap.ui.vtm.Viewable[] |
The set of viewables that were loaded successfully in the call to #loadViewablesAsync that resulted in this event being raised. |
Fires event loadProgress to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event loadStarted to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
viewableLoadInfos | sap.ui.vtm.ViewableLoadInfo[] |
A set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable passed to the #loadViewablesAsync call. |
Gets the scene node IDs of the ancestors of the specified scene node. The root scene node is the first item in the array and the parent is the last.
Param | Type | DefaultValue | Description |
---|---|---|---|
sceneNodeId | string |
The scene node to find the ancestors of. |
Gets set of all scene node IDs in the scene that have been discovered via scene traversal performed by the application.
Accurate population of this value requires application support (whereas #getAllIds always returns the exact set of all scene nodes in the scene).
Scene node IDs are added to this set as they are discovered through methods the application calls:
The methods above are also used by the following methods:
All of the scene nodes that have been traversed by these traversal methods will be included in the cached set. If during a call to #traverseTree or #traverseBranch the application stops traversal of a particular branch of the scene tree by returning false
in the callback for a particular scene node, the application can call #getDescendantIds for that scene node to ensure that all the scene node IDs for the descendants of that scene node are included in the set of cached IDs.
Scene nodes are also added/removed from the to the cached set as required when the following methods are called:
If this method is called before any scene traversal has occurred, it populates the set of cached scene node IDs using #getAllIds.
Gets the scene node IDs of the children of the specified scene node.
Param | Type | DefaultValue | Description |
---|---|---|---|
sceneNodeId | string |
The scene node to find the children of. |
Gets the scene node IDs of the descendants of the specified scene node.
Param | Type | DefaultValue | Description |
---|---|---|---|
sceneNodeId | string |
The scene node to find the descendants of. |
Gets the scene node ID of the parent node of the specified scene node or null if the specified scene node is a root scene node.
Param | Type | DefaultValue | Description |
---|---|---|---|
sceneNodeId | string |
The scene node to find the parent of. |
Gets the set of sap.ui.vtm.ViewableLoadInfo objects that describe the status of each sap.ui.vtm.Viewable that has been passed to a #loadViewablesAsyc call made on this sap.ui.vtm.Scene instance.
Load a set of viewables asynchronously. Progress is indicated by the progress
event and completion is indicated by the loadComplete
event.
Param | Type | DefaultValue | Description |
---|---|---|---|
viewables | sap.ui.vtm.Viewable sap.ui.vtm.Viewable[] |
The set of viewables to load. |
Recursively traverses a scene tree branch calling a function on each scene node.
Does not traverse the descendants of closed nodes.
Param | Type | DefaultValue | Description |
---|---|---|---|
sceneNodeId | string |
The ID of the scene node that represents the root of the branch to traverse. |
|
callback | function |
The function to apply to the traversed scene nodes. |
Traverses a set of scene nodes specified by scene node ID, calling a function on each scene node.
Param | Type | DefaultValue | Description |
---|---|---|---|
sceneNodeIds | string string[] |
The IDs of the scene nodes to traverse. |
|
callback | function |
The function to apply to the traversed scene nodes. |
Recursively traverses the scene tree calling a function on each scene node.
Param | Type | DefaultValue | Description |
---|---|---|---|
callback | function |
The function to apply to the traversed scene nodes. The first parameter to the callback function is of type sap.ui.vtm.SceneNode. |