Class sap.ui.commons.layout.MatrixLayoutCellModule: sap/ui/commons/layout/MatrixLayoutCell

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.MatrixLayoutCell(sId?, mSettings?)Constructor for a new layout/MatrixLayoutCell.
Method Summary
sap.ui.commons.layout.MatrixLayoutCell.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.layout.MatrixLayoutCell with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.layout.MatrixLayoutCell.getMetadata()Returns a metadata object for class sap.ui.commons.layout.MatrixLayoutCell.
addContent(oContent)Adds some content to the aggregation content.
addStyleClass(sStyleClass)The string given as "sStyleClass" will be added to the "class" attribute of this element's root HTML element.
destroyContent()Destroys all the content in the aggregation content.
getBackgroundDesign()Gets current value of property backgroundDesign.
getColSpan()Gets current value of property colSpan.
getContent()Gets content of aggregation content.
getHAlign()Gets current value of property hAlign.
getPadding()Gets current value of property padding.
getRowSpan()Gets current value of property rowSpan.
getSeparation()Gets current value of property separation.
getVAlign()Gets current value of property vAlign.
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().
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregation content.
insertContent(oContent, iIndex)Inserts a content into the aggregation content.
removeAllContent()Removes all the controls from the aggregation content.
removeContent(vContent)Removes a content from the aggregation content.
removeStyleClass(sStyleClass)Removes the given string from the list of custom style classes that have been set previously.
setBackgroundDesign(sBackgroundDesign)Sets a new value for property backgroundDesign.
setColSpan(iColSpan)Sets a new value for property colSpan.
setHAlign(sHAlign)Sets a new value for property hAlign.
setPadding(sPadding)Sets a new value for property padding.
setRowSpan(iRowSpan)Sets a new value for property rowSpan.
setSeparation(sSeparation)Sets a new value for property separation.
setVAlign(sVAlign)Sets a new value for property vAlign.
Constructor Detail
new sap.ui.commons.layout.MatrixLayoutCell(sId?, mSettings?)
Constructor for a new layout/MatrixLayoutCell.

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
    • backgroundDesign : sap.ui.commons.layout.BackgroundDesign (default: Transparent)
    • colSpan : int (default: 1)
    • hAlign : sap.ui.commons.layout.HAlign (default: Begin)
    • padding : sap.ui.commons.layout.Padding (default: End)
    • rowSpan : int (default: 1)
    • separation : sap.ui.commons.layout.Separation (default: None)
    • vAlign : sap.ui.commons.layout.VAlign (default: Middle)
  • Aggregations
    • content : sap.ui.core.Control[] (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.MatrixLayoutCell.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.layout.MatrixLayoutCell 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.MatrixLayoutCell.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.layout.MatrixLayoutCell.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Adds some content to the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to add; if empty, nothing is inserted
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
addStyleClass(sStyleClass): sap.ui.commons.layout.MatrixLayoutCell
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.MatrixLayoutCell}
Destroys all the content in the aggregation content.
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
Gets current value of property backgroundDesign.

Determines the matrix layout cell's background design.

Default value is Transparent.

Returns:
{sap.ui.commons.layout.BackgroundDesign} Value of property backgroundDesign
getColSpan(): int
Gets current value of property colSpan.

Determines how many columns of the underlying grid structure are occupied by this matrix layout cell.

Default value is 1.

Returns:
{int} Value of property colSpan
getContent(): sap.ui.core.Control[]
Gets content of aggregation content.

The matrix layout cell's content (arbitrary controls).

If the matrix row has a defined height and the matrix has layoutFixed = true, the controls inside of a cell should all use the same unit for its height property.

Returns:
{sap.ui.core.Control[]}
Gets current value of property hAlign.

Determines the horizontal alignment of the matrix layout cell's content with the cell's borders.

Default value is Begin.

Returns:
{sap.ui.commons.layout.HAlign} Value of property hAlign
Gets current value of property padding.

Determines the padding of the matrix layout cell's content within the cell's borders. The default value is appropriate for all cells in a form-like layout. Consider to remove the padding on the outer layout in case of nesting.

Default value is End.

Returns:
{sap.ui.commons.layout.Padding} Value of property padding
getRowSpan(): int
Gets current value of property rowSpan.

Determines how many rows of the underlying grid structure are occupied by this matrix layout cell. In case a row-height is used, all rows affected by the RowSpan must have the same unit.

Default value is 1.

Returns:
{int} Value of property rowSpan
Gets current value of property separation.

Determines how a matrix layout cell is separated from its predecessor, via a vertical gutter of variable width, with or without a vertical line.

Default value is None.

Returns:
{sap.ui.commons.layout.Separation} Value of property separation
Gets current value of property vAlign.

Determines the vertical alignment of the matrix layout cell's content with the cell's borders.

Default value is Middle.

Returns:
{sap.ui.commons.layout.VAlign} Value of property vAlign
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}
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Control}oContent The content whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertContent(oContent, iIndex): sap.ui.commons.layout.MatrixLayoutCell
Inserts a content into the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the content should be inserted at; for a negative value of iIndex, the content is inserted at position 0; for a value greater than the current size of the aggregation, the content is inserted at the last position
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
removeAllContent(): sap.ui.core.Control[]
Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeContent(vContent): sap.ui.core.Control
Removes a content from the aggregation content.
Parameters:
{int|string|sap.ui.core.Control}vContent The contentto remove or its index or id
Returns:
{sap.ui.core.Control} The removed content or null
removeStyleClass(sStyleClass): sap.ui.commons.layout.MatrixLayoutCell
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.MatrixLayoutCell}
setBackgroundDesign(sBackgroundDesign): sap.ui.commons.layout.MatrixLayoutCell
Sets a new value for property backgroundDesign.

Determines the matrix layout cell's background design.

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

Default value is Transparent.

Parameters:
{sap.ui.commons.layout.BackgroundDesign}sBackgroundDesign New value for property backgroundDesign
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
Sets a new value for property colSpan.

Determines how many columns of the underlying grid structure are occupied by this matrix layout cell.

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

Default value is 1.

Parameters:
{int}iColSpan New value for property colSpan
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
Sets a new value for property hAlign.

Determines the horizontal alignment of the matrix layout cell's content with the cell's borders.

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

Default value is Begin.

Parameters:
{sap.ui.commons.layout.HAlign}sHAlign New value for property hAlign
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
Sets a new value for property padding.

Determines the padding of the matrix layout cell's content within the cell's borders. The default value is appropriate for all cells in a form-like layout. Consider to remove the padding on the outer layout in case of nesting.

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

Default value is End.

Parameters:
{sap.ui.commons.layout.Padding}sPadding New value for property padding
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
Sets a new value for property rowSpan.

Determines how many rows of the underlying grid structure are occupied by this matrix layout cell. In case a row-height is used, all rows affected by the RowSpan must have the same unit.

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

Default value is 1.

Parameters:
{int}iRowSpan New value for property rowSpan
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
setSeparation(sSeparation): sap.ui.commons.layout.MatrixLayoutCell
Sets a new value for property separation.

Determines how a matrix layout cell is separated from its predecessor, via a vertical gutter of variable width, with or without a vertical line.

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

Default value is None.

Parameters:
{sap.ui.commons.layout.Separation}sSeparation New value for property separation
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining
Sets a new value for property vAlign.

Determines the vertical alignment of the matrix layout cell's content with the cell's borders.

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

Default value is Middle.

Parameters:
{sap.ui.commons.layout.VAlign}sVAlign New value for property vAlign
Returns:
{sap.ui.commons.layout.MatrixLayoutCell} Reference to this in order to allow method chaining