Provides the ability to explore a Scene object's node structure.
The objects of this class should not be created directly, and should only be created via a call to sap.ui.vk.Scene#getDefaultNodeHierarchy.
Method | Description |
---|---|
createLayerProxy |
Creates a layer proxy object. The layer proxy object must be destroyed with the destroyLayerProxy method. |
createNode |
Creates a new node. |
createNodeCopy |
Creates a copy of an existing node. |
createNodeProxy |
Creates a node proxy object. The node proxy object must be destroyed with the destroyNodeProxy method. |
destroyLayerProxy |
Destroys the layer proxy object. |
destroyNodeProxy |
Destroys the node proxy object. |
enumerateAncestors |
Enumerates the ancestor nodes of a particular node in the Scene object. This method enumerates the ancestor nodes of a particular node, and then calls the |
enumerateChildren |
Enumerates the child nodes of a particular node in the Scene object. This method gets the child nodes of a particular node, and then calls the |
sap.ui.vk.svg.NodeHierarchy.extend |
Creates a new subclass of class sap.ui.vk.svg.NodeHierarchy with name
|
findNodesByName |
Finds nodes in a scene via node name. |
getAncestors |
Returns a list of reference objects belonging to the ancestors of a particular node. |
getChildren |
Returns a list of reference objects belonging to the children of a particular node. |
getHotspotNodeIds |
Returns a list of hotspots. |
getLayers |
Returns a list of layer IDs. |
sap.ui.vk.svg.NodeHierarchy.getMetadata |
Returns a metadata object for class sap.ui.vk.svg.NodeHierarchy. |
getNodeContentType |
Get node content type |
getScene |
Gets the Scene object the node hierarchy belongs to. |
getSceneRef |
Gets the scene reference that this NodeHierarchy object wraps. |
removeNode |
Deletes a node and destroys it. |
Creates a layer proxy object.
The layer proxy object must be destroyed with the destroyLayerProxy method.
Param | Type | DefaultValue | Description |
---|---|---|---|
layerId | string |
The layer ID for which to create a proxy object. |
Creates a new node.
Param | Type | DefaultValue | Description |
---|---|---|---|
parentNode | sap.ui.vk.svg.Element |
The reference object of the parent node where the created node is added to. If equals |
|
name | string |
The name of the new node. |
|
insertBeforeNode | sap.ui.vk.svg.Element |
The created node is added before this specified node. If equals |
|
nodeContentType | sap.ui.vk.NodeContentType | sap.ui.vk.NodeContentType.Regular |
The created node content type. |
content | object |
Optional Json structure used to define node properties. |
Creates a copy of an existing node.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeToCopy | any |
The reference object of the node to copy. |
|
parentNode | any |
The reference object of the parent node where the created node is added to. If equals |
|
name | string |
The name of the new node. |
|
insertBeforeNode | any |
The created node is added before this specified node. If equals |
Creates a node proxy object.
The node proxy object must be destroyed with the destroyNodeProxy method.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeRef | any |
The reference object for which to create a proxy object. |
Destroys the layer proxy object.
Param | Type | DefaultValue | Description |
---|---|---|---|
layerProxy | sap.ui.vk.LayerProxy |
The layer proxy object. |
Destroys the node proxy object.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeProxy | sap.ui.vk.NodeProxy |
The node proxy object. |
Enumerates the ancestor nodes of a particular node in the Scene object.
This method enumerates the ancestor nodes of a particular node, and then calls the callback
function, to which it passes the ancestor nodes to one by one.
The BaseNodeProxy objects passed to callback
are temporary objects, they are reset after each call to the callback
function.
The ancestor nodes are enumerated starting from the top level node, and progresses down the node hierarchy.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeRef | any |
The reference object of a node whose ancestor nodes we want enumerated. |
|
callback | function |
A function to call when the ancestor nodes are enumerated. The function takes one parameter of type sap.ui.vk.BaseNodeProxy, or string if parameter |
|
passNodeRef | boolean | false |
Indicates whether to pass the node references of the ancestor nodes, or the whole node proxy to the |
Enumerates the child nodes of a particular node in the Scene object.
This method gets the child nodes of a particular node, and then calls the callback
function to which it passes the child nodes to one by one.
The BaseNodeProxy
objects passed to the callback
function are temporary objects, which are reset after each call to the callback
function.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeRef | any |
The reference object of a node whose child nodes we want enumerated. |
|
callback | function |
A function to call when the child nodes are enumerated. The function takes one parameter of type sap.ui.vk.BaseNodeProxy, or string if parameter |
|
stepIntoClosedNodes | boolean | false |
Indicates whether to enumerate the child nodes if the node is closed. |
passNodeRef | boolean | false |
Indicates whether to pass the node references of the child nodes, or the whole node proxy to the |
Creates a new subclass of class sap.ui.vk.svg.NodeHierarchy 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.vk.NodeHierarchy.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 |
Finds nodes in a scene via node name.
Param | Type | DefaultValue | Description |
---|---|---|---|
query | object |
JSON object containing the search parameters. query = { value: string | string[], predicate: "equals" | "contains" | "startsWith", caseSensitive: true | false }
|
Returns a list of reference objects belonging to the ancestors of a particular node.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeRef | any |
The reference object of the node whose ancestors will be returned. |
Returns a list of reference objects belonging to the children of a particular node.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeRef | any |
The reference object of the node whose children will be returned. If |
|
stepIntoClosedNodes | boolean | false |
Indicates whether to return only the child nodes of a closed node or not. If |
Returns a metadata object for class sap.ui.vk.svg.NodeHierarchy.