Class sap.ui.core.TitleModule: sap/ui/core/Title

extends Element
known direct subclasses: Title

Represents a title element that can be used for aggregation with other controls


Since: 1.16.0.
Constructor Summary
new sap.ui.core.Title(sId?, mSettings?)Constructor for a new Title.
Method Summary
sap.ui.core.Title.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.Title with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.Title.getMetadata()Returns a metadata object for class sap.ui.core.Title.
getEmphasized()Gets current value of property emphasized.
getIcon()Gets current value of property icon.
getLevel()Gets current value of property level.
getText()Gets current value of property text.
setEmphasized(bEmphasized)Sets a new value for property emphasized.
setIcon(sIcon)Sets a new value for property icon.
setLevel(sLevel)Sets a new value for property level.
setText(sText)Sets a new value for property text.
Constructor Detail
new sap.ui.core.Title(sId?, mSettings?)
Constructor for a new Title.

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
    • text : string
    • icon : sap.ui.core.URI
    • level : sap.ui.core.TitleLevel (default: Auto)
    • emphasized : boolean (default: false)

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
Method Detail
sap.ui.core.Title.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.Title 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.core.Title.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.Title.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getEmphasized(): boolean
Gets current value of property emphasized.

If set the title is displayed emphasized. This feature is nor supported by all controls using the Title.control.

Default value is false.

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

Defines the URL for icon display

Returns:
{sap.ui.core.URI} Value of property icon
Gets current value of property level.

Defines the level of the title. If set to auto the level of the title is chosen by the control rendering the title.

Currently not all controls using the Title.control supporting this property.

Default value is Auto.

Returns:
{sap.ui.core.TitleLevel} Value of property level
getText(): string
Gets current value of property text.

Defines the title text

Returns:
{string} Value of property text
setEmphasized(bEmphasized): sap.ui.core.Title
Sets a new value for property emphasized.

If set the title is displayed emphasized. This feature is nor supported by all controls using the Title.control.

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

Default value is false.

Parameters:
{boolean}bEmphasized New value for property emphasized
Returns:
{sap.ui.core.Title} Reference to this in order to allow method chaining
setIcon(sIcon): sap.ui.core.Title
Sets a new value for property icon.

Defines the URL for icon display

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.core.Title} Reference to this in order to allow method chaining
setLevel(sLevel): sap.ui.core.Title
Sets a new value for property level.

Defines the level of the title. If set to auto the level of the title is chosen by the control rendering the title.

Currently not all controls using the Title.control supporting this property.

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

Default value is Auto.

Parameters:
{sap.ui.core.TitleLevel}sLevel New value for property level
Returns:
{sap.ui.core.Title} Reference to this in order to allow method chaining
setText(sText): sap.ui.core.Title
Sets a new value for property text.

Defines the title text

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

Parameters:
{string}sText New value for property text
Returns:
{sap.ui.core.Title} Reference to this in order to allow method chaining