Class sap.ui.ux3.OverlayModule: sap/ui/ux3/Overlay

extends Control
implements PopupInterface
known direct subclasses: OverlayContainer, OverlayDialog, ThingInspector

Overlay Control

Deprecated API:Since version 1.38.

Constructor Summary
new sap.ui.ux3.Overlay(sId?, mSettings?)Constructor for a new Overlay.
Event Summary
close(oControlEvent)Event is fired when the Overlay starts closing.
closed(oControlEvent)Event is fired when the Overlay is closed.
open(oControlEvent)Event is fired when the Overlay is opened.
openNew(oControlEvent)Event is fired when the 'Open' button of the Overlay is clicked.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.ux3.Overlay.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.Overlay with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.Overlay.getMetadata()Returns a metadata object for class sap.ui.ux3.Overlay.
attachClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the close event of this sap.ui.ux3.Overlay.
attachClosed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the closed event of this sap.ui.ux3.Overlay.
attachOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the open event of this sap.ui.ux3.Overlay.
attachOpenNew(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the openNew event of this sap.ui.ux3.Overlay.
close()Closes the Overlay.
detachClose(fnFunction, oListener)Detaches event handler fnFunction from the close event of this sap.ui.ux3.Overlay.
detachClosed(fnFunction, oListener)Detaches event handler fnFunction from the closed event of this sap.ui.ux3.Overlay.
detachOpen(fnFunction, oListener)Detaches event handler fnFunction from the open event of this sap.ui.ux3.Overlay.
detachOpenNew(fnFunction, oListener)Detaches event handler fnFunction from the openNew event of this sap.ui.ux3.Overlay.
fireClose(mArguments?)Fires event close to attached listeners.
fireClosed(mArguments?)Fires event closed to attached listeners.
fireOpen(mArguments?)Fires event open to attached listeners.
fireOpenNew(mArguments?)Fires event openNew to attached listeners.
getCloseButtonVisible()Gets current value of property closeButtonVisible.
getOpenButtonVisible()Gets current value of property openButtonVisible.
isOpen()Checks whether Overlay is open.
open(initialFocusId)Opens the Overlay.
setCloseButtonVisible(bCloseButtonVisible)Sets a new value for property closeButtonVisible.
setOpenButtonVisible(bOpenButtonVisible)Sets a new value for property openButtonVisible.
Constructor Detail
new sap.ui.ux3.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
  • Events
    • close : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • closed : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • openNew : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • open : 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
Deprecated:
Since version 1.38.
Event Detail
close(oControlEvent)
Event is fired when the Overlay starts closing.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.id The ID of the Overlay instance.
closed(oControlEvent)
Event is fired when the Overlay is closed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.id The ID of the Overlay instance.
open(oControlEvent)
Event is fired when the Overlay is opened.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.id The ID of the Overlay instance
openNew(oControlEvent)
Event is fired when the 'Open' button of the Overlay is clicked.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.id The ID of the Overlay instance.
Method Detail
sap.ui.ux3.Overlay.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.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
sap.ui.ux3.Overlay.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.Overlay.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachClose(oData?, fnFunction, oListener?): sap.ui.ux3.Overlay
Attaches event handler fnFunction to the close event of this sap.ui.ux3.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.ux3.Overlay itself.

Event is fired when the Overlay starts closing.

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.ux3.Overlay itself
Returns:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
attachClosed(oData?, fnFunction, oListener?): sap.ui.ux3.Overlay
Attaches event handler fnFunction to the closed event of this sap.ui.ux3.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.ux3.Overlay itself.

Event is fired when the Overlay is closed.

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.ux3.Overlay itself
Returns:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
attachOpen(oData?, fnFunction, oListener?): sap.ui.ux3.Overlay
Attaches event handler fnFunction to the open event of this sap.ui.ux3.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.ux3.Overlay itself.

Event is fired when the Overlay is opened.

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.ux3.Overlay itself
Returns:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
attachOpenNew(oData?, fnFunction, oListener?): sap.ui.ux3.Overlay
Attaches event handler fnFunction to the openNew event of this sap.ui.ux3.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.ux3.Overlay itself.

Event is fired when the 'Open' button of the Overlay 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.ux3.Overlay itself
Returns:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
close()
Closes the Overlay.
detachClose(fnFunction, oListener): sap.ui.ux3.Overlay
Detaches event handler fnFunction from the close event of this sap.ui.ux3.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:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
detachClosed(fnFunction, oListener): sap.ui.ux3.Overlay
Detaches event handler fnFunction from the closed event of this sap.ui.ux3.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:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
detachOpen(fnFunction, oListener): sap.ui.ux3.Overlay
Detaches event handler fnFunction from the open event of this sap.ui.ux3.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:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
detachOpenNew(fnFunction, oListener): sap.ui.ux3.Overlay
Detaches event handler fnFunction from the openNew event of this sap.ui.ux3.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:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
fireClose(mArguments?): boolean
Fires event close to attached listeners.

Listeners may prevent the default action of this event by using the preventDefault-method on the event object.

Expects the following event parameters:

  • id of type stringThe ID of the Overlay instance.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{boolean} Whether or not to prevent the default action
fireClosed(mArguments?): boolean
Fires event closed to attached listeners.

Listeners may prevent the default action of this event by using the preventDefault-method on the event object.

Expects the following event parameters:

  • id of type stringThe ID of the Overlay instance.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{boolean} Whether or not to prevent the default action
fireOpen(mArguments?): sap.ui.ux3.Overlay
Fires event open to attached listeners.

Expects the following event parameters:

  • id of type stringThe ID of the Overlay instance
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
fireOpenNew(mArguments?): sap.ui.ux3.Overlay
Fires event openNew to attached listeners.

Expects the following event parameters:

  • id of type stringThe ID of the Overlay instance.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
getCloseButtonVisible(): boolean
Gets current value of property closeButtonVisible.

Defines whether the 'Close' button shall be visible.

Default value is true.

Returns:
{boolean} Value of property closeButtonVisible
getOpenButtonVisible(): boolean
Gets current value of property openButtonVisible.

Defines whether the 'Open' button shall be visible.

Default value is true.

Returns:
{boolean} Value of property openButtonVisible
isOpen(): boolean
Checks whether Overlay is open.
Returns:
{boolean}
open(initialFocusId)
Opens the Overlay.
Parameters:
{string}initialFocusId ID of the control that gets focused when the overlay is openend
setCloseButtonVisible(bCloseButtonVisible): sap.ui.ux3.Overlay
Sets a new value for property closeButtonVisible.

Defines whether the 'Close' button shall be visible.

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

Default value is true.

Parameters:
{boolean}bCloseButtonVisible New value for property closeButtonVisible
Returns:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining
setOpenButtonVisible(bOpenButtonVisible): sap.ui.ux3.Overlay
Sets a new value for property openButtonVisible.

Defines whether the 'Open' button shall be visible.

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

Default value is true.

Parameters:
{boolean}bOpenButtonVisible New value for property openButtonVisible
Returns:
{sap.ui.ux3.Overlay} Reference to this in order to allow method chaining