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:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated 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.MetadataMetadata 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.ControloContentThe content to add; if empty, nothing is inserted.
objectoPosJSON-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.PositionContaineroPositionthe position to add; if empty, nothing is inserted
Returns:
sap.ui.commons.layout.AbsoluteLayoutReference 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.AbsoluteLayoutReference 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.CSSSizeValue 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.ScrollingValue 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.ScrollingValue 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.CSSSizeValue 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.ControloContentThe 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.PositionContaineroPositionThe position whose index is looked for
Returns:
intThe 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.ControloContentThe content to insert; if empty, nothing is inserted
intiIndexThe '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.
objectoPosJSON-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.PositionContaineroPositionthe position to insert; if empty, nothing is inserted
intiIndexthe 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.AbsoluteLayoutReference 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:
objectoContentThe 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.PositionContainervPositionThe position to remove or its index or id
Returns:
sap.ui.commons.layout.PositionContainerThe 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.CSSSizesHeightNew value for property height
Returns:
sap.ui.commons.layout.AbsoluteLayoutReference 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.ScrollingsHorizontalScrollingNew value for property horizontalScrolling
Returns:
sap.ui.commons.layout.AbsoluteLayoutReference 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.ControloControlThe child control for which to change the position information; if empty or not aggregated, nothing is changed
objectoPosJSON-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.ScrollingsVerticalScrollingNew value for property verticalScrolling
Returns:
sap.ui.commons.layout.AbsoluteLayoutReference 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.CSSSizesWidthNew value for property width
Returns:
sap.ui.commons.layout.AbsoluteLayoutReference to this in order to allow method chaining