abstract class sap.ui.vk.ViewportBase

Control sample: sap.ui.vk.ViewportBase
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vk/ViewportBase
Application Component: CA-UI5-VTK

Provides a rendering canvas for the 3D elements of a loaded scene.


Constructor

Constructor for a new Viewport.

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.vk.ViewportBase(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new Viewport control. Generated automatically if no ID is given.

mSettings? object

Initial settings for the new Viewport control.


Properties

Name Type Default Value Description
backgroundColorBottom sap.ui.core.CSSColor rgba(255, 255, 255, 1)

Viewport background bottom color in the CSS Color format

Visibility: public
backgroundColorTop sap.ui.core.CSSColor rgba(50, 50, 50, 1)

Viewport background top color in the CSS Color format

Visibility: public
disableHotspotHovering boolean false

Disables hotspot hovering

Visibility: public
freezeCamera boolean false

Freeze camera

Visibility: public
height sap.ui.core.CSSSize 100%

Viewport height

Visibility: public
hotspotColor sap.ui.core.CSSColor rgba(89, 0, 0, 0.73)

Color used for highlighting hotspots in the CSS Color format

Visibility: public
hotspotColorABGR int 1493172411

Color used for highlighting hotspots in the ABGR format

Visibility: public
keepOutputSize boolean false Visibility: public
renderMode sap.ui.vk.RenderMode Default

Viewport render mode

Visibility: public
selectionDisplayMode sap.ui.vk.SelectionDisplayMode Highlight

Selection display mode

Visibility: public
selectionMode sap.ui.vk.SelectionMode Sticky

Selection mode

Visibility: public
showAllHotspots boolean false

Enables or disables showing of all hotspots

Visibility: public
showAllHotspotsTintColor sap.ui.core.CSSColor rgba(255, 255, 0, .35)

Color used to highlight all hotspots when the showAllHotspots property has a value of true.

Visibility: public
showDebugInfo boolean false

Shows or hides the debug info.

Visibility: public
showSafeArea boolean false

Shows or hides the Safe Area

Visibility: public
showSelectionBoundingBoxes boolean true

Show selection bounding boxes

Visibility: public
width sap.ui.core.CSSSize 100%

Viewport width

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
annotations 0..n sap.ui.vk.Annotation

HTML Annotations present in the active view

content 0..n sap.ui.core.Control

The controls inside the viewport.

outputSettings 0..1 sap.ui.vk.OutputSettings

Output size settings of the viewport

safeArea 0..1 sap.ui.vk.SafeArea

SafeArea control for viewport


Associations

Name Cardinality Type Description
contentConnector 0..1 sap.ui.vk.ContentConnector

An association to the ContentConnector instance that manages content resources.

tools 0..n sap.ui.vk.tools.Tool

The tools of this viewport.

viewStateManager 0..1 sap.ui.vk.ViewStateManagerBase

An association to the ViewStateManager instance.


Events Overview

Event Description
nodeClicked

This event will be fired when a node is clicked.

This event bubbles up the control hierarchy.

nodesPicked

This event is fired when nodes in the scene are picked by user action. If application requires different selection behaviour then it can handle this event and implement its own selection method. In this case selectionMode property should be set to sap.ui.vk.SelectionMode.None Application can modify list of picked node references to alter selection behaviour.

This event bubbles up the control hierarchy.

nodeZoomed

This event is fired when a node in the scene is zoomed in/out by double-clicking.

This event bubbles up the control hierarchy.

procedureFinished

This event is fired when the current procedure is done playing

This event bubbles up the control hierarchy.

resize

This event is fired when viewport size is changed.

This event bubbles up the control hierarchy.

urlClicked

This event is fired when a URL in a note is clicked.

This event bubbles up the control hierarchy.

viewActivated

This event is fired when a view in the viewport is activated

This event bubbles up the control hierarchy.

viewFinished

This event is fired when the current view is done playing

This event bubbles up the control hierarchy.

nodeClicked

This event will be fired when a node is clicked.

This event bubbles up the control hierarchy.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
nodeRef any

Returns a node reference.

x int
y int

nodesPicked

This event is fired when nodes in the scene are picked by user action. If application requires different selection behaviour then it can handle this event and implement its own selection method. In this case selectionMode property should be set to sap.ui.vk.SelectionMode.None Application can modify list of picked node references to alter selection behaviour.

This event bubbles up the control hierarchy.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
picked any[]

References of the nodes that are picked.

nodeZoomed

This event is fired when a node in the scene is zoomed in/out by double-clicking.

This event bubbles up the control hierarchy.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
zoomed any

Reference of the node that is zoomed.

isZoomIn boolean

True for zoom in, and false for zoom out.

procedureFinished

This event is fired when the current procedure is done playing

This event bubbles up the control hierarchy.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

resize

This event is fired when viewport size is changed.

This event bubbles up the control hierarchy.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
size object

Returns the width and height of new size \{ width: number, height: number \} in CSS pixels.

urlClicked

This event is fired when a URL in a note is clicked.

This event bubbles up the control hierarchy.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
nodeRef any

Returns a node reference of the note that contains the URL.

url string

Returns a URL that was clicked.

viewActivated

This event is fired when a view in the viewport is activated

This event bubbles up the control hierarchy.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
viewIndex int

Index of the activated view

view sap.ui.vk.View

The activated view

type string

The type of content loaded into the Viewport (for example: 2D, 3D).

viewFinished

This event is fired when the current view is done playing

This event bubbles up the control hierarchy.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
viewIndex int

Methods Overview

Method Description
_setContent

Sets a scene obtained as content from the associated content connector.

This method should be overridden in derived classes.

activateView

Calls activateView with view definition

addAnnotation

Adds some annotation to the aggregation annotations.

addContent

Adds some content to the aggregation content.

addTool

Adds some tool into the association tools.

attachNodeClicked

Attaches event handler fnFunction to the nodeClicked event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event will be fired when a node is clicked.

attachNodesPicked

Attaches event handler fnFunction to the nodesPicked event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when nodes in the scene are picked by user action. If application requires different selection behaviour then it can handle this event and implement its own selection method. In this case selectionMode property should be set to sap.ui.vk.SelectionMode.None Application can modify list of picked node references to alter selection behaviour.

attachNodeZoomed

Attaches event handler fnFunction to the nodeZoomed event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when a node in the scene is zoomed in/out by double-clicking.

attachProcedureFinished

Attaches event handler fnFunction to the procedureFinished event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when the current procedure is done playing

attachResize

Attaches event handler fnFunction to the resize event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when viewport size is changed.

attachUrlClicked

Attaches event handler fnFunction to the urlClicked event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when a URL in a note is clicked.

attachViewActivated

Attaches event handler fnFunction to the viewActivated event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when a view in the viewport is activated

attachViewFinished

Attaches event handler fnFunction to the viewFinished event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when the current view is done playing

destroyAnnotations

Destroys all the annotations in the aggregation annotations.

destroyContent

Destroys all the content in the aggregation content.

destroyOutputSettings

Destroys the outputSettings in the aggregation outputSettings.

destroySafeArea

Destroys the safeArea in the aggregation safeArea.

detachNodeClicked

Detaches event handler fnFunction from the nodeClicked event of this sap.ui.vk.ViewportBase.

The passed function and listener object must match the ones used for event registration.

detachNodesPicked

Detaches event handler fnFunction from the nodesPicked event of this sap.ui.vk.ViewportBase.

The passed function and listener object must match the ones used for event registration.

detachNodeZoomed

Detaches event handler fnFunction from the nodeZoomed event of this sap.ui.vk.ViewportBase.

The passed function and listener object must match the ones used for event registration.

detachProcedureFinished

Detaches event handler fnFunction from the procedureFinished event of this sap.ui.vk.ViewportBase.

The passed function and listener object must match the ones used for event registration.

detachResize

Detaches event handler fnFunction from the resize event of this sap.ui.vk.ViewportBase.

The passed function and listener object must match the ones used for event registration.

detachUrlClicked

Detaches event handler fnFunction from the urlClicked event of this sap.ui.vk.ViewportBase.

The passed function and listener object must match the ones used for event registration.

detachViewActivated

Detaches event handler fnFunction from the viewActivated event of this sap.ui.vk.ViewportBase.

The passed function and listener object must match the ones used for event registration.

detachViewFinished

Detaches event handler fnFunction from the viewFinished event of this sap.ui.vk.ViewportBase.

The passed function and listener object must match the ones used for event registration.

exclusiveSelectionHandler

Helper method used to provide exclusive selection method. If this method is used then nodes are marked as selected while all previously selected objects are deselected. If this is called with empty nodes list then all already selected nodes are deselected.

sap.ui.vk.ViewportBase.extend

Creates a new subclass of class sap.ui.vk.ViewportBase 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.Control.extend.

fireNodeClicked

Fires event nodeClicked to attached listeners.

fireNodesPicked

Fires event nodesPicked to attached listeners.

fireNodeZoomed

Fires event nodeZoomed to attached listeners.

fireProcedureFinished

Fires event procedureFinished to attached listeners.

fireResize

Fires event resize to attached listeners.

fireUrlClicked

Fires event urlClicked to attached listeners.

fireViewActivated

Fires event viewActivated to attached listeners.

fireViewFinished

Fires event viewFinished to attached listeners.

getAnnotations

Gets content of aggregation annotations.

HTML Annotations present in the active view

getBackgroundColorBottom

Gets current value of property backgroundColorBottom.

Viewport background bottom color in the CSS Color format

Default value is "rgba(255, 255, 255, 1)".

getBackgroundColorTop

Gets current value of property backgroundColorTop.

Viewport background top color in the CSS Color format

Default value is "rgba(50, 50, 50, 1)".

getCamera

Gets current camera to the viewport

getContent

Gets content of aggregation content.

The controls inside the viewport.

getContentConnector

ID of the element which is the current target of the association contentConnector, or null.

getDisableHotspotHovering

Gets current value of property disableHotspotHovering.

Disables hotspot hovering

Default value is false.

getFreezeCamera

Gets current value of property freezeCamera.

Freeze camera

Default value is false.

getHeight

Gets current value of property height.

Viewport height

Default value is "100%".

getHotspotColor

Gets current value of property hotspotColor.

Color used for highlighting hotspots in the CSS Color format

Default value is "rgba(89, 0, 0, 0.73)".

getHotspotColorABGR

Gets current value of property hotspotColorABGR.

Color used for highlighting hotspots in the ABGR format

Default value is 0x590000BB.

getKeepOutputSize

Gets current value of property keepOutputSize.

Default value is false.

sap.ui.vk.ViewportBase.getMetadata

Returns a metadata object for class sap.ui.vk.ViewportBase.

getOutputSettings

Gets content of aggregation outputSettings.

Output size settings of the viewport

getRenderMode

Gets current value of property renderMode.

Viewport render mode

Default value is Default.

getSafeArea

Gets content of aggregation safeArea.

SafeArea control for viewport

getSelectionDisplayMode

Gets current value of property selectionDisplayMode.

Selection display mode

Default value is Highlight.

getSelectionMode

Gets current value of property selectionMode.

Selection mode

Default value is Sticky.

getShowAllHotspots

Gets current value of property showAllHotspots.

Enables or disables showing of all hotspots

Default value is false.

getShowAllHotspotsTintColor

Gets current value of property showAllHotspotsTintColor.

Color used to highlight all hotspots when the showAllHotspots property has a value of true.

Default value is "rgba(255, 255, 0, .35)".

getShowDebugInfo

Gets current value of property showDebugInfo.

Shows or hides the debug info.

Default value is false.

getShowSafeArea

Gets current value of property showSafeArea.

Shows or hides the Safe Area

Default value is false.

getShowSelectionBoundingBoxes

Gets current value of property showSelectionBoundingBoxes.

Show selection bounding boxes

Default value is true.

getTools

Returns array of IDs of the elements which are the current targets of the association tools.

getViewStateManager

ID of the element which is the current target of the association viewStateManager, or null.

getWidth

Gets current value of property width.

Viewport width

Default value is "100%".

indexOfAnnotation

Checks for the provided sap.ui.vk.Annotation in the aggregation annotations. and returns its index if found or -1 otherwise.

indexOfContent

Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.

insertAnnotation

Inserts a annotation into the aggregation annotations.

insertContent

Inserts a content into the aggregation content.

pan

Performs a pan gesture to pan across the Viewport.

removeAllAnnotations

Removes all the controls from the aggregation annotations.

Additionally, it unregisters them from the hosting UIArea.

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeAllTools

Removes all the controls in the association named tools.

removeAnnotation

Removes a annotation from the aggregation annotations.

removeContent

Removes a content from the aggregation content.

removeTool

Removes an tool from the association named tools.

renderContent

Renders viewport content.

renderTools

Renders viewport tools.

rotate

Rotates the content resource displayed on the Viewport.

setBackgroundColorBottom

Sets a new value for property backgroundColorBottom.

Viewport background bottom color in the CSS Color format

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

Default value is "rgba(255, 255, 255, 1)".

setBackgroundColorTop

Sets a new value for property backgroundColorTop.

Viewport background top color in the CSS Color format

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

Default value is "rgba(50, 50, 50, 1)".

setCamera

Sets current camera to the viewport

setContentConnector

Sets the associated contentConnector.

setDisableHotspotHovering

Sets a new value for property disableHotspotHovering.

Disables hotspot hovering

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

Default value is false.

setFreezeCamera

Sets a new value for property freezeCamera.

Freeze camera

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

Default value is false.

setHeight

Sets a new value for property height.

Viewport height

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

Default value is "100%".

setHotspotColor

Sets a new value for property hotspotColor.

Color used for highlighting hotspots in the CSS Color format

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

Default value is "rgba(89, 0, 0, 0.73)".

setHotspotColorABGR

Sets a new value for property hotspotColorABGR.

Color used for highlighting hotspots in the ABGR format

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

Default value is 0x590000BB.

setKeepOutputSize

Sets a new value for property keepOutputSize.

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

Default value is false.

setOutputSettings

Sets the aggregated outputSettings.

setRenderMode

Sets a new value for property renderMode.

Viewport render mode

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

Default value is Default.

setSafeArea

Sets the aggregated safeArea.

setSelectionDisplayMode

Sets a new value for property selectionDisplayMode.

Selection display mode

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

Default value is Highlight.

setSelectionMode

Sets a new value for property selectionMode.

Selection mode

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

Default value is Sticky.

setShowAllHotspots

Sets a new value for property showAllHotspots.

Enables or disables showing of all hotspots

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

Default value is false.

setShowAllHotspotsTintColor

Sets a new value for property showAllHotspotsTintColor.

Color used to highlight all hotspots when the showAllHotspots property has a value of true.

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

Default value is "rgba(255, 255, 0, .35)".

setShowDebugInfo

Sets a new value for property showDebugInfo.

Shows or hides the debug info.

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

Default value is false.

setShowSafeArea

Sets a new value for property showSafeArea.

Shows or hides the Safe Area

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

Default value is false.

setShowSelectionBoundingBoxes

Sets a new value for property showSelectionBoundingBoxes.

Show selection bounding boxes

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

Default value is true.

setViewStateManager

Sets the associated viewStateManager.

setWidth

Sets a new value for property width.

Viewport width

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

Default value is "100%".

stickySelectionHandler

Helper method to provide "sticky" selection method. If this method is used then nodes are added into selection if they were not selected before, otherwise they are removed from selection. If this is called with empty nodes list then all already selected nodes are deselected.

zoom

Performs a zoom gesture to zoom in or out on the beginGesture coordinate.

_setContent

Sets a scene obtained as content from the associated content connector.

This method should be overridden in derived classes.

Param Type DefaultValue Description
content sap.ui.vk.Scene

New content or null.

activateView

Calls activateView with view definition

Param Type DefaultValue Description
view sap.ui.vk.View

view object definition

playViewGroup boolean

true if view activation is part of playing view group

notAnimateCameraChange boolean

true if not animating the change of camera

addAnnotation

Adds some annotation to the aggregation annotations.

Param Type DefaultValue Description
oAnnotation sap.ui.vk.Annotation

The annotation to add; if empty, nothing is inserted

addContent

Adds some content to the aggregation content.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content to add; if empty, nothing is inserted

addTool

Adds some tool into the association tools.

Param Type DefaultValue Description
vTool sap.ui.core.ID sap.ui.vk.tools.Tool

The tools to add; if empty, nothing is inserted

attachNodeClicked

Attaches event handler fnFunction to the nodeClicked event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event will be fired when a node is clicked.

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 sap.ui.vk.ViewportBase itself

attachNodesPicked

Attaches event handler fnFunction to the nodesPicked event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when nodes in the scene are picked by user action. If application requires different selection behaviour then it can handle this event and implement its own selection method. In this case selectionMode property should be set to sap.ui.vk.SelectionMode.None Application can modify list of picked node references to alter selection behaviour.

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 sap.ui.vk.ViewportBase itself

attachNodeZoomed

Attaches event handler fnFunction to the nodeZoomed event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when a node in the scene is zoomed in/out by double-clicking.

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 sap.ui.vk.ViewportBase itself

attachProcedureFinished

Attaches event handler fnFunction to the procedureFinished event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when the current procedure is done playing

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 sap.ui.vk.ViewportBase itself

attachResize

Attaches event handler fnFunction to the resize event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when viewport size is changed.

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 sap.ui.vk.ViewportBase itself

attachUrlClicked

Attaches event handler fnFunction to the urlClicked event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when a URL in a note is clicked.

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 sap.ui.vk.ViewportBase itself

attachViewActivated

Attaches event handler fnFunction to the viewActivated event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when a view in the viewport is activated

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 sap.ui.vk.ViewportBase itself

attachViewFinished

Attaches event handler fnFunction to the viewFinished event of this sap.ui.vk.ViewportBase.

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.vk.ViewportBase itself.

This event is fired when the current view is done playing

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 sap.ui.vk.ViewportBase itself

destroyAnnotations

Destroys all the annotations in the aggregation annotations.

destroyContent

Destroys all the content in the aggregation content.

destroyOutputSettings

Destroys the outputSettings in the aggregation outputSettings.

destroySafeArea

Destroys the safeArea in the aggregation safeArea.

detachNodeClicked

Detaches event handler fnFunction from the nodeClicked event of this sap.ui.vk.ViewportBase.

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

detachNodesPicked

Detaches event handler fnFunction from the nodesPicked event of this sap.ui.vk.ViewportBase.

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

detachNodeZoomed

Detaches event handler fnFunction from the nodeZoomed event of this sap.ui.vk.ViewportBase.

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

detachProcedureFinished

Detaches event handler fnFunction from the procedureFinished event of this sap.ui.vk.ViewportBase.

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

detachResize

Detaches event handler fnFunction from the resize event of this sap.ui.vk.ViewportBase.

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

detachUrlClicked

Detaches event handler fnFunction from the urlClicked event of this sap.ui.vk.ViewportBase.

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

detachViewActivated

Detaches event handler fnFunction from the viewActivated event of this sap.ui.vk.ViewportBase.

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

detachViewFinished

Detaches event handler fnFunction from the viewFinished event of this sap.ui.vk.ViewportBase.

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

exclusiveSelectionHandler

Helper method used to provide exclusive selection method. If this method is used then nodes are marked as selected while all previously selected objects are deselected. If this is called with empty nodes list then all already selected nodes are deselected.

Param Type DefaultValue Description
nodes any[]

Array of node references

sap.ui.vk.ViewportBase.extend

Creates a new subclass of class sap.ui.vk.ViewportBase 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.Control.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

fireNodeClicked

Fires event nodeClicked to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

nodeRef any

Returns a node reference.

x int
y int

fireNodesPicked

Fires event nodesPicked to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

picked any[]

References of the nodes that are picked.

fireNodeZoomed

Fires event nodeZoomed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

zoomed any

Reference of the node that is zoomed.

isZoomIn boolean

True for zoom in, and false for zoom out.

fireProcedureFinished

Fires event procedureFinished to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireResize

Fires event resize to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

size object

Returns the width and height of new size \{ width: number, height: number \} in CSS pixels.

fireUrlClicked

Fires event urlClicked to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

nodeRef any

Returns a node reference of the note that contains the URL.

url string

Returns a URL that was clicked.

fireViewActivated

Fires event viewActivated to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

viewIndex int

Index of the activated view

view sap.ui.vk.View

The activated view

type string

The type of content loaded into the Viewport (for example: 2D, 3D).

fireViewFinished

Fires event viewFinished to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

viewIndex int

getAnnotations

Gets content of aggregation annotations.

HTML Annotations present in the active view

getBackgroundColorBottom

Gets current value of property backgroundColorBottom.

Viewport background bottom color in the CSS Color format

Default value is "rgba(255, 255, 255, 1)".

getBackgroundColorTop

Gets current value of property backgroundColorTop.

Viewport background top color in the CSS Color format

Default value is "rgba(50, 50, 50, 1)".

getCamera

Gets current camera to the viewport

getContent

Gets content of aggregation content.

The controls inside the viewport.

getContentConnector

ID of the element which is the current target of the association contentConnector, or null.

getDisableHotspotHovering

Gets current value of property disableHotspotHovering.

Disables hotspot hovering

Default value is false.

getFreezeCamera

Gets current value of property freezeCamera.

Freeze camera

Default value is false.

getHeight

Gets current value of property height.

Viewport height

Default value is "100%".

getHotspotColor

Gets current value of property hotspotColor.

Color used for highlighting hotspots in the CSS Color format

Default value is "rgba(89, 0, 0, 0.73)".

getHotspotColorABGR

Gets current value of property hotspotColorABGR.

Color used for highlighting hotspots in the ABGR format

Default value is 0x590000BB.

getKeepOutputSize

Gets current value of property keepOutputSize.

Default value is false.

sap.ui.vk.ViewportBase.getMetadata

Returns a metadata object for class sap.ui.vk.ViewportBase.

getOutputSettings

Gets content of aggregation outputSettings.

Output size settings of the viewport

getRenderMode

Gets current value of property renderMode.

Viewport render mode

Default value is Default.

getSafeArea

Gets content of aggregation safeArea.

SafeArea control for viewport

getSelectionDisplayMode

Gets current value of property selectionDisplayMode.

Selection display mode

Default value is Highlight.

getSelectionMode

Gets current value of property selectionMode.

Selection mode

Default value is Sticky.

getShowAllHotspots

Gets current value of property showAllHotspots.

Enables or disables showing of all hotspots

Default value is false.

getShowAllHotspotsTintColor

Gets current value of property showAllHotspotsTintColor.

Color used to highlight all hotspots when the showAllHotspots property has a value of true.

Default value is "rgba(255, 255, 0, .35)".

getShowDebugInfo

Gets current value of property showDebugInfo.

Shows or hides the debug info.

Default value is false.

getShowSafeArea

Gets current value of property showSafeArea.

Shows or hides the Safe Area

Default value is false.

getShowSelectionBoundingBoxes

Gets current value of property showSelectionBoundingBoxes.

Show selection bounding boxes

Default value is true.

getTools

Returns array of IDs of the elements which are the current targets of the association tools.

getViewStateManager

ID of the element which is the current target of the association viewStateManager, or null.

getWidth

Gets current value of property width.

Viewport width

Default value is "100%".

indexOfAnnotation

Checks for the provided sap.ui.vk.Annotation in the aggregation annotations. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAnnotation sap.ui.vk.Annotation

The annotation whose index is looked for

indexOfContent

Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content whose index is looked for

insertAnnotation

Inserts a annotation into the aggregation annotations.

Param Type DefaultValue Description
oAnnotation sap.ui.vk.Annotation

The annotation to insert; if empty, nothing is inserted

iIndex int

The 0-based index the annotation should be inserted at; for a negative value of iIndex, the annotation is inserted at position 0; for a value greater than the current size of the aggregation, the annotation is inserted at the last position

insertContent

Inserts a content into the aggregation content.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content to insert; if empty, nothing is inserted

iIndex int

The 0-based index the content should be inserted at; for a negative value of iIndex, the content is inserted at position 0; for a value greater than the current size of the aggregation, the content is inserted at the last position

pan

Performs a pan gesture to pan across the Viewport.

Param Type DefaultValue Description
dx int

The change in distance along the x-coordinate.

dy int

The change in distance along the y-coordinate.

removeAllAnnotations

Removes all the controls from the aggregation annotations.

Additionally, it unregisters them from the hosting UIArea.

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeAllTools

Removes all the controls in the association named tools.

removeAnnotation

Removes a annotation from the aggregation annotations.

Param Type DefaultValue Description
vAnnotation int string sap.ui.vk.Annotation

The annotation to remove or its index or id

removeContent

Removes a content from the aggregation content.

Param Type DefaultValue Description
vContent int string sap.ui.core.Control

The content to remove or its index or id

removeTool

Removes an tool from the association named tools.

Param Type DefaultValue Description
vTool int sap.ui.core.ID sap.ui.vk.tools.Tool

The tool to be removed or its index or ID

renderContent

Renders viewport content.

Param Type DefaultValue Description
rm sap.ui.core.RenderManager

the RenderManager that can be used for writing to the Render-Output-Buffer

renderTools

Renders viewport tools.

Param Type DefaultValue Description
rm sap.ui.core.RenderManager

the RenderManager that can be used for writing to the Render-Output-Buffer

rotate

Rotates the content resource displayed on the Viewport.

Param Type DefaultValue Description
dx int

The change in x-coordinate used to define the desired rotation.

dy int

The change in y-coordinate used to define the desired rotation.

setBackgroundColorBottom

Sets a new value for property backgroundColorBottom.

Viewport background bottom color in the CSS Color format

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

Default value is "rgba(255, 255, 255, 1)".

Param Type DefaultValue Description
sBackgroundColorBottom sap.ui.core.CSSColor "rgba(255, 255, 255, 1)"

New value for property backgroundColorBottom

setBackgroundColorTop

Sets a new value for property backgroundColorTop.

Viewport background top color in the CSS Color format

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

Default value is "rgba(50, 50, 50, 1)".

Param Type DefaultValue Description
sBackgroundColorTop sap.ui.core.CSSColor "rgba(50, 50, 50, 1)"

New value for property backgroundColorTop

setCamera

Sets current camera to the viewport

Param Type DefaultValue Description
camera sap.ui.vk.Camera

If the camera parameter is not null, the camera is replaced. If the camera parameter is null, the current camera is destroyed.

setContentConnector

Sets the associated contentConnector.

Param Type DefaultValue Description
oContentConnector sap.ui.core.ID sap.ui.vk.ContentConnector

ID of an element which becomes the new target of this contentConnector association; alternatively, an element instance may be given

setDisableHotspotHovering

Sets a new value for property disableHotspotHovering.

Disables hotspot hovering

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

Default value is false.

Param Type DefaultValue Description
bDisableHotspotHovering boolean false

New value for property disableHotspotHovering

setFreezeCamera

Sets a new value for property freezeCamera.

Freeze camera

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

Default value is false.

Param Type DefaultValue Description
bFreezeCamera boolean false

New value for property freezeCamera

setHeight

Sets a new value for property height.

Viewport height

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

Default value is "100%".

Param Type DefaultValue Description
sHeight sap.ui.core.CSSSize "100%"

New value for property height

setHotspotColor

Sets a new value for property hotspotColor.

Color used for highlighting hotspots in the CSS Color format

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

Default value is "rgba(89, 0, 0, 0.73)".

Param Type DefaultValue Description
sHotspotColor sap.ui.core.CSSColor "rgba(89, 0, 0, 0.73)"

New value for property hotspotColor

setHotspotColorABGR

Sets a new value for property hotspotColorABGR.

Color used for highlighting hotspots in the ABGR format

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

Default value is 0x590000BB.

Param Type DefaultValue Description
iHotspotColorABGR int 0x590000BB

New value for property hotspotColorABGR

setKeepOutputSize

Sets a new value for property keepOutputSize.

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

Default value is false.

Param Type DefaultValue Description
bKeepOutputSize boolean false

New value for property keepOutputSize

setOutputSettings

Sets the aggregated outputSettings.

Param Type DefaultValue Description
oOutputSettings sap.ui.vk.OutputSettings

The outputSettings to set

setRenderMode

Sets a new value for property renderMode.

Viewport render mode

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

Default value is Default.

Param Type DefaultValue Description
sRenderMode sap.ui.vk.RenderMode Default

New value for property renderMode

setSafeArea

Sets the aggregated safeArea.

Param Type DefaultValue Description
oSafeArea sap.ui.vk.SafeArea

The safeArea to set

setSelectionDisplayMode

Sets a new value for property selectionDisplayMode.

Selection display mode

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

Default value is Highlight.

Param Type DefaultValue Description
sSelectionDisplayMode sap.ui.vk.SelectionDisplayMode Highlight

New value for property selectionDisplayMode

setSelectionMode

Sets a new value for property selectionMode.

Selection mode

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

Default value is Sticky.

Param Type DefaultValue Description
sSelectionMode sap.ui.vk.SelectionMode Sticky

New value for property selectionMode

setShowAllHotspots

Sets a new value for property showAllHotspots.

Enables or disables showing of all hotspots

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

Default value is false.

Param Type DefaultValue Description
bShowAllHotspots boolean false

New value for property showAllHotspots

setShowAllHotspotsTintColor

Sets a new value for property showAllHotspotsTintColor.

Color used to highlight all hotspots when the showAllHotspots property has a value of true.

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

Default value is "rgba(255, 255, 0, .35)".

Param Type DefaultValue Description
sShowAllHotspotsTintColor sap.ui.core.CSSColor "rgba(255, 255, 0, .35)"

New value for property showAllHotspotsTintColor

setShowDebugInfo

Sets a new value for property showDebugInfo.

Shows or hides the debug info.

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

Default value is false.

Param Type DefaultValue Description
bShowDebugInfo boolean false

New value for property showDebugInfo

setShowSafeArea

Sets a new value for property showSafeArea.

Shows or hides the Safe Area

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

Default value is false.

Param Type DefaultValue Description
bShowSafeArea boolean false

New value for property showSafeArea

setShowSelectionBoundingBoxes

Sets a new value for property showSelectionBoundingBoxes.

Show selection bounding boxes

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

Default value is true.

Param Type DefaultValue Description
bShowSelectionBoundingBoxes boolean true

New value for property showSelectionBoundingBoxes

setViewStateManager

Sets the associated viewStateManager.

Param Type DefaultValue Description
oViewStateManager sap.ui.core.ID sap.ui.vk.ViewStateManagerBase

ID of an element which becomes the new target of this viewStateManager association; alternatively, an element instance may be given

setWidth

Sets a new value for property width.

Viewport width

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

Default value is "100%".

Param Type DefaultValue Description
sWidth sap.ui.core.CSSSize "100%"

New value for property width

stickySelectionHandler

Helper method to provide "sticky" selection method. If this method is used then nodes are added into selection if they were not selected before, otherwise they are removed from selection. If this is called with empty nodes list then all already selected nodes are deselected.

Param Type DefaultValue Description
nodes any[]

Array of node references

zoom

Performs a zoom gesture to zoom in or out on the beginGesture coordinate.

Param Type DefaultValue Description
dy float

Zoom factor. A scale factor that specifies how much to zoom in or out by.