Class sap.ui.commons.layout.MatrixLayoutRowModule: sap/ui/commons/layout/MatrixLayoutRow

extends Element

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

Deprecated API:Since version 1.38. Instead, use the sap.ui.layout.Grid control.

Constructor Summary
new sap.ui.commons.layout.MatrixLayoutRow(sId?, mSettings?)Constructor for a new layout/MatrixLayoutRow.
Method Summary
sap.ui.commons.layout.MatrixLayoutRow.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.layout.MatrixLayoutRow with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.layout.MatrixLayoutRow.getMetadata()Returns a metadata object for class sap.ui.commons.layout.MatrixLayoutRow.
addCell(oCell)Adds some cell to the aggregation cells.
addStyleClass(sStyleClass)The string given as "sStyleClass" will be added to the "class" attribute of this element's root HTML element.
destroyCells()Destroys all the cells in the aggregation cells.
getCells()Gets content of aggregation cells.
getHeight()Gets current value of property height.
hasStyleClass(sStyleClass)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(oCell)Checks for the provided sap.ui.commons.layout.MatrixLayoutCell in the aggregation cells.
insertCell(oCell, iIndex)Inserts a cell into the aggregation cells.
removeAllCells()Removes all the controls from the aggregation cells.
removeCell(vCell)Removes a cell from the aggregation cells.
removeStyleClass(sStyleClass)Removes the given string from the list of custom style classes that have been set previously.
setHeight(sHeight)Sets a new value for property height.
Constructor Detail
new sap.ui.commons.layout.MatrixLayoutRow(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

  • Properties
  • Aggregations
    • cells : sap.ui.commons.layout.MatrixLayoutCell[] (default)

In addition, all settings applicable to the base type sap.ui.core.Element 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. Instead, use the sap.ui.layout.Grid control.
Method Detail
sap.ui.commons.layout.MatrixLayoutRow.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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.commons.layout.MatrixLayoutRow.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.layout.MatrixLayoutRow.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Adds some cell to the aggregation cells.
Parameters:
{sap.ui.commons.layout.MatrixLayoutCell}oCell the cell to add; if empty, nothing is inserted
Returns:
{sap.ui.commons.layout.MatrixLayoutRow} Reference to this in order to allow method chaining
addStyleClass(sStyleClass): sap.ui.commons.layout.MatrixLayoutRow
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

Parameters:
{string}sStyleClass the CSS class name to be added
Returns:
{sap.ui.commons.layout.MatrixLayoutRow}
Destroys all the cells in the aggregation cells.
Returns:
{sap.ui.commons.layout.MatrixLayoutRow} Reference to this in order to allow method chaining
Gets content of aggregation cells.

The matrix layout row's individual cells.

Returns:
{sap.ui.commons.layout.MatrixLayoutCell[]}
getHeight(): sap.ui.core.CSSSize
Gets current value of property height.

Height of the row.

Returns:
{sap.ui.core.CSSSize} Value of property height
hasStyleClass(sStyleClass): boolean
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().
Parameters:
{string}sStyleClass the style to check for
Returns:
{boolean}
indexOfCell(oCell): int
Checks for the provided sap.ui.commons.layout.MatrixLayoutCell in the aggregation cells. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.commons.layout.MatrixLayoutCell}oCell The cell whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertCell(oCell, iIndex): sap.ui.commons.layout.MatrixLayoutRow
Inserts a cell into the aggregation cells.
Parameters:
{sap.ui.commons.layout.MatrixLayoutCell}oCell the cell to insert; if empty, nothing is inserted
{int}iIndex 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
Returns:
{sap.ui.commons.layout.MatrixLayoutRow} Reference to this in order to allow method chaining
Removes all the controls from the aggregation cells.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.commons.layout.MatrixLayoutCell[]} An array of the removed elements (might be empty)
Removes a cell from the aggregation cells.
Parameters:
{int|string|sap.ui.commons.layout.MatrixLayoutCell}vCell The cellto remove or its index or id
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} The removed cell or null
removeStyleClass(sStyleClass): sap.ui.commons.layout.MatrixLayoutRow
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

Parameters:
{string}sStyleClass the style to be removed
Returns:
{sap.ui.commons.layout.MatrixLayoutRow}
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.

Parameters:
{sap.ui.core.CSSSize}sHeight New value for property height
Returns:
{sap.ui.commons.layout.MatrixLayoutRow} Reference to this in order to allow method chaining