class sap.ui.vk.Overlay

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

Constructor for a new Overlay.


Constructor

Constructor for a new Overlay.

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

id for the new control, generated automatically if no id is given

mSettings? object

initial settings for the new control


Properties

Name Type Default Value Description
zoomOnResize boolean true Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
areas 0..n sap.ui.vk.OverlayArea

Aggregation of Highlight Areas.


Associations

Name Cardinality Type Description
target 0..1 sap.ui.core.Control

Aggregation of Highlight Areas.


Events Overview

Event Description
click

Raised when the Control is clicked.

contextMenu

Raised when the Control is right clicked/longPress(tap and hold).

click

Raised when the Control is clicked.

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

Client coordinate X

clientY int

Client coordinate Y

pos string

Coordinates of click position in format "x;y;0"

contextMenu

Raised when the Control is right clicked/longPress(tap and hold).

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

Coordinates of click position in format "x;y;0"

menu sap.ui.unified.Menu

Menu to open


Methods Overview

Method Description
addArea

Adds some area to the aggregation areas.

attachClick

Attaches event handler fnFunction to the click event of this sap.ui.vk.Overlay.

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.Overlay itself.

Raised when the Control is clicked.

attachContextMenu

Attaches event handler fnFunction to the contextMenu event of this sap.ui.vk.Overlay.

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.Overlay itself.

Raised when the Control is right clicked/longPress(tap and hold).

destroyAreas

Destroys all the areas in the aggregation areas.

detachClick

Detaches event handler fnFunction from the click event of this sap.ui.vk.Overlay.

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

detachContextMenu

Detaches event handler fnFunction from the contextMenu event of this sap.ui.vk.Overlay.

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

sap.ui.vk.Overlay.extend

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

fireClick

Fires event click to attached listeners.

fireContextMenu

Fires event contextMenu to attached listeners.

getAreas

Gets content of aggregation areas.

Aggregation of Highlight Areas.

sap.ui.vk.Overlay.getMetadata

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

getPositionInteractive

Trigger the interactive creation mode to get a position or position array.

getTarget

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

getZoomOnResize

Gets current value of property zoomOnResize.

Default value is true.

indexOfArea

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

insertArea

Inserts a area into the aggregation areas.

openContextMenu

open the context menu

removeAllAreas

Removes all the controls from the aggregation areas.

Additionally, it unregisters them from the hosting UIArea.

removeArea

Removes a area from the aggregation areas.

reset

Reset the Overlay to its initial size and position.

setPanAndZoom

Pan and Zoom for the Overlay. The offsets nDeltaX and nDeltaY are applied to the current center position. If zooming is involved as well the offsets are applied after the zooming.

setTarget

Sets the associated target.

setZoomOnResize

Sets a new value for property zoomOnResize.

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

Default value is true.

addArea

Adds some area to the aggregation areas.

Param Type DefaultValue Description
oArea sap.ui.vk.OverlayArea

The area to add; if empty, nothing is inserted

attachClick

Attaches event handler fnFunction to the click event of this sap.ui.vk.Overlay.

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.Overlay itself.

Raised when the Control 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.Overlay itself

attachContextMenu

Attaches event handler fnFunction to the contextMenu event of this sap.ui.vk.Overlay.

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.Overlay itself.

Raised when the Control is right clicked/longPress(tap and hold).

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.Overlay itself

destroyAreas

Destroys all the areas in the aggregation areas.

detachClick

Detaches event handler fnFunction from the click event of this sap.ui.vk.Overlay.

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

detachContextMenu

Detaches event handler fnFunction from the contextMenu event of this sap.ui.vk.Overlay.

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

sap.ui.vk.Overlay.extend

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

fireClick

Fires event click to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

clientX int

Client coordinate X

clientY int

Client coordinate Y

pos string

Coordinates of click position in format "x;y;0"

fireContextMenu

Fires event contextMenu to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

pos string

Coordinates of click position in format "x;y;0"

menu sap.ui.unified.Menu

Menu to open

getAreas

Gets content of aggregation areas.

Aggregation of Highlight Areas.

sap.ui.vk.Overlay.getMetadata

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

getPositionInteractive

Trigger the interactive creation mode to get a position or position array.

Param Type DefaultValue Description
bPosArray boolean

Indicator if a single position or an array is requested

callback function

Callback function func( sPosArray ) to be called when done. Position(array) sPosArray is provided in format "x;y;0;..."

getTarget

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

getZoomOnResize

Gets current value of property zoomOnResize.

Default value is true.

indexOfArea

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

Param Type DefaultValue Description
oArea sap.ui.vk.OverlayArea

The area whose index is looked for

insertArea

Inserts a area into the aggregation areas.

Param Type DefaultValue Description
oArea sap.ui.vk.OverlayArea

The area to insert; if empty, nothing is inserted

iIndex int

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

openContextMenu

open the context menu

Param Type DefaultValue Description
oMenu object

the context menu to be opened

removeAllAreas

Removes all the controls from the aggregation areas.

Additionally, it unregisters them from the hosting UIArea.

removeArea

Removes a area from the aggregation areas.

Param Type DefaultValue Description
vArea int string sap.ui.vk.OverlayArea

The area to remove or its index or id

reset

Reset the Overlay to its initial size and position.

setPanAndZoom

Pan and Zoom for the Overlay. The offsets nDeltaX and nDeltaY are applied to the current center position. If zooming is involved as well the offsets are applied after the zooming.

Param Type DefaultValue Description
nDeltaX int

the move of the center in x-direction in pixels

nDeltaY int

the move of the center in y-direction in pixels

fZoom float

the zoom factor to apply to the current state

setTarget

Sets the associated target.

Param Type DefaultValue Description
oTarget sap.ui.core.ID sap.ui.core.Control

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

setZoomOnResize

Sets a new value for property zoomOnResize.

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
bZoomOnResize boolean true

New value for property zoomOnResize