Class sap.m.HeaderContainerModule: sap/m/HeaderContainer

extends Control

The container that provides a horizontal layout. It provides a horizontal scrolling on the mobile devices. On the desktop, it provides scroll left and scroll right buttons. This control supports keyboard navigation. You can use left and right arrow keys to navigate through the inner content. The Home key puts focus on the first control and the End key puts focus on the last control. Use Enter or Space key to choose the control.
Since: 1.44.0.
Constructor Summary
new sap.m.HeaderContainer(sId?, mSettings?)Constructor for the new HeaderContainer control.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.HeaderContainer.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.HeaderContainer with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.HeaderContainer.getMetadata()Returns a metadata object for class sap.m.HeaderContainer.
addContent(oContent)Adds some content to the aggregation content.
destroyContent()Destroys all the content in the aggregation content.
getBackgroundDesign()Gets current value of property backgroundDesign.
getContent()Gets content of aggregation content.
getHeight()Gets current value of property height.
getOrientation()Gets current value of property orientation.
getScrollStep()Gets current value of property scrollStep.
getScrollTime()Gets current value of property scrollTime.
getShowDividers()Gets current value of property showDividers.
getWidth()Gets current value of property width.
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregation content.
insertContent(oContent, iIndex)Inserts a content into the aggregation content.
removeAllContent()Removes all the controls from the aggregation content.
removeContent(vContent)Removes a content from the aggregation content.
setBackgroundDesign(sBackgroundDesign)Sets a new value for property backgroundDesign.
setHeight(sHeight)Sets a new value for property height.
setOrientation(sOrientation)Sets a new value for property orientation.
setScrollStep(iScrollStep)Sets a new value for property scrollStep.
setScrollTime(iScrollTime)Sets a new value for property scrollTime.
setShowDividers(bShowDividers)Sets a new value for property showDividers.
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.m.HeaderContainer(sId?, mSettings?)

Constructor for the new HeaderContainer control.

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.Control can be used as well.

Parameters:
stringsId?ID for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Method Detail
sap.m.HeaderContainer.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.m.HeaderContainer 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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.HeaderContainer.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.HeaderContainer.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addContent(oContent): sap.m.HeaderContainer
Adds some content to the aggregation content.
Parameters:
sap.ui.core.ControloContentthe content to add; if empty, nothing is inserted
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
destroyContent(): sap.m.HeaderContainer
Destroys all the content in the aggregation content.
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
getBackgroundDesign(): sap.m.BackgroundDesign

Gets current value of property backgroundDesign.

Specifies the background color of the content. The visualization of the different options depends on the used theme.

Default value is library.BackgroundDesign.Transparent.

Returns:
sap.m.BackgroundDesignValue of property backgroundDesign
getContent(): sap.ui.core.Control[]

Gets content of aggregation content.

Content to add to HeaderContainer.

Returns:
sap.ui.core.Control[]
getHeight(): sap.ui.core.CSSSize

Gets current value of property height.

The height of the whole HeaderContainer. If not specified, it is rendered as 'auto' in horizontal orientation and as '100%' in vertical orientation.

Returns:
sap.ui.core.CSSSizeValue of property height
getOrientation(): sap.ui.core.Orientation

Gets current value of property orientation.

The orientation of the HeaderContainer. There are two orientation modes: horizontal and vertical. In horizontal mode the content controls are displayed next to each other, in vertical mode the content controls are displayed on top of each other.

Default value is Horizontal.

Returns:
sap.ui.core.OrientationValue of property orientation
getScrollStep(): int

Gets current value of property scrollStep.

Number of pixels to scroll when the user chooses Next or Previous buttons. Relevant only for desktop.

Default value is 300.

Returns:
intValue of property scrollStep
getScrollTime(): int

Gets current value of property scrollTime.

Scroll animation time in milliseconds.

Default value is 500.

Returns:
intValue of property scrollTime
getShowDividers(): boolean

Gets current value of property showDividers.

If set to true, it shows dividers between the different content controls.

Default value is true.

Returns:
booleanValue of property showDividers
getWidth(): sap.ui.core.CSSSize

Gets current value of property width.

The width of the whole HeaderContainer. If not specified, it is rendered as '100%' in horizontal orientation and as 'auto' in vertical orientation.

Returns:
sap.ui.core.CSSSizeValue of property width
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.core.ControloContentThe content whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
insertContent(oContent, iIndex): sap.m.HeaderContainer
Inserts a content into the aggregation content.
Parameters:
sap.ui.core.ControloContentthe content to insert; if empty, nothing is inserted
intiIndexthe 0-based index the content should 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
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
removeAllContent(): sap.ui.core.Control[]

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.core.Control[]An array of the removed elements (might be empty)
removeContent(vContent): sap.ui.core.Control
Removes a content from the aggregation content.
Parameters:
int|string|sap.ui.core.ControlvContentThe content to remove or its index or id
Returns:
sap.ui.core.ControlThe removed content or null
setBackgroundDesign(sBackgroundDesign): sap.m.HeaderContainer

Sets a new value for property backgroundDesign.

Specifies the background color of the content. The visualization of the different options depends on the used theme.

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

Default value is library.BackgroundDesign.Transparent.

Parameters:
sap.m.BackgroundDesignsBackgroundDesignNew value for property backgroundDesign
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
setHeight(sHeight): sap.m.HeaderContainer

Sets a new value for property height.

The height of the whole HeaderContainer. If not specified, it is rendered as 'auto' in horizontal orientation and as '100%' in vertical orientation.

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

Parameters:
sap.ui.core.CSSSizesHeightNew value for property height
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
setOrientation(sOrientation): sap.m.HeaderContainer

Sets a new value for property orientation.

The orientation of the HeaderContainer. There are two orientation modes: horizontal and vertical. In horizontal mode the content controls are displayed next to each other, in vertical mode the content controls are displayed on top of each other.

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

Default value is Horizontal.

Parameters:
sap.ui.core.OrientationsOrientationNew value for property orientation
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
setScrollStep(iScrollStep): sap.m.HeaderContainer

Sets a new value for property scrollStep.

Number of pixels to scroll when the user chooses Next or Previous buttons. Relevant only for desktop.

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

Default value is 300.

Parameters:
intiScrollStepNew value for property scrollStep
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
setScrollTime(iScrollTime): sap.m.HeaderContainer

Sets a new value for property scrollTime.

Scroll animation time in milliseconds.

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

Default value is 500.

Parameters:
intiScrollTimeNew value for property scrollTime
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
setShowDividers(bShowDividers): sap.m.HeaderContainer

Sets a new value for property showDividers.

If set to true, it shows dividers between the different content controls.

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

Default value is true.

Parameters:
booleanbShowDividersNew value for property showDividers
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining
setWidth(sWidth): sap.m.HeaderContainer

Sets a new value for property width.

The width of the whole HeaderContainer. If not specified, it is rendered as '100%' in horizontal orientation and as 'auto' in vertical orientation.

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

Parameters:
sap.ui.core.CSSSizesWidthNew value for property width
Returns:
sap.m.HeaderContainerReference to this in order to allow method chaining