Class sap.ui.vk.ContentResourceModule: sap/ui/vk/ContentResource


Specifies a resource to load.

Experimental API:Since 1.32.0 This class is experimental and might be modified or removed in future versions.

Constructor Summary
new sap.ui.vk.ContentResource(sId?, mSettings?, oScope?)Constructor for a new ContentResource.
Method Summary
sap.ui.vk.ContentResource.collectCategories(resources)Collects content resource categories.
sap.ui.vk.ContentResource.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vk.ContentResource with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.vk.ContentResource.getMetadata()Returns a metadata object for class sap.ui.vk.ContentResource.
addContentResource(oContentResource)Adds some contentResource to the aggregation contentResources.
destroyContentResources()Destroys all the contentResources in the aggregation contentResources.
getContentResources()Gets content of aggregation contentResources.
getLocalMatrix()Gets current value of property localMatrix.
getName()Gets current value of property name.
getNodeProxy()Gets the NodeProxy object created for this content resource.
getSource()Gets current value of property source.
getSourceId()Gets current value of property sourceId.
getSourceType()Gets current value of property sourceType.
indexOfContentResource(oContentResource)Checks for the provided sap.ui.vk.ContentResource in the aggregation contentResources.
insertContentResource(oContentResource, iIndex)Inserts a contentResource into the aggregation contentResources.
removeAllContentResources()Removes all the controls from the aggregation contentResources.
removeContentResource(vContentResource)Removes a contentResource from the aggregation contentResources.
setLocalMatrix(sLocalMatrix)Sets a new value for property localMatrix.
setName(sName)Sets a new value for property name.
setSource(oSource)Sets a new value for property source.
setSourceId(sSourceId)Sets a new value for property sourceId.
setSourceType(sSourceType)Sets a new value for property sourceType.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.vk.ContentResource(sId?, mSettings?, oScope?)
Constructor for a new ContentResource.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.base.ManagedObject can be used as well.

Parameters:
{string}sId? ID of the new content resource. sIdis generated automatically if no non-empty ID is given. Note: this can be omitted, regardless of whether mSettings will be provided or not.
{object}mSettings? An optional map/JSON object with initial property values, aggregated objects etc. for the new content resource.
{object}oScope? scope An object for resolving string-based type and formatter references in bindings.
Method Detail
sap.ui.vk.ContentResource.collectCategories(resources): sap.ui.vk.ContentResourceSourceCategory[]
Collects content resource categories. The result is tested if the content resource hierarchy has the same category - 2D or 3D.
Parameters:
{sap.ui.vk.ContentResource[]}resources The array of content resources.
Returns:
{sap.ui.vk.ContentResourceSourceCategory[]} The array of distinct content resource categories.
sap.ui.vk.ContentResource.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.vk.ContentResource 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.base.ManagedObject.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.vk.ContentResource.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.vk.ContentResource.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addContentResource(oContentResource): sap.ui.vk.ContentResource
Adds some contentResource to the aggregation contentResources.
Parameters:
{sap.ui.vk.ContentResource}oContentResource the contentResource to add; if empty, nothing is inserted
Returns:
{sap.ui.vk.ContentResource} Reference to this in order to allow method chaining
destroyContentResources(): sap.ui.vk.ContentResource
Destroys all the contentResources in the aggregation contentResources.
Returns:
{sap.ui.vk.ContentResource} Reference to this in order to allow method chaining
getContentResources(): sap.ui.vk.ContentResource[]
Gets content of aggregation contentResources.

Child content resources.

Returns:
{sap.ui.vk.ContentResource[]}
getLocalMatrix(): sap.ui.vk.TransformationMatrix
Gets current value of property localMatrix.

The local transformation matrix of the node created for this content resource.

Returns:
{sap.ui.vk.TransformationMatrix} Value of property localMatrix
getName(): string
Gets current value of property name.

The name of the node created for this content resource.

Returns:
{string} Value of property name
getNodeProxy(): sap.ui.vk.NodeProxy
Gets the NodeProxy object created for this content resource.

If this is the only top level content resource, the NodeProxy object is not set since the grouping node is not created, which means that there may be multiple top level nodes.

Returns:
{sap.ui.vk.NodeProxy} The NodeProxy object created for this content resource if any, otherwise null.
getSource(): any
Gets current value of property source.

The source URL or the File object of the content resource/file to load from. The source may be omitted if a grouping node is needed.

Returns:
{any} Value of property source
getSourceId(): string
Gets current value of property sourceId.

The unique ID of the content resource.

Returns:
{string} Value of property sourceId
getSourceType(): string
Gets current value of property sourceType.

The source type of the content resource. Valid types:

  • vds
  • png
  • jpg
  • gif
The source type may be omitted if this is a grouping content node.
Returns:
{string} Value of property sourceType
indexOfContentResource(oContentResource): int
Checks for the provided sap.ui.vk.ContentResource in the aggregation contentResources. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.vk.ContentResource}oContentResource The contentResource whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertContentResource(oContentResource, iIndex): sap.ui.vk.ContentResource
Inserts a contentResource into the aggregation contentResources.
Parameters:
{sap.ui.vk.ContentResource}oContentResource the contentResource to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the contentResource should be inserted at; for a negative value of iIndex, the contentResource is inserted at position 0; for a value greater than the current size of the aggregation, the contentResource is inserted at the last position
Returns:
{sap.ui.vk.ContentResource} Reference to this in order to allow method chaining
removeAllContentResources(): sap.ui.vk.ContentResource[]
Removes all the controls from the aggregation contentResources.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.vk.ContentResource[]} An array of the removed elements (might be empty)
removeContentResource(vContentResource): sap.ui.vk.ContentResource
Removes a contentResource from the aggregation contentResources.
Parameters:
{int|string|sap.ui.vk.ContentResource}vContentResource The contentResourceto remove or its index or id
Returns:
{sap.ui.vk.ContentResource} The removed contentResource or null
setLocalMatrix(sLocalMatrix): sap.ui.vk.ContentResource
Sets a new value for property localMatrix.

The local transformation matrix of the node created for this content resource.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{sap.ui.vk.TransformationMatrix}sLocalMatrix New value for property localMatrix
Returns:
{sap.ui.vk.ContentResource} Reference to this in order to allow method chaining
setName(sName): sap.ui.vk.ContentResource
Sets a new value for property name.

The name of the node created for this content resource.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sName New value for property name
Returns:
{sap.ui.vk.ContentResource} Reference to this in order to allow method chaining
setSource(oSource): sap.ui.vk.ContentResource
Sets a new value for property source.

The source URL or the File object of the content resource/file to load from. The source may be omitted if a grouping node is needed.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{any}oSource New value for property source
Returns:
{sap.ui.vk.ContentResource} Reference to this in order to allow method chaining
setSourceId(sSourceId): sap.ui.vk.ContentResource
Sets a new value for property sourceId.

The unique ID of the content resource.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sSourceId New value for property sourceId
Returns:
{sap.ui.vk.ContentResource} Reference to this in order to allow method chaining
setSourceType(sSourceType): sap.ui.vk.ContentResource
Sets a new value for property sourceType.

The source type of the content resource. Valid types:

  • vds
  • png
  • jpg
  • gif
The source type may be omitted if this is a grouping content node.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sSourceType New value for property sourceType
Returns:
{sap.ui.vk.ContentResource} Reference to this in order to allow method chaining