class sap.ui.commons.layout.BorderLayout

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

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.


Constructor

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#constructor for a general description of the syntax of the settings object.

new sap.ui.commons.layout.BorderLayout(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
height sap.ui.core.CSSSize 100%

Defines the overall height of the layout

Visibility: public
rtl boolean false

The RTL setting swaps the areas Begin and End.

Visibility: public
width sap.ui.core.CSSSize 100%

Defines the overall width of the layout

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
begin 0..1 sap.ui.commons.layout.BorderLayoutArea

Represents the Begin area

bottom 0..1 sap.ui.commons.layout.BorderLayoutArea

Represents the Bottom area

center 0..1 sap.ui.commons.layout.BorderLayoutArea

Represents the Center area

end 0..1 sap.ui.commons.layout.BorderLayoutArea

Represents the End area

top 0..1 sap.ui.commons.layout.BorderLayoutArea

Represents the Top area


Methods Overview

Method Description
addContent

Adds controls to the specified area.

createArea

Creates the specified area and adds the given controls to it. Returns the created area.

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

Destroys the content of the specified area.

destroyEnd

Destroys the end in the aggregation end.

destroyTop

Destroys the top in the aggregation top.

sap.ui.commons.layout.BorderLayout.extend

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.

getArea

Returns the area of the given type. If the area does not exist, it will be created when create is set to true.

getAreaById

Returns the object of the specified area. If the area does not exist, the area will be created and returned.

getAreaData

Returns a JSON-like object that contains all property values of the requested area.

getBegin

Gets content of aggregation begin.

Represents the Begin area

getBottom

Gets content of aggregation bottom.

Represents the Bottom area

getCenter

Gets content of aggregation center.

Represents the Center area

getContent

Returns all controls inside the specified area inside an array.

getEnd

Gets content of aggregation end.

Represents the End area

getHeight

Gets current value of property height.

Defines the overall height of the layout

Default value is '100%'.

sap.ui.commons.layout.BorderLayout.getMetadata

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

getRtl

Gets current value of property rtl.

The RTL setting swaps the areas Begin and End.

Default value is false.

Since 1.5.2 replaced by the global configuration for the page
getTop

Gets content of aggregation top.

Represents the Top area

getWidth

Gets current value of property width.

Defines the overall width of the layout

Default value is '100%'.

indexOfContent

Determines the index of a given content control.

insertContent

Inserts controls to an area at a given index.

removeAllContent

Removes all content from an area.

removeContent

Removes the content with the given index from an area.

setAreaData

Sets the properties of the specified area with the given values.

setBegin

Sets the aggregated begin.

setBottom

Sets the aggregated bottom.

setCenter

Sets the aggregated center.

setEnd

Sets the aggregated end.

setHeight

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%'.

setRtl

Sets a new value for property rtl.

The RTL setting swaps the areas Begin and End.

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

Default value is false.

Since 1.5.2 replaced by the global configuration for the page
setTop

Sets the aggregated top.

setWidth

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%'.

addContent

Adds controls to the specified area.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area where controls will be added

createArea

Creates the specified area and adds the given controls to it. Returns the created area.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies which area will be created. If the area is already available, the method call is ignored.

oContent sap.ui.core.Control

Any number of controls can be submitted to be added to the newly created area; where each control is submitted as one argument.

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

Destroys the content of the specified area.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area whose content will be destroyed

destroyEnd

Destroys the end in the aggregation end.

destroyTop

Destroys the top in the aggregation top.

sap.ui.commons.layout.BorderLayout.extend

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.

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

getArea

Returns the area of the given type. If the area does not exist, it will be created when create is set to true.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

The aria ID

bCreate boolean

Whether the aria must be created

getAreaById

Returns the object of the specified area. If the area does not exist, the area will be created and returned.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area whose object will be returned.

getAreaData

Returns a JSON-like object that contains all property values of the requested area.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area whose data will be returned

getBegin

Gets content of aggregation begin.

Represents the Begin area

getBottom

Gets content of aggregation bottom.

Represents the Bottom area

getCenter

Gets content of aggregation center.

Represents the Center area

getContent

Returns all controls inside the specified area inside an array.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area whose content controls shall be returned.

getEnd

Gets content of aggregation end.

Represents the End area

getHeight

Gets current value of property height.

Defines the overall height of the layout

Default value is '100%'.

sap.ui.commons.layout.BorderLayout.getMetadata

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

getRtl

Gets current value of property rtl.

The RTL setting swaps the areas Begin and End.

Default value is false.

Since 1.5.2 replaced by the global configuration for the page

getTop

Gets content of aggregation top.

Represents the Top area

getWidth

Gets current value of property width.

Defines the overall width of the layout

Default value is '100%'.

indexOfContent

Determines the index of a given content control.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area that will be searched

oContent sap.ui.core.Control

Specifies the control whose index will be searched

insertContent

Inserts controls to an area at a given index.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area where the controls shall be inserted.

iIndex int

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.

removeAllContent

Removes all content from an area.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area whose content shall be removed

removeContent

Removes the content with the given index from an area.

Param Type DefaultValue Description
oAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area whose content shall be removed

vElement any

The content to be removed Specifies the control that shall be removed

setAreaData

Sets the properties of the specified area with the given values.

Param Type DefaultValue Description
sAreaId sap.ui.commons.layout.BorderLayoutAreaTypes

Specifies the area whose properties will be set

oData object

JSON-like object that contains the values to be set

setBegin

Sets the aggregated begin.

Param Type DefaultValue Description
oBegin sap.ui.commons.layout.BorderLayoutArea

The begin to set

setBottom

Sets the aggregated bottom.

Param Type DefaultValue Description
oBottom sap.ui.commons.layout.BorderLayoutArea

The bottom to set

setCenter

Sets the aggregated center.

Param Type DefaultValue Description
oCenter sap.ui.commons.layout.BorderLayoutArea

The center to set

setEnd

Sets the aggregated end.

Param Type DefaultValue Description
oEnd sap.ui.commons.layout.BorderLayoutArea

The end to set

setHeight

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%'.

Param Type DefaultValue Description
sHeight sap.ui.core.CSSSize '100%'

New value for property height

setRtl

Sets a new value for property rtl.

The RTL setting swaps the areas Begin and End.

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

Default value is false.

Since 1.5.2 replaced by the global configuration for the page
Param Type DefaultValue Description
bRtl boolean false

New value for property rtl

setTop

Sets the aggregated top.

Param Type DefaultValue Description
oTop sap.ui.commons.layout.BorderLayoutArea

The top to set

setWidth

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%'.

Param Type DefaultValue Description
sWidth sap.ui.core.CSSSize '100%'

New value for property width