Constructor for a new Overlay.
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 |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
areas | 0..n | sap.ui.vk.OverlayArea |
Aggregation of Highlight Areas. |
Name | Cardinality | Type | Description |
---|---|---|---|
target | 0..1 | sap.ui.core.Control |
Aggregation of Highlight Areas. |
Event | Description |
---|---|
click |
Raised when the Control is clicked. |
contextMenu |
Raised when the Control is right clicked/longPress(tap and hold). |
Method | Description |
---|---|
addArea |
Adds some area to the aggregation areas. |
attachClick |
Attaches event handler When called, the context of the event handler (its Raised when the Control is clicked. |
attachContextMenu |
Attaches event handler When called, the context of the event handler (its Raised when the Control is right clicked/longPress(tap and hold). |
destroyAreas |
Destroys all the areas in the aggregation areas. |
detachClick |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachContextMenu |
Detaches event handler 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
|
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 |
getZoomOnResize |
Gets current value of property zoomOnResize. Default value is |
indexOfArea |
Checks for the provided |
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 |
setTarget |
Sets the associated target. |
setZoomOnResize |
Sets a new value for property zoomOnResize. When called with a value of Default value is |
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 |
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 |
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 |
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 |
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 |
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 |
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" |
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 |
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;..." |
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 |
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 |
open the context menu
Param | Type | DefaultValue | Description |
---|---|---|---|
oMenu | object |
the context menu to be opened |
Removes all the controls from the aggregation areas.
Additionally, it unregisters them from the hosting UIArea.
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 |
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 |
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 |
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 |