class sap.ui.commons.layout.MatrixLayoutCell

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

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


Constructor

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#constructor for a general description of the syntax of the settings object.

new sap.ui.commons.layout.MatrixLayoutCell(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
backgroundDesign sap.ui.commons.layout.BackgroundDesign Transparent

Determines the matrix layout cell's background design.

Visibility: public
colSpan int 1

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

Visibility: public
hAlign sap.ui.commons.layout.HAlign Begin

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

Visibility: public
padding sap.ui.commons.layout.Padding End

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.

Visibility: public
rowSpan int 1

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.

Visibility: public
separation sap.ui.commons.layout.Separation None

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

Visibility: public
vAlign sap.ui.commons.layout.VAlign Middle

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

Visibility: public

Aggregations

Default Aggregation: content

Name Cardinality Type Description
content (default) 0..n sap.ui.core.Control

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.


Methods Overview

Method Description
addContent

Adds some content to the aggregation content.

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

destroyContent

Destroys all the content in the aggregation content.

sap.ui.commons.layout.MatrixLayoutCell.extend

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.

getBackgroundDesign

Gets current value of property backgroundDesign.

Determines the matrix layout cell's background design.

Default value is 'Transparent'.

getColSpan

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.

getContent

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.

getHAlign

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'.

sap.ui.commons.layout.MatrixLayoutCell.getMetadata

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

getPadding

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'.

getRowSpan

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.

getSeparation

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'.

getVAlign

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'.

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().

indexOfContent

Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.

insertContent

Inserts a content into the aggregation content.

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

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

setBackgroundDesign

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'.

setColSpan

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.

setHAlign

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'.

setPadding

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'.

setRowSpan

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.

setSeparation

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'.

setVAlign

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'.

addContent

Adds some content to the aggregation content.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content 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

destroyContent

Destroys all the content in the aggregation content.

sap.ui.commons.layout.MatrixLayoutCell.extend

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.

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

getBackgroundDesign

Gets current value of property backgroundDesign.

Determines the matrix layout cell's background design.

Default value is 'Transparent'.

getColSpan

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.

getContent

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.

getHAlign

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'.

sap.ui.commons.layout.MatrixLayoutCell.getMetadata

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

getPadding

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'.

getRowSpan

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.

getSeparation

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'.

getVAlign

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'.

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

indexOfContent

Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content whose index is looked for

insertContent

Inserts a content into the aggregation content.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content to insert; if empty, nothing is inserted

iIndex int

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

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

Param Type DefaultValue Description
vContent int string sap.ui.core.Control

The content 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

setBackgroundDesign

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'.

Param Type DefaultValue Description
sBackgroundDesign sap.ui.commons.layout.BackgroundDesign 'Transparent'

New value for property backgroundDesign

setColSpan

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.

Param Type DefaultValue Description
iColSpan int 1

New value for property colSpan

setHAlign

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'.

Param Type DefaultValue Description
sHAlign sap.ui.commons.layout.HAlign 'Begin'

New value for property hAlign

setPadding

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'.

Param Type DefaultValue Description
sPadding sap.ui.commons.layout.Padding 'End'

New value for property padding

setRowSpan

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.

Param Type DefaultValue Description
iRowSpan int 1

New value for property rowSpan

setSeparation

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'.

Param Type DefaultValue Description
sSeparation sap.ui.commons.layout.Separation 'None'

New value for property separation

setVAlign

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'.

Param Type DefaultValue Description
sVAlign sap.ui.commons.layout.VAlign 'Middle'

New value for property vAlign