Constructor for a new Overlay.
Experimental API:Since 1.32.0 This class is experimental and might be modified or removed in future versions.
Event Summary
click(oControlEvent)Raised when the Control is clicked. contextMenu(oControlEvent)Raised when the Control is right clicked/longPress(tap and hold). Method Summary
sap.ui.vk.Overlay.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vk.Overlay with name sClassName and enriches it with the information contained in oClassInfo. addArea(oArea)Adds some area to the aggregation areas. attachClick(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the click event of this sap.ui.vk.Overlay. attachContextMenu(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the contextMenu event of this sap.ui.vk.Overlay. destroyAreas()Destroys all the areas in the aggregation areas. detachClick(fnFunction, oListener)Detaches event handler fnFunction from the click event of this sap.ui.vk.Overlay. detachContextMenu(fnFunction, oListener)Detaches event handler fnFunction from the contextMenu event of this sap.ui.vk.Overlay. fireClick(mArguments?)Fires event click to attached listeners. getAreas()Gets content of aggregation areas. getPositionInteractive(bPosArray, callback)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. indexOfArea(oArea)Checks for the provided sap.ui.vk.OverlayArea in the aggregation areas. insertArea(oArea, iIndex)Inserts a area into the aggregation areas. removeArea(vArea)Removes a area from the aggregation areas. reset()Reset the Overlay to its initial size and position. setPanAndZoom(nDeltaX, nDeltaY, fZoom)Pan and Zoom for the Overlay. setTarget(oTarget)Sets the associated target. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty Constructor Detail
new sap.ui.vk.Overlay(sId?, mSettings?)
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 for a general description of the syntax of the settings object.
The supported settings are:
- Properties
- Aggregations
- areas : sap.ui.vk.OverlayArea[]
- Events
- click : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- contextMenu : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
Parameters:
| {string} | sId? | id for the new control, generated automatically if no id is given |
| {object} | mSettings? | initial settings for the new control |
Event Detail
click(oControlEvent)
Raised when the Control is clicked.
Parameters:
| {sap.ui.base.Event} | oControlEvent | |
| {sap.ui.base.EventProvider} | oControlEvent.getSource | |
| {object} | oControlEvent.getParameters | |
| {int} | oControlEvent.getParameters.clientX | Client coordinate X |
| {int} | oControlEvent.getParameters.clientY | Client coordinate Y |
| {string} | oControlEvent.getParameters.pos | Coordinates of click position in format "x;y;0" |
contextMenu(oControlEvent)
Raised when the Control is right clicked/longPress(tap and hold).
Parameters:
Method Detail
sap.ui.vk.Overlay.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.
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 |
Returns a metadata object for class sap.ui.vk.Overlay.
Returns:
Adds some area to the aggregation areas.
Parameters:
Returns:
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.
Parameters:
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vk.Overlay itself |
Returns:
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).
Parameters:
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vk.Overlay itself |
Returns:
Destroys all the areas in the aggregation areas.
Returns:
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.
Parameters:
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
Returns:
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.
Parameters:
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
Returns:
Fires event
click to attached listeners.
Expects the following event parameters:
clientX of type intClient coordinate XclientY of type intClient coordinate Ypos of type stringCoordinates of click position in format "x;y;0"
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
contextMenu to attached listeners.
Expects the following event parameters:
pos of type stringCoordinates of click position in format "x;y;0"menu of type sap.ui.unified.MenuMenu to open
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Gets content of aggregation
areas.
Aggregation of Highlight Areas.
Returns:
getPositionInteractive(bPosArray, callback): boolean
Trigger the interactive creation mode to get a position or position array.
Experimental API:Since 1.32.0 This method is experimental and might be modified or removerd in future versions.
Parameters:
| {boolean} | bPosArray | Indicator if a single position or an array is requested |
| {function} | callback | Callback function func( sPosArray ) to be called when done. Position(array) sPosArray is provided in format "x;y;0;..." |
- Experimental:
- Since 1.32.0 This method is experimental and might be modified or removerd in future versions.
Returns:
| {boolean} | Indicator whether the creation mode could be triggered successfully or not. |
ID of the element which is the current target of the association target, or null.
Returns:
getZoomOnResize(): boolean
Gets current value of property
zoomOnResize.
Default value is true.
Returns:
| {boolean} | Value of property zoomOnResize |
indexOfArea(oArea): int
Checks for the provided sap.ui.vk.OverlayArea in the aggregation areas. and returns its index if found or -1 otherwise.
Parameters:
Returns:
| {int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a area into the aggregation areas.
Parameters:
| {sap.ui.vk.OverlayArea} | oArea | the area to insert; if empty, nothing is inserted |
| {int} | iIndex | 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 |
Returns:
openContextMenu(oMenu): void
open the context menu
Parameters:
| {object} | oMenu | the context menu to be opened |
Removes all the controls from the aggregation
areas.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a area from the aggregation areas.
Parameters:
Returns:
Reset the Overlay to its initial size and position.
Returns:
setPanAndZoom(nDeltaX, nDeltaY, fZoom): void
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.
Parameters:
| {int} | nDeltaX | the move of the center in x-direction in pixels |
| {int} | nDeltaY | the move of the center in y-direction in pixels |
| {float} | fZoom | the zoom factor to apply to the current state |
Sets the associated target.
Parameters:
| {sap.ui.core.Control} | oTarget | Id of an element which becomes the new target of this target association; alternatively, an element instance may be given |
Returns:
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.
Parameters:
| {boolean} | bZoomOnResize | New value for property zoomOnResize |
Returns: