Class sap.m.IconTabBarModule: sap/m/IconTabBar

extends Control

The IconTabBar control represents a collection of tabs with associated content.

IconTabBar covers the following use cases: - Filter – There is only one main content for all tabs. The main content can be filtered, based on the selected tab. - Normal tab bar - The contents of each tab are independent from each other. - Combination of the above - There can be both filtered and independent contents.

Constructor Summary
new sap.m.IconTabBar(sId?, mSettings?)Constructor for a new IconTabBar.
Event Summary
expand(oControlEvent)Indicates that the tab will expand or collapse.
select(oControlEvent)Fires when an item is selected.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.IconTabBar.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.IconTabBar with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.IconTabBar.getMetadata()Returns a metadata object for class sap.m.IconTabBar.
addContent(oContent)Adds some content to the aggregation content.
addItem(oItem)Adds some item to the aggregation items.
attachExpand(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the expand event of this sap.m.IconTabBar.
attachSelect(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the select event of this sap.m.IconTabBar.
bindAggregation(sAggregationName, oBindingInfo)Forwards aggregations with the name of items to the internal list.
destroyContent()Destroys all the content in the aggregation content.
destroyItems()Destroys all the items in the aggregation items.
detachExpand(fnFunction, oListener)Detaches event handler fnFunction from the expand event of this sap.m.IconTabBar.
detachSelect(fnFunction, oListener)Detaches event handler fnFunction from the select event of this sap.m.IconTabBar.
fireExpand(mArguments?)Fires event expand to attached listeners.
fireSelect(mArguments?)Fires event select to attached listeners.
getApplyContentPadding()Gets current value of property applyContentPadding.
getBackgroundDesign()Gets current value of property backgroundDesign.
getContent()Gets content of aggregation content.
getExpandable()Gets current value of property expandable.
getExpanded()Gets current value of property expanded.
getItems()Gets content of aggregation items.
getSelectedKey()Reflector for the internal header's selectedKey property.
getStretchContentHeight()Gets current value of property stretchContentHeight.
getUpperCase()Gets current value of property upperCase.
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregation content.
indexOfItem(oItem)Checks for the provided sap.m.IconTab in the aggregation items.
insertContent(oContent, iIndex)Inserts a content into the aggregation content.
insertItem(oItem, iIndex)Inserts a item into the aggregation items.
removeAllContent()Removes all the controls from the aggregation content.
removeAllItems()Removes all the controls from the aggregation items.
removeContent(vContent)Removes a content from the aggregation content.
removeItem(vItem)Removes a item from the aggregation items.
setApplyContentPadding(bApplyContentPadding)Sets a new value for property applyContentPadding.
setBackgroundDesign(sBackgroundDesign)Sets a new value for property backgroundDesign.
setExpandable(bExpandable)Sets the tabs as collapsible and expandable without re-rendering the control.
setExpanded(bExpanded)Sets the tab content as expanded.
setSelectedKey(sValue)Reflector for the internal header's selectedKey property.
setStretchContentHeight(bStretchContentHeight)Sets a new value for property stretchContentHeight.
setUpperCase(bUpperCase)Sets a new value for property upperCase.
getShowSelection()Gets current value of property showSelection.
setShowSelection(bShowSelection)Sets a new value for property showSelection.
Constructor Detail
new sap.m.IconTabBar(sId?, mSettings?)
Constructor for a new IconTabBar.

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:
{string}sId? ID for the new control, generated automatically if no ID is given
{object}mSettings? Initial settings for the new control
Event Detail
expand(oControlEvent)
Indicates that the tab will expand or collapse.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{boolean}oControlEvent.getParameters.expand If the tab will expand, this is true.
{boolean}oControlEvent.getParameters.collapse If the tab will collapse, this is true.
Since:
1.15.0
select(oControlEvent)
Fires when an item is selected.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.m.IconTabFilter}oControlEvent.getParameters.item The selected item
{string}oControlEvent.getParameters.key The key of the selected item
{sap.m.IconTabFilter}oControlEvent.getParameters.selectedItem The selected item
{string}oControlEvent.getParameters.selectedKey The key of the selected item
Method Detail
sap.m.IconTabBar.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.IconTabBar 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.m.IconTabBar.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.IconTabBar.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addContent(oContent): sap.m.IconTabBar
Adds some content to the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to add; if empty, nothing is inserted
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
addItem(oItem): sap.m.IconTabBar
Adds some item to the aggregation items.
Parameters:
{sap.m.IconTab}oItem the item to add; if empty, nothing is inserted
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
attachExpand(oData?, fnFunction, oListener?): sap.m.IconTabBar
Attaches event handler fnFunction to the expand event of this sap.m.IconTabBar.

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.IconTabBar itself.

Indicates that the tab will expand or collapse.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.IconTabBar itself
Since:
1.15.0
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
attachSelect(oData?, fnFunction, oListener?): sap.m.IconTabBar
Attaches event handler fnFunction to the select event of this sap.m.IconTabBar.

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.IconTabBar itself.

Fires when an item is selected.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.IconTabBar itself
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
bindAggregation(sAggregationName, oBindingInfo): sap.m.IconTabBar
Forwards aggregations with the name of items to the internal list.
Parameters:
{string}sAggregationName The name for the binding
{object}oBindingInfo The configuration parameters for the binding
Returns:
{sap.m.IconTabBar} this pointer for chaining
destroyContent(): sap.m.IconTabBar
Destroys all the content in the aggregation content.
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
destroyItems(): sap.m.IconTabBar
Destroys all the items in the aggregation items.
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
detachExpand(fnFunction, oListener): sap.m.IconTabBar
Detaches event handler fnFunction from the expand event of this sap.m.IconTabBar.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.15.0
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
detachSelect(fnFunction, oListener): sap.m.IconTabBar
Detaches event handler fnFunction from the select event of this sap.m.IconTabBar.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
fireExpand(mArguments?): sap.m.IconTabBar
Fires event expand to attached listeners.

Expects the following event parameters:

  • expand of type booleanIf the tab will expand, this is true.
  • collapse of type booleanIf the tab will collapse, this is true.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.15.0
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
fireSelect(mArguments?): sap.m.IconTabBar
Fires event select to attached listeners.

Expects the following event parameters:

  • item of type sap.m.IconTabFilterThe selected item
  • key of type stringThe key of the selected item
  • selectedItem of type sap.m.IconTabFilterThe selected item
  • selectedKey of type stringThe key of the selected item
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
getApplyContentPadding(): boolean
Gets current value of property applyContentPadding.

Determines whether the IconTabBar content fits to the full area. The paddings are removed if it's set to false.

Default value is true.

Since:
1.26
Returns:
{boolean} Value of property applyContentPadding
getBackgroundDesign(): sap.m.BackgroundDesign
Gets current value of property backgroundDesign.

Specifies the background color of the IconTabBar.

Depending on the theme, you can change the state of the background color to "Solid", "Translucent", or "Transparent".

Default value is Solid.

Since:
1.26
Returns:
{sap.m.BackgroundDesign} Value of property backgroundDesign
getContent(): sap.ui.core.Control[]
Gets content of aggregation content.

Represents the contents displayed below the IconTabBar. If there are multiple contents, they are rendered after each other. The developer has to manage to display the right one or use the content aggregation inside the IconTabFilter (which will be displayed instead if it is set).

Returns:
{sap.ui.core.Control[]}
getExpandable(): boolean
Gets current value of property expandable.

Defines if the tabs are collapsible and expandable.

Default value is true.

Since:
1.15.0
Returns:
{boolean} Value of property expandable
getExpanded(): boolean
Gets current value of property expanded.

Indicates if the actual tab content is expanded or not.

Default value is true.

Since:
1.15.0
Returns:
{boolean} Value of property expanded
getItems(): sap.m.IconTab[]
Gets content of aggregation items.

The items displayed in the IconTabBar.

Returns:
{sap.m.IconTab[]}
getSelectedKey(): string
Reflector for the internal header's selectedKey property.
Returns:
{string} The current property value
getStretchContentHeight(): boolean
Gets current value of property stretchContentHeight.

Determines whether the IconTabBar height is stretched to the maximum possible height of its parent container. As a prerequisite, the height of the parent container must be defined as a fixed value.

Default value is false.

Since:
1.26
Returns:
{boolean} Value of property stretchContentHeight
getUpperCase(): boolean
Gets current value of property upperCase.

Determines whether the text of the icon tab filter (not the count) is displayed in uppercase.

Default value is false.

Since:
1.22
Returns:
{boolean} Value of property upperCase
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.Control}oContent The content whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfItem(oItem): int
Checks for the provided sap.m.IconTab in the aggregation items. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.IconTab}oItem The item whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertContent(oContent, iIndex): sap.m.IconTabBar
Inserts a content into the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to insert; if empty, nothing is inserted
{int}iIndex the 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.IconTabBar} Reference to this in order to allow method chaining
insertItem(oItem, iIndex): sap.m.IconTabBar
Inserts a item into the aggregation items.
Parameters:
{sap.m.IconTab}oItem the item to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
Returns:
{sap.m.IconTabBar} Reference 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)
removeAllItems(): sap.m.IconTab[]
Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.m.IconTab[]} 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.Control}vContent The contentto remove or its index or id
Returns:
{sap.ui.core.Control} The removed content or null
removeItem(vItem): sap.m.IconTab
Removes a item from the aggregation items.
Parameters:
{int|string|sap.m.IconTab}vItem The itemto remove or its index or id
Returns:
{sap.m.IconTab} The removed item or null
setApplyContentPadding(bApplyContentPadding): sap.m.IconTabBar
Sets a new value for property applyContentPadding.

Determines whether the IconTabBar content fits to the full area. The paddings are removed if it's set to false.

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

Default value is true.

Parameters:
{boolean}bApplyContentPadding New value for property applyContentPadding
Since:
1.26
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
setBackgroundDesign(sBackgroundDesign): sap.m.IconTabBar
Sets a new value for property backgroundDesign.

Specifies the background color of the IconTabBar.

Depending on the theme, you can change the state of the background color to "Solid", "Translucent", or "Transparent".

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

Default value is Solid.

Parameters:
{sap.m.BackgroundDesign}sBackgroundDesign New value for property backgroundDesign
Since:
1.26
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
setExpandable(bExpandable): sap.m.IconTabBar
Sets the tabs as collapsible and expandable without re-rendering the control.
Parameters:
{boolean}bExpandable new parameter value
Returns:
{sap.m.IconTabBar} this pointer for chaining
setExpanded(bExpanded): sap.m.IconTabBar
Sets the tab content as expanded.
Parameters:
{boolean}bExpanded new parameter value
Returns:
{sap.m.IconTabBar} this pointer for chaining
setSelectedKey(sValue): sap.m.IconTabBar
Reflector for the internal header's selectedKey property.
Parameters:
{string}sValue the new value
Returns:
{sap.m.IconTabBar} this pointer for chaining
setStretchContentHeight(bStretchContentHeight): sap.m.IconTabBar
Sets a new value for property stretchContentHeight.

Determines whether the IconTabBar height is stretched to the maximum possible height of its parent container. As a prerequisite, the height of the parent container must be defined as a fixed value.

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

Default value is false.

Parameters:
{boolean}bStretchContentHeight New value for property stretchContentHeight
Since:
1.26
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
setUpperCase(bUpperCase): sap.m.IconTabBar
Sets a new value for property upperCase.

Determines whether the text of the icon tab filter (not the count) is displayed in uppercase.

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

Default value is false.

Parameters:
{boolean}bUpperCase New value for property upperCase
Since:
1.22
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining
getShowSelection(): boolean
Gets current value of property showSelection.

Defines whether the current selection should be visualized.

Default value is true.

Deprecated:
As of 1.15.0. Regarding to changes of this control this property is not needed anymore.
Returns:
{boolean} Value of property showSelection
setShowSelection(bShowSelection): sap.m.IconTabBar
Sets a new value for property showSelection.

Defines whether the current selection should be visualized.

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

Default value is true.

Parameters:
{boolean}bShowSelection New value for property showSelection
Deprecated:
As of 1.15.0. Regarding to changes of this control this property is not needed anymore.
Returns:
{sap.m.IconTabBar} Reference to this in order to allow method chaining