class sap.ui.commons.layout.PositionContainer

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

Is used to specify the position of a control in the AbsoluteLayout


Constructor

Constructor for a new layout/PositionContainer.

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.PositionContainer(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
bottom sap.ui.core.CSSSize

Defines the distance to the bottom of the layout (as specified in HTML)

Visibility: public
centerHorizontally boolean false

Indicates whether this container shall be centered horizontally within the AbsoluteLayout area. The values of the attributes left and right are ignored when this feature is activated.

Visibility: public
centerVertically boolean false

Indicates whether this container should be centered vertically within the AbsoluteLayout area. The values of the attributes top and bottom are ignored when this feature is activated.

Visibility: public
left sap.ui.core.CSSSize

Defines the distance to the left of the layout (as specified in HTML)

Visibility: public
right sap.ui.core.CSSSize

Defines the distance to the right of the layout (as specified in HTML)

Visibility: public
top sap.ui.core.CSSSize

Defines the distance to the top of the layout (as specified in HTML)

Visibility: public

Aggregations

Default Aggregation: control

Name Cardinality Type Description
control (default) 0..1 sap.ui.core.Control

Child control of the position container


Methods Overview

Method Description
destroyControl

Destroys the control in the aggregation control.

sap.ui.commons.layout.PositionContainer.extend

Creates a new subclass of class sap.ui.commons.layout.PositionContainer 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.

getBottom

Gets current value of property bottom.

Defines the distance to the bottom of the layout (as specified in HTML)

getCenterHorizontally

Gets current value of property centerHorizontally.

Indicates whether this container shall be centered horizontally within the AbsoluteLayout area. The values of the attributes left and right are ignored when this feature is activated.

Default value is false.

getCenterVertically

Gets current value of property centerVertically.

Indicates whether this container should be centered vertically within the AbsoluteLayout area. The values of the attributes top and bottom are ignored when this feature is activated.

Default value is false.

getControl

Gets content of aggregation control.

Child control of the position container

getLeft

Gets current value of property left.

Defines the distance to the left of the layout (as specified in HTML)

sap.ui.commons.layout.PositionContainer.getMetadata

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

getRight

Gets current value of property right.

Defines the distance to the right of the layout (as specified in HTML)

getTop

Gets current value of property top.

Defines the distance to the top of the layout (as specified in HTML)

setBottom

Sets a new value for property bottom.

Defines the distance to the bottom of the layout (as specified in HTML)

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

setCenterHorizontally

Sets a new value for property centerHorizontally.

Indicates whether this container shall be centered horizontally within the AbsoluteLayout area. The values of the attributes left and right are ignored when this feature is activated.

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

Default value is false.

setCenterVertically

Sets a new value for property centerVertically.

Indicates whether this container should be centered vertically within the AbsoluteLayout area. The values of the attributes top and bottom are ignored when this feature is activated.

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

Default value is false.

setControl

Sets the aggregated control.

setLeft

Sets a new value for property left.

Defines the distance to the left of the layout (as specified in HTML)

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

setRight

Sets a new value for property right.

Defines the distance to the right of the layout (as specified in HTML)

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

setTop

Sets a new value for property top.

Defines the distance to the top of the layout (as specified in HTML)

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

updatePosition

Updates the position properties of the container according to the given position in JSON style.

destroyControl

Destroys the control in the aggregation control.

sap.ui.commons.layout.PositionContainer.extend

Creates a new subclass of class sap.ui.commons.layout.PositionContainer 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

getBottom

Gets current value of property bottom.

Defines the distance to the bottom of the layout (as specified in HTML)

getCenterHorizontally

Gets current value of property centerHorizontally.

Indicates whether this container shall be centered horizontally within the AbsoluteLayout area. The values of the attributes left and right are ignored when this feature is activated.

Default value is false.

getCenterVertically

Gets current value of property centerVertically.

Indicates whether this container should be centered vertically within the AbsoluteLayout area. The values of the attributes top and bottom are ignored when this feature is activated.

Default value is false.

getControl

Gets content of aggregation control.

Child control of the position container

getLeft

Gets current value of property left.

Defines the distance to the left of the layout (as specified in HTML)

sap.ui.commons.layout.PositionContainer.getMetadata

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

getRight

Gets current value of property right.

Defines the distance to the right of the layout (as specified in HTML)

getTop

Gets current value of property top.

Defines the distance to the top of the layout (as specified in HTML)

setBottom

Sets a new value for property bottom.

Defines the distance to the bottom of the layout (as specified in HTML)

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

Param Type DefaultValue Description
sBottom sap.ui.core.CSSSize

New value for property bottom

setCenterHorizontally

Sets a new value for property centerHorizontally.

Indicates whether this container shall be centered horizontally within the AbsoluteLayout area. The values of the attributes left and right are ignored when this feature is activated.

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

Default value is false.

Param Type DefaultValue Description
bCenterHorizontally boolean false

New value for property centerHorizontally

setCenterVertically

Sets a new value for property centerVertically.

Indicates whether this container should be centered vertically within the AbsoluteLayout area. The values of the attributes top and bottom are ignored when this feature is activated.

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

Default value is false.

Param Type DefaultValue Description
bCenterVertically boolean false

New value for property centerVertically

setControl

Sets the aggregated control.

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

The control to set

setLeft

Sets a new value for property left.

Defines the distance to the left of the layout (as specified in HTML)

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

Param Type DefaultValue Description
sLeft sap.ui.core.CSSSize

New value for property left

setRight

Sets a new value for property right.

Defines the distance to the right of the layout (as specified in HTML)

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

Param Type DefaultValue Description
sRight sap.ui.core.CSSSize

New value for property right

setTop

Sets a new value for property top.

Defines the distance to the top of the layout (as specified in HTML)

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

Param Type DefaultValue Description
sTop sap.ui.core.CSSSize

New value for property top

updatePosition

Updates the position properties of the container according to the given position in JSON style.

Param Type DefaultValue Description
oPos object

JSON-like object which defines the position of the child control in the absolute layout. The object is expected to have one or more out of the attributes top, bottom, left, right (each with a value of type sap.ui.core.CSSSize). If no object is given, nothing is updated.