Class sap.ui.commons.TextViewModule: sap/ui/commons/TextView

extends Control
implements ToolbarItem

Is used to display some continous text. The control can inherit the text direction from its parent control.

Deprecated API:Since version 1.38.

Constructor Summary
new sap.ui.commons.TextView(sId?, mSettings?)Constructor for a new TextView.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.commons.TextView.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.TextView with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.TextView.getMetadata()Returns a metadata object for class sap.ui.commons.TextView.
addAriaDescribedBy(vAriaDescribedBy)Adds some ariaDescribedBy into the association ariaDescribedBy.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
bindText(oBindingInfo)Binds property text to model data.
getAccessibleRole()Gets current value of property accessibleRole.
getAriaDescribedBy()Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getDesign()Gets current value of property design.
getEnabled()Gets current value of property enabled.
getHelpId()Gets current value of property helpId.
getSemanticColor()Gets current value of property semanticColor.
getText()Gets current value of property text.
getTextAlign()Gets current value of property textAlign.
getTextDirection()Gets current value of property textDirection.
getWidth()Gets current value of property width.
getWrapping()Gets current value of property wrapping.
removeAllAriaDescribedBy()Removes all the controls in the association named ariaDescribedBy.
removeAllAriaLabelledBy()Removes all the controls in the association named ariaLabelledBy.
removeAriaDescribedBy(vAriaDescribedBy)Removes an ariaDescribedBy from the association named ariaDescribedBy.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
setAccessibleRole(sAccessibleRole)Sets a new value for property accessibleRole.
setDesign(sDesign)Sets a new value for property design.
setEnabled(bEnabled)Sets a new value for property enabled.
setHelpId(sHelpId)Sets a new value for property helpId.
setSemanticColor(sSemanticColor)Sets a new value for property semanticColor.
setText(sText)Sets a new value for property text.
setTextAlign(sTextAlign)Sets a new value for property textAlign.
setTextDirection(sTextDirection)Sets a new value for property textDirection.
setWidth(sWidth)Sets a new value for property width.
setWrapping(bWrapping)Sets a new value for property wrapping.
unbindText()Unbinds property text from model data.
Constructor Detail
new sap.ui.commons.TextView(sId?, mSettings?)
Constructor for a new TextView.

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

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
Deprecated:
Since version 1.38.
Method Detail
sap.ui.commons.TextView.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.TextView 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.ui.commons.TextView.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.TextView.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAriaDescribedBy(vAriaDescribedBy): sap.ui.commons.TextView
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
{string|sap.ui.core.Control}vAriaDescribedBy the ariaDescribedBy to add; if empty, nothing is inserted
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
addAriaLabelledBy(vAriaLabelledBy): sap.ui.commons.TextView
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.commons.TextView} Reference to this in order to allow method chaining
bindText(oBindingInfo): sap.ui.commons.TextView
Binds property text to model data.

See ManagedObject.bindProperty for a detailed description of the possible properties of oBindingInfo

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
getAccessibilityInfo()
See:
{sap.ui.core.Control#getAccessibilityInfo}
getAccessibleRole(): sap.ui.core.AccessibleRole
Gets current value of property accessibleRole.

The ARIA role for the control.

Returns:
{sap.ui.core.AccessibleRole} Value of property accessibleRole
getAriaDescribedBy(): sap.ui.core.Control[]
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
{sap.ui.core.Control[]}
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[]}
Gets current value of property design.

Defines the visual appearance of the control.

Default value is Standard.

Returns:
{sap.ui.commons.TextViewDesign} Value of property design
getEnabled(): boolean
Gets current value of property enabled.

Switches the enabled state of the control. When the control is disabled, it is greyed out and no longer focusable.

Default value is true.

Returns:
{boolean} Value of property enabled
getHelpId(): string
Gets current value of property helpId.

Unique identifier used for help services.

Default value is .

Returns:
{string} Value of property helpId
getSemanticColor(): sap.ui.commons.TextViewColor
Gets current value of property semanticColor.

Semantic color of the text View

Default value is Default.

Returns:
{sap.ui.commons.TextViewColor} Value of property semanticColor
getText(): string
Gets current value of property text.

Text to be displayed.

Default value is .

Returns:
{string} Value of property text
getTextAlign(): sap.ui.core.TextAlign
Gets current value of property textAlign.

Sets the horizontal alignment of the text.

Default value is Begin.

Returns:
{sap.ui.core.TextAlign} Value of property textAlign
getTextDirection(): sap.ui.core.TextDirection
Gets current value of property textDirection.

Determines the text directionality. Available options are LTR and RTL. Alternatively, the control can inherit the text direction from its parent control.

Default value is Inherit.

Returns:
{sap.ui.core.TextDirection} Value of property textDirection
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Width of the TextView

Returns:
{sap.ui.core.CSSSize} Value of property width
getWrapping(): boolean
Gets current value of property wrapping.

Disabled automatic wrapping of the text.

Default value is true.

Returns:
{boolean} Value of property wrapping
removeAllAriaDescribedBy(): sap.ui.core.Control[]
Removes all the controls in the association named ariaDescribedBy.
Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
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)
removeAriaDescribedBy(vAriaDescribedBy): sap.ui.core.Control
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
{int|string|sap.ui.core.Control}vAriaDescribedBy The ariaDescribedByto be removed or its index or ID
Returns:
{sap.ui.core.Control} the removed ariaDescribedBy or null
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
setAccessibleRole(sAccessibleRole): sap.ui.commons.TextView
Sets a new value for property accessibleRole.

The ARIA role for the control.

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

Parameters:
{sap.ui.core.AccessibleRole}sAccessibleRole New value for property accessibleRole
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setDesign(sDesign): sap.ui.commons.TextView
Sets a new value for property design.

Defines the visual appearance of the control.

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

Default value is Standard.

Parameters:
{sap.ui.commons.TextViewDesign}sDesign New value for property design
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setEnabled(bEnabled): sap.ui.commons.TextView
Sets a new value for property enabled.

Switches the enabled state of the control. When the control is disabled, it is greyed out and no longer focusable.

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

Default value is true.

Parameters:
{boolean}bEnabled New value for property enabled
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setHelpId(sHelpId): sap.ui.commons.TextView
Sets a new value for property helpId.

Unique identifier used for help services.

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

Default value is .

Parameters:
{string}sHelpId New value for property helpId
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setSemanticColor(sSemanticColor): sap.ui.commons.TextView
Sets a new value for property semanticColor.

Semantic color of the text View

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

Default value is Default.

Parameters:
{sap.ui.commons.TextViewColor}sSemanticColor New value for property semanticColor
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setText(sText): sap.ui.commons.TextView
Sets a new value for property text.

Text to be displayed.

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

Default value is .

Parameters:
{string}sText New value for property text
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setTextAlign(sTextAlign): sap.ui.commons.TextView
Sets a new value for property textAlign.

Sets the horizontal alignment of the text.

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

Default value is Begin.

Parameters:
{sap.ui.core.TextAlign}sTextAlign New value for property textAlign
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setTextDirection(sTextDirection): sap.ui.commons.TextView
Sets a new value for property textDirection.

Determines the text directionality. Available options are LTR and RTL. Alternatively, the control can inherit the text direction from its parent control.

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

Default value is Inherit.

Parameters:
{sap.ui.core.TextDirection}sTextDirection New value for property textDirection
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setWidth(sWidth): sap.ui.commons.TextView
Sets a new value for property width.

Width of the TextView

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

Parameters:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
setWrapping(bWrapping): sap.ui.commons.TextView
Sets a new value for property wrapping.

Disabled automatic wrapping of the text.

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

Default value is true.

Parameters:
{boolean}bWrapping New value for property wrapping
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining
Unbinds property text from model data.
Returns:
{sap.ui.commons.TextView} Reference to this in order to allow method chaining