The Absolute Layout positions its child controls absolutely
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#constructor for a general description of the syntax of the settings object.
new sap.ui.commons.layout.AbsoluteLayout(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 |
Name | Type | Default Value | Description |
---|---|---|---|
height | sap.ui.core.CSSSize | 100% | The overall height of the control. When not set, 100% is automatically set. Visibility: public |
horizontalScrolling | sap.ui.core.Scrolling | Hidden | 'Auto', 'Scroll', 'Hidden', and 'None' are the available values for setting the vertical scrolling mode. Visibility: public |
verticalScrolling | sap.ui.core.Scrolling | Hidden | 'Auto', 'Scroll', 'Hidden', and 'None' are the available values for setting the vertical scrolling mode. Visibility: public |
width | sap.ui.core.CSSSize | 100% | The overall width of the control. When not set, 100% is automatically set. Visibility: public |
Default Aggregation: positions
Name | Cardinality | Type | Description |
---|---|---|---|
positions (default) | 0..n | sap.ui.commons.layout.PositionContainer |
Positioned child controls within the layout |
Method | Description |
---|---|
addContent |
Adds the given control and a corresponding position container into the aggregation named 'positions'. Returns 'this' to allow method chaining. |
addPosition |
Adds element to the layout. |
destroyContent |
Destroys all aggregated position containers and their child controls. Returns 'this' to allow method chaining. |
destroyPositions |
Destroys all elements from the layout. |
sap.ui.commons.layout.AbsoluteLayout.extend |
Creates a new subclass of class sap.ui.commons.layout.AbsoluteLayout with name
|
getContent |
Returns an array of the controls contained in the aggregated position containers (might be empty). |
getHeight |
Gets current value of property height. The overall height of the control. When not set, 100% is automatically set. Default value is |
getHorizontalScrolling |
Gets current value of property horizontalScrolling. 'Auto', 'Scroll', 'Hidden', and 'None' are the available values for setting the vertical scrolling mode. Default value is |
sap.ui.commons.layout.AbsoluteLayout.getMetadata |
Returns a metadata object for class sap.ui.commons.layout.AbsoluteLayout. |
getPositions |
Gets content of aggregation positions. Positioned child controls within the layout |
getVerticalScrolling |
Gets current value of property verticalScrolling. 'Auto', 'Scroll', 'Hidden', and 'None' are the available values for setting the vertical scrolling mode. Default value is |
getWidth |
Gets current value of property width. The overall width of the control. When not set, 100% is automatically set. Default value is |
indexOfContent |
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 |
Checks for the provided |
insertContent |
Inserts the given control and a corresponding position container into the aggregation named 'positions'. Returns 'this' to allow method chaining. |
insertPosition |
Inserts element to the layout on a specific index. |
removeAllContent |
Removes all aggregated position containers. Returns an array of the controls contained in the removed position containers (might be empty). |
removeAllPositions |
Removes all elements from the layout. |
removeContent |
Removes the given control and its corresponding position container from the aggregation named 'positions'. |
removePosition |
Removes element from the layout. |
setHeight |
Sets the |
setHorizontalScrolling |
Sets the |
setPositionOfChild |
Allows to set or change the position information of the given child control |
setVerticalScrolling |
Sets the |
setWidth |
Sets the |
Adds the given control and a corresponding position container into the aggregation named 'positions'. Returns 'this' to allow method chaining.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to add; if empty, nothing is inserted. |
|
oPos | object | \{left: "0px", right: "0px"\} |
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. |
Adds element to the layout.
Param | Type | DefaultValue | Description |
---|---|---|---|
oPosition | object |
Element which must be positioned in the layout. |
Destroys all aggregated position containers and their child controls. Returns 'this' to allow method chaining.
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.
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 |
Returns an array of the controls contained in the aggregated position containers (might be empty).
Gets current value of property height.
The overall height of the control. When not set, 100% is automatically set.
Default value is '100%'
.
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 a metadata object for class sap.ui.commons.layout.AbsoluteLayout.
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
.
Gets current value of property width.
The overall width of the control. When not set, 100% is automatically set.
Default value is '100%'
.
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content of which the index is looked for |
Checks for the provided sap.ui.commons.layout.PositionContainer
in the aggregation positions. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oPosition | sap.ui.commons.layout.PositionContainer |
The position whose index is looked for |
Inserts the given control and a corresponding position container into the aggregation named 'positions'. Returns 'this' to allow method chaining.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to insert; if empty, nothing is inserted |
|
iIndex | int |
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. |
|
oPos | object | \{left: "0px", right: "0px"\} |
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. |
Inserts element to the layout on a specific index.
Param | Type | DefaultValue | Description |
---|---|---|---|
oPosition | object |
Element which must be positioned in the layout. |
|
iIndex | int |
Index of the element which is to be positioned. |
Removes all aggregated position containers. Returns an array of the controls contained in the removed position containers (might be empty).
Removes the given control and its corresponding position container from the aggregation named 'positions'.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | object |
The content control to remove, its ID, or the index of the corresponding position container in the 'positions' aggregation. |
Removes element from the layout.
Param | Type | DefaultValue | Description |
---|---|---|---|
vPosition | any |
Element which must be removed from the positions element within the layout. |
Sets the height
property.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHeight | string |
The passed height of the control. |
Sets the horizontalScrolling
property.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHorizontalScrolling | object |
Object that contains settings for Horizontal scrolling. |
Allows to set or change the position information of the given child control
Param | Type | DefaultValue | Description |
---|---|---|---|
oControl | sap.ui.core.Control |
The child control for which to change the position information; if empty or not aggregated, nothing is changed |
|
oPos | object | \{left: "0px", right: "0px"\} |
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. |