Class sap.ui.commons.layout.AbsoluteLayoutModule: sap/ui/commons/layout/AbsoluteLayout

extends Control

The Absolute Layout positions its child controls absolutely

Deprecated API:Since version 1.38.

Constructor Summary
new sap.ui.commons.layout.AbsoluteLayout(sId?, mSettings?)Constructor for a new layout/AbsoluteLayout.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.commons.layout.AbsoluteLayout.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.layout.AbsoluteLayout with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.layout.AbsoluteLayout.getMetadata()Returns a metadata object for class sap.ui.commons.layout.AbsoluteLayout.
addContent(oContent, oPos)Adds the given control and a corresponding position container into the aggregation named 'positions'.
addPosition(oPosition)Adds some position to the aggregation positions.
destroyContent()Destroys all aggregated position containers and their child controls.
destroyPositions()Destroys all the positions in the aggregation positions.
getContent()Returns an array of the controls contained in the aggregated position containers (might be empty).
getHeight()Gets current value of property height.
getHorizontalScrolling()Gets current value of property horizontalScrolling.
getPositions()Gets content of aggregation positions.
getVerticalScrolling()Gets current value of property verticalScrolling.
getWidth()Gets current value of property width.
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregated position containers, and returns the index of the container in the positions aggregation if found, or '-1' otherwise.
indexOfPosition(oPosition)Checks for the provided sap.ui.commons.layout.PositionContainer in the aggregation positions.
insertContent(oContent, iIndex, oPos)Inserts the given control and a corresponding position container into the aggregation named 'positions'.
insertPosition(oPosition, iIndex)Inserts a position into the aggregation positions.
removeAllContent()Removes all aggregated position containers.
removeAllPositions()Removes all the controls from the aggregation positions.
removeContent(oContent)Removes the given control and its corresponding position container from the aggregation named 'positions'.
removePosition(vPosition)Removes a position from the aggregation positions.
setHeight(sHeight)Sets a new value for property height.
setHorizontalScrolling(sHorizontalScrolling)Sets a new value for property horizontalScrolling.
setPositionOfChild(oControl, oPos)Allows to set or change the position information of the given child control
setVerticalScrolling(sVerticalScrolling)Sets a new value for property verticalScrolling.
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.ui.commons.layout.AbsoluteLayout(sId?, mSettings?)
Constructor for a new layout/AbsoluteLayout.

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
    • positions : sap.ui.commons.layout.PositionContainer[] (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
Deprecated:
Since version 1.38.
Method Detail
sap.ui.commons.layout.AbsoluteLayout.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.layout.AbsoluteLayout 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.commons.layout.AbsoluteLayout.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.layout.AbsoluteLayout.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addContent(oContent, oPos): sap.ui.commons.layout.AbsoluteLayout
Adds the given control and a corresponding position container into the aggregation named 'positions'. Returns 'this' to allow method chaining.
Parameters:
{sap.ui.core.Control}oContent The content to add; if empty, nothing is inserted.
{object}oPos JSON-like object which defines the position of the child control in the layout. The object is expected to have one or more from the attribute set top, bottom, left, right; each with a value of type sap.ui.core.CSSSize. If no object is given, the default is left=0px,right=0px
Returns:
{sap.ui.commons.layout.AbsoluteLayout}
addPosition(oPosition): sap.ui.commons.layout.AbsoluteLayout
Adds some position to the aggregation positions.
Parameters:
{sap.ui.commons.layout.PositionContainer}oPosition the position to add; if empty, nothing is inserted
Returns:
{sap.ui.commons.layout.AbsoluteLayout} Reference to this in order to allow method chaining
Destroys all aggregated position containers and their child controls. Returns 'this' to allow method chaining.
Returns:
{sap.ui.commons.layout.AbsoluteLayout}
Destroys all the positions in the aggregation positions.
Returns:
{sap.ui.commons.layout.AbsoluteLayout} Reference to this in order to allow method chaining
getContent(): sap.ui.core.Control[]
Returns an array of the controls contained in the aggregated position containers (might be empty).
Returns:
{sap.ui.core.Control[]}
getHeight(): sap.ui.core.CSSSize
Gets current value of property height.

The overall height of the control. When not set, 100% is automatically set.

Default value is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property height
getHorizontalScrolling(): sap.ui.core.Scrolling
Gets current value of property horizontalScrolling.

'Auto', 'Scroll', 'Hidden', and 'None' are the available values for setting the vertical scrolling mode.

Default value is Hidden.

Returns:
{sap.ui.core.Scrolling} Value of property horizontalScrolling
Gets content of aggregation positions.

Positioned child controls within the layout

Returns:
{sap.ui.commons.layout.PositionContainer[]}
getVerticalScrolling(): sap.ui.core.Scrolling
Gets current value of property verticalScrolling.

'Auto', 'Scroll', 'Hidden', and 'None' are the available values for setting the vertical scrolling mode.

Default value is Hidden.

Returns:
{sap.ui.core.Scrolling} Value of property verticalScrolling
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

The overall width of the control. When not set, 100% is automatically set.

Default value is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property width
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Control in the aggregated position containers, and returns the index of the container in the positions aggregation if found, or '-1' otherwise.
Parameters:
{sap.ui.core.Control}oContent The content of which the index is looked for
Returns:
{int}
indexOfPosition(oPosition): int
Checks for the provided sap.ui.commons.layout.PositionContainer in the aggregation positions. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.commons.layout.PositionContainer}oPosition The position whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertContent(oContent, iIndex, oPos): sap.ui.commons.layout.AbsoluteLayout
Inserts the given control and a corresponding position container into the aggregation named 'positions'. Returns 'this' to allow method chaining.
Parameters:
{sap.ui.core.Control}oContent The content to insert; if empty, nothing is inserted
{int}iIndex The '0'-based index where the content shall 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.
{object}oPos JSON-like object which defines the position of the child control within the layout. The object is expected to have one or more from the attribute set top, bottom, left, right; each with a value of type sap.ui.core.CSSSize. If no object is given, the default is left=0px,right=0px.
Returns:
{sap.ui.commons.layout.AbsoluteLayout}
insertPosition(oPosition, iIndex): sap.ui.commons.layout.AbsoluteLayout
Inserts a position into the aggregation positions.
Parameters:
{sap.ui.commons.layout.PositionContainer}oPosition the position to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the position should be inserted at; for a negative value of iIndex, the position is inserted at position 0; for a value greater than the current size of the aggregation, the position is inserted at the last position
Returns:
{sap.ui.commons.layout.AbsoluteLayout} Reference to this in order to allow method chaining
removeAllContent(): sap.ui.core.Control[]
Removes all aggregated position containers. Returns an array of the controls contained in the removed position containers (might be empty).
Returns:
{sap.ui.core.Control[]}
Removes all the controls from the aggregation positions.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.commons.layout.PositionContainer[]} An array of the removed elements (might be empty)
removeContent(oContent): sap.ui.core.Control
Removes the given control and its corresponding position container from the aggregation named 'positions'.
Parameters:
{object}oContent The content control to remove, its ID, or the index of the corresponding position container in the 'positions' aggregation.
Returns:
{sap.ui.core.Control}
removePosition(vPosition): sap.ui.commons.layout.PositionContainer
Removes a position from the aggregation positions.
Parameters:
{int|string|sap.ui.commons.layout.PositionContainer}vPosition The positionto remove or its index or id
Returns:
{sap.ui.commons.layout.PositionContainer} The removed position or null
Sets a new value for property height.

The overall height of the control. When not set, 100% is automatically set.

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

Default value is 100%.

Parameters:
{sap.ui.core.CSSSize}sHeight New value for property height
Returns:
{sap.ui.commons.layout.AbsoluteLayout} Reference to this in order to allow method chaining
setHorizontalScrolling(sHorizontalScrolling): sap.ui.commons.layout.AbsoluteLayout
Sets a new value for property horizontalScrolling.

'Auto', 'Scroll', 'Hidden', and 'None' are the available values for setting the vertical scrolling mode.

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

Default value is Hidden.

Parameters:
{sap.ui.core.Scrolling}sHorizontalScrolling New value for property horizontalScrolling
Returns:
{sap.ui.commons.layout.AbsoluteLayout} Reference to this in order to allow method chaining
setPositionOfChild(oControl, oPos): boolean
Allows to set or change the position information of the given child control
Parameters:
{sap.ui.core.Control}oControl The child control for which to change the position information; if empty or not aggregated, nothing is changed
{object}oPos JSON-like object which defines the position of the child control. The object is expected to have one or more from the attribute set top, bottom, left, right; each with a value of type sap.ui.core.CSSSize. If no object is given, the default is used which is left=0px,right=0px.
Returns:
{boolean}
setVerticalScrolling(sVerticalScrolling): sap.ui.commons.layout.AbsoluteLayout
Sets a new value for property verticalScrolling.

'Auto', 'Scroll', 'Hidden', and 'None' are the available values for setting the vertical scrolling mode.

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

Default value is Hidden.

Parameters:
{sap.ui.core.Scrolling}sVerticalScrolling New value for property verticalScrolling
Returns:
{sap.ui.commons.layout.AbsoluteLayout} Reference to this in order to allow method chaining
Sets a new value for property width.

The overall width of the control. When not set, 100% is automatically set.

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

Default value is 100%.

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