Class sap.ui.unified.ShellHeadItemModule: sap/ui/unified/ShellHeadItem

extends Element

Header Action item of the Shell.


Since: 1.15.1.
Constructor Summary
new sap.ui.unified.ShellHeadItem(sId?, mSettings?)Constructor for a new ShellHeadItem.
Event Summary
press(oControlEvent)Event is fired when the user presses the item.
Method Summary
sap.ui.unified.ShellHeadItem.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.unified.ShellHeadItem with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.unified.ShellHeadItem.getMetadata()Returns a metadata object for class sap.ui.unified.ShellHeadItem.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
attachPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the press event of this sap.ui.unified.ShellHeadItem.
detachPress(fnFunction, oListener)Detaches event handler fnFunction from the press event of this sap.ui.unified.ShellHeadItem.
firePress(mArguments?)Fires event press to attached listeners.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getIcon()Gets current value of property icon.
getSelected()Gets current value of property selected.
getShowSeparator()Gets current value of property showSeparator.
getToggleEnabled()Gets current value of property toggleEnabled.
getVisible()Gets current value of property visible.
removeAllAriaLabelledBy()Removes all the controls in the association named ariaLabelledBy.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
setIcon(sIcon)Sets a new value for property icon.
setSelected(bSelected)Sets a new value for property selected.
setShowSeparator(bShowSeparator)Sets a new value for property showSeparator.
setToggleEnabled(bToggleEnabled)Sets a new value for property toggleEnabled.
setVisible(bVisible)Sets a new value for property visible.
getShowMarker()Gets current value of property showMarker.
getStartsSection()Gets current value of property startsSection.
setShowMarker(bShowMarker)Sets a new value for property showMarker.
setStartsSection(bStartsSection)Sets a new value for property startsSection.
Constructor Detail
new sap.ui.unified.ShellHeadItem(sId?, mSettings?)
Constructor for a new ShellHeadItem.

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
  • Events
    • press : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Element 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
press(oControlEvent)
Event is fired when the user presses the item.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.ui.unified.ShellHeadItem.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.unified.ShellHeadItem 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.Element.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.unified.ShellHeadItem.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.unified.ShellHeadItem.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAriaLabelledBy(vAriaLabelledBy): sap.ui.unified.ShellHeadItem
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
{string|sap.ui.core.Control}vAriaLabelledBy the ariaLabelledBy to add; if empty, nothing is inserted
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
attachPress(oData?, fnFunction, oListener?): sap.ui.unified.ShellHeadItem
Attaches event handler fnFunction to the press event of this sap.ui.unified.ShellHeadItem.

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.ui.unified.ShellHeadItem itself.

Event is fired when the user presses the item.

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.ui.unified.ShellHeadItem itself
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
detachPress(fnFunction, oListener): sap.ui.unified.ShellHeadItem
Detaches event handler fnFunction from the press event of this sap.ui.unified.ShellHeadItem.

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.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
firePress(mArguments?): sap.ui.unified.ShellHeadItem
Fires event press to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
getAriaLabelledBy(): sap.ui.core.Control[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
{sap.ui.core.Control[]}
getIcon(): sap.ui.core.URI
Gets current value of property icon.

The icon of the item, either defined in the sap.ui.core.IconPool or an URI to a custom image. An icon must be set.

Returns:
{sap.ui.core.URI} Value of property icon
getSelected(): boolean
Gets current value of property selected.

Defines the toggle state in case the item represents a toggle button (see also property toggleEnabled).

Default value is false.

Returns:
{boolean} Value of property selected
getShowSeparator(): boolean
Gets current value of property showSeparator.

If set to true, a separator is displayed after the item.

Default value is true.

Since:
1.22.5
Returns:
{boolean} Value of property showSeparator
getToggleEnabled(): boolean
Gets current value of property toggleEnabled.

If set to true, the item represents a toggle button. The selected property can the be used to define the toggle state. Otherwise the item is displayed as action button. In this case the selected property is ignored.

Default value is true.

Since:
1.34.3
Returns:
{boolean} Value of property toggleEnabled
getVisible(): boolean
Gets current value of property visible.

Invisible items are not shown on the UI.

Default value is true.

Since:
1.18
Returns:
{boolean} Value of property visible
removeAllAriaLabelledBy(): sap.ui.core.Control[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.Control
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
{int|string|sap.ui.core.Control}vAriaLabelledBy The ariaLabelledByto be removed or its index or ID
Returns:
{sap.ui.core.Control} the removed ariaLabelledBy or null
Sets a new value for property icon.

The icon of the item, either defined in the sap.ui.core.IconPool or an URI to a custom image. An icon must be set.

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

Parameters:
{sap.ui.core.URI}sIcon New value for property icon
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
setSelected(bSelected): sap.ui.unified.ShellHeadItem
Sets a new value for property selected.

Defines the toggle state in case the item represents a toggle button (see also property toggleEnabled).

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

Default value is false.

Parameters:
{boolean}bSelected New value for property selected
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
setShowSeparator(bShowSeparator): sap.ui.unified.ShellHeadItem
Sets a new value for property showSeparator.

If set to true, a separator is displayed after the item.

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

Default value is true.

Parameters:
{boolean}bShowSeparator New value for property showSeparator
Since:
1.22.5
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
setToggleEnabled(bToggleEnabled): sap.ui.unified.ShellHeadItem
Sets a new value for property toggleEnabled.

If set to true, the item represents a toggle button. The selected property can the be used to define the toggle state. Otherwise the item is displayed as action button. In this case the selected property is ignored.

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

Default value is true.

Parameters:
{boolean}bToggleEnabled New value for property toggleEnabled
Since:
1.34.3
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
setVisible(bVisible): sap.ui.unified.ShellHeadItem
Sets a new value for property visible.

Invisible items are not shown on the UI.

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

Default value is true.

Parameters:
{boolean}bVisible New value for property visible
Since:
1.18
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
getShowMarker(): boolean
Gets current value of property showMarker.

If set to true, a theme dependent marker is shown on the item.

Default value is false.

Deprecated:
Since version 1.18. Markers should not be used anymore.
Returns:
{boolean} Value of property showMarker
getStartsSection(): boolean
Gets current value of property startsSection.

If set to true, a divider is displayed before the item.

Default value is false.

Deprecated:
Since version 1.18. Dividers are not supported anymore.
Returns:
{boolean} Value of property startsSection
setShowMarker(bShowMarker): sap.ui.unified.ShellHeadItem
Sets a new value for property showMarker.

If set to true, a theme dependent marker is shown on the item.

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

Default value is false.

Parameters:
{boolean}bShowMarker New value for property showMarker
Deprecated:
Since version 1.18. Markers should not be used anymore.
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining
setStartsSection(bStartsSection): sap.ui.unified.ShellHeadItem
Sets a new value for property startsSection.

If set to true, a divider is displayed before the item.

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

Default value is false.

Parameters:
{boolean}bStartsSection New value for property startsSection
Deprecated:
Since version 1.18. Dividers are not supported anymore.
Returns:
{sap.ui.unified.ShellHeadItem} Reference to this in order to allow method chaining