Class sap.ui.commons.layout.PositionContainerModule: sap/ui/commons/layout/PositionContainer

extends Element

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

Constructor Summary
new sap.ui.commons.layout.PositionContainer(sId?, mSettings?)Constructor for a new layout/PositionContainer.
Method Summary
sap.ui.commons.layout.PositionContainer.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.layout.PositionContainer with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.layout.PositionContainer.getMetadata()Returns a metadata object for class sap.ui.commons.layout.PositionContainer.
destroyControl()Destroys the control in the aggregation control.
getBottom()Gets current value of property bottom.
getCenterHorizontally()Gets current value of property centerHorizontally.
getCenterVertically()Gets current value of property centerVertically.
getControl()Gets content of aggregation control.
getLeft()Gets current value of property left.
getRight()Gets current value of property right.
getTop()Gets current value of property top.
setBottom(sBottom)Sets a new value for property bottom.
setCenterHorizontally(bCenterHorizontally)Sets a new value for property centerHorizontally.
setCenterVertically(bCenterVertically)Sets a new value for property centerVertically.
setControl(oControl)Sets the aggregated control.
setLeft(sLeft)Sets a new value for property left.
setRight(sRight)Sets a new value for property right.
setTop(sTop)Sets a new value for property top.
updatePosition(oPos)Updates the position properties of the container according to the given position in JSON style.
Constructor Detail
new sap.ui.commons.layout.PositionContainer(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Element 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.commons.layout.PositionContainer.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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.PositionContainer.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.layout.PositionContainer.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Destroys the control in the aggregation control.
Returns:
{sap.ui.commons.layout.PositionContainer} Reference to this in order to allow method chaining
getBottom(): sap.ui.core.CSSSize
Gets current value of property bottom.

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

Returns:
{sap.ui.core.CSSSize} Value of property bottom
getCenterHorizontally(): boolean
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.

Returns:
{boolean} Value of property centerHorizontally
getCenterVertically(): boolean
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.

Returns:
{boolean} Value of property centerVertically
getControl(): sap.ui.core.Control
Gets content of aggregation control.

Child control of the position container

Returns:
{sap.ui.core.Control}
Gets current value of property left.

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

Returns:
{sap.ui.core.CSSSize} Value of property left
getRight(): sap.ui.core.CSSSize
Gets current value of property right.

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

Returns:
{sap.ui.core.CSSSize} Value of property right
Gets current value of property top.

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

Returns:
{sap.ui.core.CSSSize} Value of property top
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.

Parameters:
{sap.ui.core.CSSSize}sBottom New value for property bottom
Returns:
{sap.ui.commons.layout.PositionContainer} Reference to this in order to allow method chaining
setCenterHorizontally(bCenterHorizontally): sap.ui.commons.layout.PositionContainer
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.

Parameters:
{boolean}bCenterHorizontally New value for property centerHorizontally
Returns:
{sap.ui.commons.layout.PositionContainer} Reference to this in order to allow method chaining
setCenterVertically(bCenterVertically): sap.ui.commons.layout.PositionContainer
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.

Parameters:
{boolean}bCenterVertically New value for property centerVertically
Returns:
{sap.ui.commons.layout.PositionContainer} Reference to this in order to allow method chaining
Sets the aggregated control.
Parameters:
{sap.ui.core.Control}oControl The control to set
Returns:
{sap.ui.commons.layout.PositionContainer} Reference to this in order to allow method chaining
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.

Parameters:
{sap.ui.core.CSSSize}sLeft New value for property left
Returns:
{sap.ui.commons.layout.PositionContainer} Reference to this in order to allow method chaining
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.

Parameters:
{sap.ui.core.CSSSize}sRight New value for property right
Returns:
{sap.ui.commons.layout.PositionContainer} Reference to this in order to allow method chaining
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.

Parameters:
{sap.ui.core.CSSSize}sTop New value for property top
Returns:
{sap.ui.commons.layout.PositionContainer} Reference to this in order to allow method chaining
updatePosition(oPos): void
Updates the position properties of the container according to the given position in JSON style.
Parameters:
{object}oPos 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.