Class sap.ui.layout.BlockLayoutCellModule: sap/ui/layout/BlockLayoutCell

extends Control

The BlockLayoutCell is used as an aggregation of the BlockLayoutRow. It contains Controls. The BlockLayoutCell should be used only as aggregation of the BlockLayoutRow.


Since: 1.34.
Constructor Summary
new sap.ui.layout.BlockLayoutCell(sId?, mSettings?)Constructor for a new BlockLayoutCell.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.layout.BlockLayoutCell.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.layout.BlockLayoutCell with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.layout.BlockLayoutCell.getMetadata()Returns a metadata object for class sap.ui.layout.BlockLayoutCell.
addContent(oContent)Adds some content to the aggregation content.
destroyContent()Destroys all the content in the aggregation content.
getContent()Gets content of aggregation content.
getTitle()Gets current value of property title.
getTitleAlignment()Gets current value of property titleAlignment.
getTitleLevel()Gets current value of property titleLevel.
getWidth()Gets current value of property width.
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.
setTitle(sTitle)Sets a new value for property title.
setTitleAlignment(sTitleAlignment)Sets a new value for property titleAlignment.
setTitleLevel(sTitleLevel)Sets a new value for property titleLevel.
Constructor Detail
new sap.ui.layout.BlockLayoutCell(sId?, mSettings?)
Constructor for a new BlockLayoutCell.

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
    • content : sap.ui.core.Control[] (default)

In addition, all settings applicable to the base type sap.ui.core.Control 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
Method Detail
sap.ui.layout.BlockLayoutCell.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.layout.BlockLayoutCell 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.Control.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.layout.BlockLayoutCell.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.layout.BlockLayoutCell.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addContent(oContent): sap.ui.layout.BlockLayoutCell
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.layout.BlockLayoutCell} Reference to this in order to allow method chaining
Destroys all the content in the aggregation content.
Returns:
{sap.ui.layout.BlockLayoutCell} Reference to this in order to allow method chaining
getContent(): sap.ui.core.Control[]
Gets content of aggregation content.

The content to be included inside the cell

Returns:
{sap.ui.core.Control[]}
getTitle(): string
Gets current value of property title.

Defines the title of the cell

Returns:
{string} Value of property title
getTitleAlignment(): sap.ui.core.HorizontalAlign
Gets current value of property titleAlignment.

Defines the alignment of the cell title

Default value is Begin.

Returns:
{sap.ui.core.HorizontalAlign} Value of property titleAlignment
getTitleLevel(): sap.ui.core.TitleLevel
Gets current value of property titleLevel.

Defines the aria level of the title This information is e.g. used by assistive technologies like screenreaders to create a hierarchical site map for faster navigation.

Default value is Auto.

Returns:
{sap.ui.core.TitleLevel} Value of property titleLevel
getWidth(): int
Gets current value of property width.

Defines the width of the cell. Depending on the context of the cell - whether it's in scrollable, or non scrollable row, this property is interpreted in two different ways. If the cell is placed inside a scrollable row - this property defines the width of the cell in percentages. If no value is provided - the default is 40%. If the cell is placed inside a non scrollable row - this property defines the grow factor of the cell compared to the whole row. For example: If you have 2 cells, each with width of 1, this means that they should be of equal size, and they need to fill the whole row. This results in 50% width for each cell. If you have 2 cells, one with width of 1, the other with width of 3, this means that the whole row width is 4, so the first cell will have a width of 25%, the second - 75%. According to the visual guidelines, it is suggested that you only use 25%, 50%, 75% or 100% cells in you applications. For example, 12,5% width is not desirable (1 cell with width 1, and another with width 7)

Default value is 0.

Returns:
{int} Value of property width
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.layout.BlockLayoutCell
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.layout.BlockLayoutCell} 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
Sets a new value for property title.

Defines the title of the cell

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

Parameters:
{string}sTitle New value for property title
Returns:
{sap.ui.layout.BlockLayoutCell} Reference to this in order to allow method chaining
setTitleAlignment(sTitleAlignment): sap.ui.layout.BlockLayoutCell
Sets a new value for property titleAlignment.

Defines the alignment of the cell title

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.core.HorizontalAlign}sTitleAlignment New value for property titleAlignment
Returns:
{sap.ui.layout.BlockLayoutCell} Reference to this in order to allow method chaining
setTitleLevel(sTitleLevel): sap.ui.layout.BlockLayoutCell
Sets a new value for property titleLevel.

Defines the aria level of the title This information is e.g. used by assistive technologies like screenreaders to create a hierarchical site map for faster navigation.

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

Default value is Auto.

Parameters:
{sap.ui.core.TitleLevel}sTitleLevel New value for property titleLevel
Returns:
{sap.ui.layout.BlockLayoutCell} Reference to this in order to allow method chaining