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.
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#constructor for a general description of the syntax of the settings object.
new sap.m.HeaderContainer(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 |
Name | Type | Default Value | Description |
---|---|---|---|
backgroundDesign | sap.m.BackgroundDesign | Transparent | Specifies the background color of the content. The visualization of the different options depends on the used theme. Visibility: public |
height | sap.ui.core.CSSSize | The height of the whole HeaderContainer. If not specified, it is rendered as 'auto' in horizontal orientation and as '100%' in vertical orientation. Visibility: public |
|
orientation | sap.ui.core.Orientation | Horizontal | 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. Visibility: public |
scrollStep | int | 300 | Number of pixels to scroll when the user chooses Next or Previous buttons. Relevant only for desktop. Visibility: public |
scrollStepByItem | int | 1 | Number of items to scroll when the user chose Next or Previous buttons. Relevant only for desktop. Have priority over 'ScrollStep'. Have to be positive number. Visibility: public |
scrollTime | int | 500 | Scroll animation time in milliseconds. Visibility: public |
showDividers | boolean | true | If set to true, it shows dividers between the different content controls. Visibility: public |
showOverflowItem | boolean | true | Indicates whether the incomplete item on the edge of visible area is displayed or hidden. Visibility: public |
width | sap.ui.core.CSSSize | The width of the whole HeaderContainer. If not specified, it is rendered as '100%' in horizontal orientation and as 'auto' in vertical orientation. Visibility: public |
Default Aggregation: content
Name | Cardinality | Type | Description |
---|---|---|---|
_nextButton | 0..1 | sap.ui.core.Control |
Button that allows to scroll to next section. |
_prevButton | 0..1 | sap.ui.core.Control |
Button that allows to scroll to previous section. |
_scrollContainer | 0..1 | sap.m.ScrollContainer |
Scroll container for smooth scrolling on different platforms. |
content (default) | 0..n | sap.ui.core.Control |
Content to add to HeaderContainer. |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaLabelledBy | 0..n | sap.ui.core.Control |
Controls or IDs that label controls in the |
Method | Description |
---|---|
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
addContent |
Adds some content to the aggregation content. |
attachScroll |
Attaches event handler When called, the context of the event handler (its This event is triggered on pressing the scroll button. |
destroyContent |
Destroys all the content in the aggregation content. |
detachScroll |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.HeaderContainer.extend |
Creates a new subclass of class sap.m.HeaderContainer with name
|
fireScroll |
Fires event scroll to attached listeners. |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
getBackgroundDesign |
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 |
getContent |
Gets content of aggregation content. Content to add to HeaderContainer. |
getHeight |
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. |
sap.m.HeaderContainer.getMetadata |
Returns a metadata object for class sap.m.HeaderContainer. |
getOrientation |
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 |
getScrollStep |
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 |
getScrollStepByItem |
Gets current value of property scrollStepByItem. Number of items to scroll when the user chose Next or Previous buttons. Relevant only for desktop. Have priority over 'ScrollStep'. Have to be positive number. Default value is |
getScrollTime |
Gets current value of property scrollTime. Scroll animation time in milliseconds. Default value is |
getShowDividers |
Gets current value of property showDividers. If set to true, it shows dividers between the different content controls. Default value is |
getShowOverflowItem |
Gets current value of property showOverflowItem. Indicates whether the incomplete item on the edge of visible area is displayed or hidden. Default value is |
getWidth |
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. |
indexOfContent |
Checks for the provided |
insertContent |
Inserts a content into the aggregation content. |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAllContent |
Removes all the controls from the aggregation content. Additionally, it unregisters them from the hosting UIArea. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
removeContent |
Removes a content from the aggregation content. |
setBackgroundDesign |
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 Default value is |
setHeight |
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 |
setOrientation |
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 Default value is |
setScrollStep |
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 Default value is |
setScrollStepByItem |
Sets a new value for property scrollStepByItem. Number of items to scroll when the user chose Next or Previous buttons. Relevant only for desktop. Have priority over 'ScrollStep'. Have to be positive number. When called with a value of Default value is |
setScrollTime |
Sets a new value for property scrollTime. Scroll animation time in milliseconds. When called with a value of Default value is |
setShowDividers |
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 Default value is |
setShowOverflowItem |
Sets a new value for property showOverflowItem. Indicates whether the incomplete item on the edge of visible area is displayed or hidden. When called with a value of Default value is |
setWidth |
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 |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
Adds some content to the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the scroll event of this sap.m.HeaderContainer
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.HeaderContainer
itself.
This event is triggered on pressing the scroll button.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the scroll event of this sap.m.HeaderContainer
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
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 |
Fires event scroll to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
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 Transparent
.
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.
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
.
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
.
Gets current value of property scrollStepByItem.
Number of items to scroll when the user chose Next or Previous buttons. Relevant only for desktop. Have priority over 'ScrollStep'. Have to be positive number.
Default value is 1
.
Gets current value of property scrollTime.
Scroll animation time in milliseconds.
Default value is 500
.
Gets current value of property showDividers.
If set to true, it shows dividers between the different content controls.
Default value is true
.
Gets current value of property showOverflowItem.
Indicates whether the incomplete item on the edge of visible area is displayed or hidden.
Default value is true
.
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.
Checks for the provided sap.ui.core.Control
in the aggregation content. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content whose index is looked for |
Inserts a content into the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation content.
Additionally, it unregisters them from the hosting UIArea.
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
Removes a content from the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
vContent | int string sap.ui.core.Control |
The content to remove or its index or id |
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 Transparent
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sBackgroundDesign | sap.m.BackgroundDesign | Transparent |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHeight | sap.ui.core.CSSSize |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sOrientation | sap.ui.core.Orientation | Horizontal |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iScrollStep | int | 300 |
New value for property |
Sets a new value for property scrollStepByItem.
Number of items to scroll when the user chose Next or Previous buttons. Relevant only for desktop. Have priority over 'ScrollStep'. Have to be positive number.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iScrollStepByItem | int | 1 |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iScrollTime | int | 500 |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowDividers | boolean | true |
New value for property |
Sets a new value for property showOverflowItem.
Indicates whether the incomplete item on the edge of visible area is displayed or hidden.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowOverflowItem | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize |
New value for property |