class sap.ui.commons.layout.MatrixLayoutRow

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

Non-control element used as part of a matrix layout's inner structure.


Constructor

Constructor for a new layout/MatrixLayoutRow.

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.commons.layout.MatrixLayoutRow(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
height sap.ui.core.CSSSize

Height of the row.

Visibility: public

Aggregations

Default Aggregation: cells

Name Cardinality Type Description
cells (default) 0..n sap.ui.commons.layout.MatrixLayoutCell

The matrix layout row's individual cells.


Methods Overview

Method Description
addCell

Adds some cell to the aggregation cells.

addStyleClass

The string given as "sStyleClass" will be added to the "class" attribute of this element's root HTML element.

This method is intended to be used to mark controls as being of a special type for which special styling can be provided using CSS selectors that reference this style class name.

Example:
myButton.addStyleClass("myRedTextButton"); // add a CSS class to one button instance

...and in CSS:
.myRedTextButton {
color: red;
}

This will add the CSS class "myRedTextButton" to the Button HTML and the CSS code above will then make the text in this particular button red.

Only characters allowed inside HTML attributes are allowed. Quotes are not allowed and this method will ignore any strings containing quotes. Strings containing spaces are interpreted as ONE custom style class (even though CSS selectors interpret them as different classes) and can only removed later by calling removeStyleClass() with exactly the same (space-containing) string as parameter. Multiple calls with the same sStyleClass will have no different effect than calling once. If sStyleClass is null, the call is ignored.

Returns this to allow method chaining

destroyCells

Destroys all the cells in the aggregation cells.

sap.ui.commons.layout.MatrixLayoutRow.extend

Creates a new subclass of class sap.ui.commons.layout.MatrixLayoutRow 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.Element.extend.

getCells

Gets content of aggregation cells.

The matrix layout row's individual cells.

getHeight

Gets current value of property height.

Height of the row.

sap.ui.commons.layout.MatrixLayoutRow.getMetadata

Returns a metadata object for class sap.ui.commons.layout.MatrixLayoutRow.

hasStyleClass

Returns true if the given style class string is valid and if this Element has this style class set via a previous call to addStyleClass().

indexOfCell

Checks for the provided sap.ui.commons.layout.MatrixLayoutCell in the aggregation cells. and returns its index if found or -1 otherwise.

insertCell

Inserts a cell into the aggregation cells.

removeAllCells

Removes all the controls from the aggregation cells.

Additionally, it unregisters them from the hosting UIArea.

removeCell

Removes a cell from the aggregation cells.

removeStyleClass

Removes the given string from the list of custom style classes that have been set previously. Regular style classes like "sapUiBtn" cannot be removed.

Returns this to allow method chaining

setHeight

Sets a new value for property height.

Height of the row.

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

addCell

Adds some cell to the aggregation cells.

Param Type DefaultValue Description
oCell sap.ui.commons.layout.MatrixLayoutCell

The cell to add; if empty, nothing is inserted

addStyleClass

The string given as "sStyleClass" will be added to the "class" attribute of this element's root HTML element.

This method is intended to be used to mark controls as being of a special type for which special styling can be provided using CSS selectors that reference this style class name.

Example:
myButton.addStyleClass("myRedTextButton"); // add a CSS class to one button instance

...and in CSS:
.myRedTextButton {
color: red;
}

This will add the CSS class "myRedTextButton" to the Button HTML and the CSS code above will then make the text in this particular button red.

Only characters allowed inside HTML attributes are allowed. Quotes are not allowed and this method will ignore any strings containing quotes. Strings containing spaces are interpreted as ONE custom style class (even though CSS selectors interpret them as different classes) and can only removed later by calling removeStyleClass() with exactly the same (space-containing) string as parameter. Multiple calls with the same sStyleClass will have no different effect than calling once. If sStyleClass is null, the call is ignored.

Returns this to allow method chaining

Param Type DefaultValue Description
sStyleClass string

the CSS class name to be added

destroyCells

Destroys all the cells in the aggregation cells.

sap.ui.commons.layout.MatrixLayoutRow.extend

Creates a new subclass of class sap.ui.commons.layout.MatrixLayoutRow 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.Element.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

getCells

Gets content of aggregation cells.

The matrix layout row's individual cells.

getHeight

Gets current value of property height.

Height of the row.

sap.ui.commons.layout.MatrixLayoutRow.getMetadata

Returns a metadata object for class sap.ui.commons.layout.MatrixLayoutRow.

hasStyleClass

Returns true if the given style class string is valid and if this Element has this style class set via a previous call to addStyleClass().

Param Type DefaultValue Description
sStyleClass string

the style to check for

indexOfCell

Checks for the provided sap.ui.commons.layout.MatrixLayoutCell in the aggregation cells. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oCell sap.ui.commons.layout.MatrixLayoutCell

The cell whose index is looked for

insertCell

Inserts a cell into the aggregation cells.

Param Type DefaultValue Description
oCell sap.ui.commons.layout.MatrixLayoutCell

The cell to insert; if empty, nothing is inserted

iIndex int

The 0-based index the cell should be inserted at; for a negative value of iIndex, the cell is inserted at position 0; for a value greater than the current size of the aggregation, the cell is inserted at the last position

removeAllCells

Removes all the controls from the aggregation cells.

Additionally, it unregisters them from the hosting UIArea.

removeCell

Removes a cell from the aggregation cells.

Param Type DefaultValue Description
vCell int string sap.ui.commons.layout.MatrixLayoutCell

The cell to remove or its index or id

removeStyleClass

Removes the given string from the list of custom style classes that have been set previously. Regular style classes like "sapUiBtn" cannot be removed.

Returns this to allow method chaining

Param Type DefaultValue Description
sStyleClass string

the style to be removed

setHeight

Sets a new value for property height.

Height of the row.

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

Param Type DefaultValue Description
sHeight sap.ui.core.CSSSize

New value for property height