class sap.ui.ux3.Overlay

Control sample: sap.ui.ux3.Overlay
Visiblity: public
UX Guidelines:
Implements: sap.ui.core.PopupInterface
Available since: N/A
Module: sap/ui/ux3/Overlay
Application Component: CA-UI5-CTR

Overlay Control


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.ux3.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
closeButtonVisible boolean true

Defines whether the 'Close' button shall be visible.

Visibility: public
openButtonVisible boolean true

Defines whether the 'Open' button shall be visible.

Visibility: public

Events Overview

Event Description
close

Event is fired when the Overlay starts closing.

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

closed

Event is fired when the Overlay is closed.

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

open

Event is fired when the Overlay is opened.

openNew

Event is fired when the 'Open' button of the Overlay is clicked.

close

Event is fired when the Overlay starts closing.

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

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

The ID of the Overlay instance.

closed

Event is fired when the Overlay is closed.

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

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

The ID of the Overlay instance.

open

Event is fired when the Overlay is opened.

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

The ID of the Overlay instance

openNew

Event is fired when the 'Open' button of the Overlay is clicked.

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

The ID of the Overlay instance.


Methods Overview

Method Description
attachClose

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.

attachClosed

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.

attachOpen

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.

attachOpenNew

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.

close

Closes the Overlay.

detachClose

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.

detachClosed

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.

detachOpen

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.

detachOpenNew

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.

sap.ui.ux3.Overlay.extend

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.

fireClose

Fires event close to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireClosed

Fires event closed to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireOpen

Fires event open to attached listeners.

fireOpenNew

Fires event openNew to attached listeners.

getCloseButtonVisible

Gets current value of property closeButtonVisible.

Defines whether the 'Close' button shall be visible.

Default value is true.

sap.ui.ux3.Overlay.getMetadata

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

getOpenButtonVisible

Gets current value of property openButtonVisible.

Defines whether the 'Open' button shall be visible.

Default value is true.

isOpen

Checks whether Overlay is open.

open

Opens the Overlay.

setCloseButtonVisible

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.

setOpenButtonVisible

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.

attachClose

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.

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

attachClosed

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.

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

attachOpen

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.

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

attachOpenNew

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.

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

close

Closes the Overlay.

detachClose

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.

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

detachClosed

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.

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

detachOpen

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.

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

detachOpenNew

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.

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.ux3.Overlay.extend

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.

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

fireClose

Fires event close to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

id string

The ID of the Overlay instance.

fireClosed

Fires event closed to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

id string

The ID of the Overlay instance.

fireOpen

Fires event open to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

id string

The ID of the Overlay instance

fireOpenNew

Fires event openNew to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

id string

The ID of the Overlay instance.

getCloseButtonVisible

Gets current value of property closeButtonVisible.

Defines whether the 'Close' button shall be visible.

Default value is true.

sap.ui.ux3.Overlay.getMetadata

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

getOpenButtonVisible

Gets current value of property openButtonVisible.

Defines whether the 'Open' button shall be visible.

Default value is true.

isOpen

Checks whether Overlay is open.

open

Opens the Overlay.

Param Type DefaultValue Description
initialFocusId string

ID of the control that gets focused when the overlay is openend

setCloseButtonVisible

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.

Param Type DefaultValue Description
bCloseButtonVisible boolean true

New value for property closeButtonVisible

setOpenButtonVisible

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.

Param Type DefaultValue Description
bOpenButtonVisible boolean true

New value for property openButtonVisible