Class sap.ui.commons.layout.BorderLayoutModule: sap/ui/commons/layout/BorderLayout

extends Control

Based upon the border layout as it comes with the Java standard. Using this layout, you are able to divide your available UI space into five areas whose sizes can be defined. These areas are: Top: Header; Bottom: Footer; Begin: Left/right-hand side panel; Center: Content area in the middle; End: Right/left-hand side panel.

Deprecated API:Since version 1.38. Instead, use the sap.m.Page control.

Constructor Summary
new sap.ui.commons.layout.BorderLayout(sId?, mSettings?)Constructor for a new layout/BorderLayout.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.commons.layout.BorderLayout.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.layout.BorderLayout with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.layout.BorderLayout.getMetadata()Returns a metadata object for class sap.ui.commons.layout.BorderLayout.
addContent(oAreaId, oControls)Adds controls to the specified area
createArea(oAreaId, oControls)Creates the specified area and adds the given controls to it.
destroyBegin()Destroys the begin in the aggregation begin.
destroyBottom()Destroys the bottom in the aggregation bottom.
destroyCenter()Destroys the center in the aggregation center.
destroyContent(oAreaId)Destroys the content of the specified area
destroyEnd()Destroys the end in the aggregation end.
destroyTop()Destroys the top in the aggregation top.
getArea(oAreaId, bCreate)Returns the area of the given type.
getAreaById(oAreaId)Returns the object of the specified area.
getAreaData(oAreaId)Returns a JSON-like object that contains all property values of the requested area
getBegin()Gets content of aggregation begin.
getBottom()Gets content of aggregation bottom.
getCenter()Gets content of aggregation center.
getContent(oAreaId)Returns all controls inside the specified area inside an array
getEnd()Gets content of aggregation end.
getHeight()Gets current value of property height.
getTop()Gets content of aggregation top.
getWidth()Gets current value of property width.
indexOfContent(oAreaId, oContent)Determines the index of a given content control
insertContent(oAreaId, iIndex, oControl)Inserts controls to an area at a given index.
removeAllContent(oAreaId)Removes all content from an area
removeContent(oAreaId, iIndex)Removes the content with the given index from an area
setAreaData(oAreaId, oData)Sets the properties of the specified area with the given values
setBegin(oBegin)Sets the aggregated begin.
setBottom(oBottom)Sets the aggregated bottom.
setCenter(oCenter)Sets the aggregated center.
setEnd(oEnd)Sets the aggregated end.
setHeight(sHeight)Sets a new value for property height.
setTop(oTop)Sets the aggregated top.
setWidth(sWidth)Sets a new value for property width.
getRtl()Gets current value of property rtl.
setRtl(bRtl)Sets a new value for property rtl.
Constructor Detail
new sap.ui.commons.layout.BorderLayout(sId?, mSettings?)
Constructor for a new layout/BorderLayout.

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
    • rtl : boolean (default: false)
    • width : sap.ui.core.CSSSize (default: 100%)
    • height : sap.ui.core.CSSSize (default: 100%)
  • Aggregations
    • top : sap.ui.commons.layout.BorderLayoutArea
    • begin : sap.ui.commons.layout.BorderLayoutArea
    • center : sap.ui.commons.layout.BorderLayoutArea
    • end : sap.ui.commons.layout.BorderLayoutArea
    • bottom : sap.ui.commons.layout.BorderLayoutArea

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. Instead, use the sap.m.Page control.
Method Detail
sap.ui.commons.layout.BorderLayout.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.layout.BorderLayout 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.BorderLayout.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.layout.BorderLayout.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addContent(oAreaId, oControls): void
Adds controls to the specified area
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area where controls will be added
{sap.ui.core.Control}oControls N controls can be submitted to be added. Each control is submitted as one argument.
createArea(oAreaId, oControls): sap.ui.commons.layout.BorderLayoutArea
Creates the specified area and adds the given controls to it. Returns the created area.
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies which area will be created. If the area is already available, the method call is ignored.
{sap.ui.core.Control}oControls Any number of controls can be submitted to be added to the newly created area; where each control is submitted as one argument.
Returns:
{sap.ui.commons.layout.BorderLayoutArea}
Destroys the begin in the aggregation begin.
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Destroys the bottom in the aggregation bottom.
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Destroys the center in the aggregation center.
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
destroyContent(oAreaId): void
Destroys the content of the specified area
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area whose content will be destroyed
Destroys the end in the aggregation end.
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Destroys the top in the aggregation top.
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Returns the area of the given type. If the area does not exist, it will be created when create is set to true.
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId
{boolean}bCreate
Returns:
{sap.ui.commons.layout.BorderLayoutAreaTypes}
Returns the object of the specified area. If the area does not exist, the area will be created and returned.
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area whose object will be returned.
Returns:
{sap.ui.commons.layout.BorderLayoutArea}
getAreaData(oAreaId): object
Returns a JSON-like object that contains all property values of the requested area
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area whose data will be returned
Returns:
{object}
Gets content of aggregation begin.

Represents the Begin area

Returns:
{sap.ui.commons.layout.BorderLayoutArea}
Gets content of aggregation bottom.

Represents the Bottom area

Returns:
{sap.ui.commons.layout.BorderLayoutArea}
Gets content of aggregation center.

Represents the Center area

Returns:
{sap.ui.commons.layout.BorderLayoutArea}
getContent(oAreaId): sap.ui.core.Control[]
Returns all controls inside the specified area inside an array
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area whose content controls shall be returned.
Returns:
{sap.ui.core.Control[]}
Gets content of aggregation end.

Represents the End area

Returns:
{sap.ui.commons.layout.BorderLayoutArea}
getHeight(): sap.ui.core.CSSSize
Gets current value of property height.

Defines the overall height of the layout

Default value is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property height
Gets content of aggregation top.

Represents the Top area

Returns:
{sap.ui.commons.layout.BorderLayoutArea}
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Defines the overall width of the layout

Default value is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property width
indexOfContent(oAreaId, oContent): int
Determines the index of a given content control
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area that will be searched
{sap.ui.core.Control}oContent Specifies the control whose index will be searched
Returns:
{int}
insertContent(oAreaId, iIndex, oControl): void
Inserts controls to an area at a given index.
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area where the controls shall be inserted.
{int}iIndex Specifies the index where the controls shall be added. 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.
{sap.ui.core.Control}oControl N controls can be submitted to be added. Each control is submitted as one argument.
removeAllContent(oAreaId): void
Removes all content from an area
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area whose content shall be removed
removeContent(oAreaId, iIndex): void
Removes the content with the given index from an area
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area whose content shall be removed
{int}iIndex Specifies the index of the control that shall be removed
setAreaData(oAreaId, oData): void
Sets the properties of the specified area with the given values
Parameters:
{sap.ui.commons.layout.BorderLayoutAreaTypes}oAreaId Specifies the area whose properties will be set
{object}oData JSON-like object that contains the values to be set
Sets the aggregated begin.
Parameters:
{sap.ui.commons.layout.BorderLayoutArea}oBegin The begin to set
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Sets the aggregated bottom.
Parameters:
{sap.ui.commons.layout.BorderLayoutArea}oBottom The bottom to set
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Sets the aggregated center.
Parameters:
{sap.ui.commons.layout.BorderLayoutArea}oCenter The center to set
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Sets the aggregated end.
Parameters:
{sap.ui.commons.layout.BorderLayoutArea}oEnd The end to set
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Sets a new value for property height.

Defines the overall height of the layout

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.BorderLayout} Reference to this in order to allow method chaining
Sets the aggregated top.
Parameters:
{sap.ui.commons.layout.BorderLayoutArea}oTop The top to set
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining
Sets a new value for property width.

Defines the overall width of the layout

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.BorderLayout} Reference to this in order to allow method chaining
getRtl(): boolean
Gets current value of property rtl.

The RTL setting swaps the areas Begin and End. Since version 1.5.2, this property is deprecated and ignored as it conflicts with the central configuration for the page.

Default value is false.

Deprecated:
Since version 1.5.2. RTL should not be configured on control level but is determined by a global configuration.
Returns:
{boolean} Value of property rtl
Sets a new value for property rtl.

The RTL setting swaps the areas Begin and End. Since version 1.5.2, this property is deprecated and ignored as it conflicts with the central configuration for the page.

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

Default value is false.

Parameters:
{boolean}bRtl New value for property rtl
Deprecated:
Since version 1.5.2. RTL should not be configured on control level but is determined by a global configuration.
Returns:
{sap.ui.commons.layout.BorderLayout} Reference to this in order to allow method chaining