class sap.ui.layout.cssgrid.GridResponsiveLayout

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/layout/cssgrid/GridResponsiveLayout
Application Component: CA-UI5-CTR

Applies a sap.ui.layout.cssgrid.GridSettings to a provided DOM element or Control. Have to possibility to hold multiple sap.ui.layout.cssgrid.GridSettings and apply the currently active GridSettings.


Constructor

Constructor for a new GridResponsiveLayout.

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.layout.cssgrid.GridResponsiveLayout(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
containerQuery boolean false

If set to true, the current range (large, medium or small) is defined by the size of the container surrounding the CSSGrid instead of the device screen size (media Query).

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
layout 0..1 sap.ui.layout.cssgrid.GridSettings

The sap.ui.layout.cssgrid.GridSettings applied if no settings are provided for a specific size

layoutL 0..1 sap.ui.layout.cssgrid.GridSettings

The sap.ui.layout.cssgrid.GridSettings applied for size "L"

layoutM 0..1 sap.ui.layout.cssgrid.GridSettings

The sap.ui.layout.cssgrid.GridSettings applied for size "M"

layoutS 0..1 sap.ui.layout.cssgrid.GridSettings

The sap.ui.layout.cssgrid.GridSettings applied for size "S"

layoutXL 0..1 sap.ui.layout.cssgrid.GridSettings

The sap.ui.layout.cssgrid.GridSettings applied for size "XL"


Events Overview

Event Description
layoutChange

Fired when the currently active GridSettings changes

layoutChange

Fired when the currently active GridSettings changes

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

The name of the newly active layout aggregation


Methods Overview

Method Description
attachLayoutChange

Attaches event handler fnFunction to the layoutChange event of this sap.ui.layout.cssgrid.GridResponsiveLayout.

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.layout.cssgrid.GridResponsiveLayout itself.

Fired when the currently active GridSettings changes

destroyLayout

Destroys the layout in the aggregation layout.

destroyLayoutL

Destroys the layoutL in the aggregation layoutL.

destroyLayoutM

Destroys the layoutM in the aggregation layoutM.

destroyLayoutS

Destroys the layoutS in the aggregation layoutS.

destroyLayoutXL

Destroys the layoutXL in the aggregation layoutXL.

detachLayoutChange

Detaches event handler fnFunction from the layoutChange event of this sap.ui.layout.cssgrid.GridResponsiveLayout.

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

sap.ui.layout.cssgrid.GridResponsiveLayout.extend

Creates a new subclass of class sap.ui.layout.cssgrid.GridResponsiveLayout 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.layout.cssgrid.GridLayoutBase.extend.

fireLayoutChange

Fires event layoutChange to attached listeners.

getContainerQuery

Gets current value of property containerQuery.

If set to true, the current range (large, medium or small) is defined by the size of the container surrounding the CSSGrid instead of the device screen size (media Query).

Default value is false.

getLayout

Gets content of aggregation layout.

The sap.ui.layout.cssgrid.GridSettings applied if no settings are provided for a specific size

getLayoutL

Gets content of aggregation layoutL.

The sap.ui.layout.cssgrid.GridSettings applied for size "L"

getLayoutM

Gets content of aggregation layoutM.

The sap.ui.layout.cssgrid.GridSettings applied for size "M"

getLayoutS

Gets content of aggregation layoutS.

The sap.ui.layout.cssgrid.GridSettings applied for size "S"

getLayoutXL

Gets content of aggregation layoutXL.

The sap.ui.layout.cssgrid.GridSettings applied for size "XL"

sap.ui.layout.cssgrid.GridResponsiveLayout.getMetadata

Returns a metadata object for class sap.ui.layout.cssgrid.GridResponsiveLayout.

setContainerQuery

Sets a new value for property containerQuery.

If set to true, the current range (large, medium or small) is defined by the size of the container surrounding the CSSGrid instead of the device screen size (media Query).

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

Default value is false.

setLayout

Sets the aggregated layout.

setLayoutL

Sets the aggregated layoutL.

setLayoutM

Sets the aggregated layoutM.

setLayoutS

Sets the aggregated layoutS.

setLayoutXL

Sets the aggregated layoutXL.

attachLayoutChange

Attaches event handler fnFunction to the layoutChange event of this sap.ui.layout.cssgrid.GridResponsiveLayout.

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.layout.cssgrid.GridResponsiveLayout itself.

Fired when the currently active GridSettings changes

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.layout.cssgrid.GridResponsiveLayout itself

destroyLayout

Destroys the layout in the aggregation layout.

destroyLayoutL

Destroys the layoutL in the aggregation layoutL.

destroyLayoutM

Destroys the layoutM in the aggregation layoutM.

destroyLayoutS

Destroys the layoutS in the aggregation layoutS.

destroyLayoutXL

Destroys the layoutXL in the aggregation layoutXL.

detachLayoutChange

Detaches event handler fnFunction from the layoutChange event of this sap.ui.layout.cssgrid.GridResponsiveLayout.

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.layout.cssgrid.GridResponsiveLayout.extend

Creates a new subclass of class sap.ui.layout.cssgrid.GridResponsiveLayout 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.layout.cssgrid.GridLayoutBase.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

fireLayoutChange

Fires event layoutChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

layout string

The name of the newly active layout aggregation

getContainerQuery

Gets current value of property containerQuery.

If set to true, the current range (large, medium or small) is defined by the size of the container surrounding the CSSGrid instead of the device screen size (media Query).

Default value is false.

getLayout

Gets content of aggregation layout.

The sap.ui.layout.cssgrid.GridSettings applied if no settings are provided for a specific size

getLayoutL

Gets content of aggregation layoutL.

The sap.ui.layout.cssgrid.GridSettings applied for size "L"

getLayoutM

Gets content of aggregation layoutM.

The sap.ui.layout.cssgrid.GridSettings applied for size "M"

getLayoutS

Gets content of aggregation layoutS.

The sap.ui.layout.cssgrid.GridSettings applied for size "S"

getLayoutXL

Gets content of aggregation layoutXL.

The sap.ui.layout.cssgrid.GridSettings applied for size "XL"

sap.ui.layout.cssgrid.GridResponsiveLayout.getMetadata

Returns a metadata object for class sap.ui.layout.cssgrid.GridResponsiveLayout.

setContainerQuery

Sets a new value for property containerQuery.

If set to true, the current range (large, medium or small) is defined by the size of the container surrounding the CSSGrid instead of the device screen size (media Query).

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

Default value is false.

Param Type DefaultValue Description
bContainerQuery boolean false

New value for property containerQuery

setLayout

Sets the aggregated layout.

Param Type DefaultValue Description
oLayout sap.ui.layout.cssgrid.GridSettings

The layout to set

setLayoutL

Sets the aggregated layoutL.

Param Type DefaultValue Description
oLayoutL sap.ui.layout.cssgrid.GridSettings

The layoutL to set

setLayoutM

Sets the aggregated layoutM.

Param Type DefaultValue Description
oLayoutM sap.ui.layout.cssgrid.GridSettings

The layoutM to set

setLayoutS

Sets the aggregated layoutS.

Param Type DefaultValue Description
oLayoutS sap.ui.layout.cssgrid.GridSettings

The layoutS to set

setLayoutXL

Sets the aggregated layoutXL.

Param Type DefaultValue Description
oLayoutXL sap.ui.layout.cssgrid.GridSettings

The layoutXL to set