Header Action item of the Shell.
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#constructor for a general description of the syntax of the settings object.
new sap.ui.unified.ShellHeadItem(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 |
---|---|---|---|
icon | sap.ui.core.URI | The icon of the item, either defined in the sap.ui.core.IconPool or a URI to a custom image. An icon must be set. Visibility: public |
|
selected | boolean | false | Defines the toggle state in case the item represents a toggle button (see also property |
showMarker | boolean | false | If set to true, a theme dependent marker is shown on the item. Visibility: public |
showSeparator | boolean | true | If set to true, a separator is displayed after the item. |
startsSection | boolean | false | If set to true, a divider is displayed before the item. Visibility: public |
toggleEnabled | boolean | true | If set to true, the item represents a toggle button. The |
visible | boolean | true | Invisible items are not shown on the UI. |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledby). |
Method | Description |
---|---|
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
attachPress |
Attaches event handler When called, the context of the event handler (its Event is fired when the user presses the item. |
detachPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.unified.ShellHeadItem.extend |
Creates a new subclass of class sap.ui.unified.ShellHeadItem with name
|
firePress |
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. The icon of the item, either defined in the sap.ui.core.IconPool or a URI to a custom image. An icon must be set. |
sap.ui.unified.ShellHeadItem.getMetadata |
Returns a metadata object for class sap.ui.unified.ShellHeadItem. |
getSelected |
Gets current value of property selected. Defines the toggle state in case the item represents a toggle button (see also property Default value is |
getShowMarker |
Gets current value of property showMarker. If set to true, a theme dependent marker is shown on the item. Default value is
Since 1.18 Markers should not be used anymore.
|
getShowSeparator |
Gets current value of property showSeparator. If set to true, a separator is displayed after the item. Default value is |
getStartsSection |
Gets current value of property startsSection. If set to true, a divider is displayed before the item. Default value is
Since 1.18 Dividers are not supported anymore.
|
getToggleEnabled |
Gets current value of property toggleEnabled. If set to true, the item represents a toggle button. The Default value is |
getVisible |
Gets current value of property visible. Invisible items are not shown on the UI. Default value is |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
setIcon |
Sets a new value for property icon. The icon of the item, either defined in the sap.ui.core.IconPool or a URI to a custom image. An icon must be set. When called with a value of |
setSelected |
Sets a new value for property selected. Defines the toggle state in case the item represents a toggle button (see also property When called with a value of Default value is |
setShowMarker |
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 Default value is
Since 1.18 Markers should not be used anymore.
|
setShowSeparator |
Sets a new value for property showSeparator. If set to true, a separator is displayed after the item. When called with a value of Default value is |
setStartsSection |
Sets a new value for property startsSection. If set to true, a divider is displayed before the item. When called with a value of Default value is
Since 1.18 Dividers are not supported anymore.
|
setToggleEnabled |
Sets a new value for property toggleEnabled. If set to true, the item represents a toggle button. The When called with a value of Default value is |
setVisible |
Sets a new value for property visible. Invisible items are not shown on the UI. When called with a value of Default value is |
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 |
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.
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 press event of this sap.ui.unified.ShellHeadItem
.
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.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.
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 press 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 icon.
The icon of the item, either defined in the sap.ui.core.IconPool or a URI to a custom image. An icon must be set.
Returns a metadata object for class sap.ui.unified.ShellHeadItem.
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
.
Gets current value of property showMarker.
If set to true, a theme dependent marker is shown on the item.
Default value is false
.
Gets current value of property showSeparator.
If set to true, a separator is displayed after the item.
Default value is true
.
Gets current value of property startsSection.
If set to true, a divider is displayed before the item.
Default value is false
.
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
.
Gets current value of property visible.
Invisible items are not shown on the UI.
Default value is true
.
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 |
Sets a new value for property icon.
The icon of the item, either defined in the sap.ui.core.IconPool or a 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIcon | sap.ui.core.URI |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bSelected | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowMarker | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowSeparator | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bStartsSection | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bToggleEnabled | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bVisible | boolean | true |
New value for property |