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

extends Control

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:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new control
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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated 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.MetadataMetadata object describing this class
addAriaDescribedBy(vAriaDescribedBy): sap.ui.commons.TextView
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedBythe ariaDescribedBy to add; if empty, nothing is inserted
Returns:
sap.ui.commons.TextViewReference to this in order to allow method chaining
addAriaLabelledBy(vAriaLabelledBy): sap.ui.commons.TextView
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledBythe ariaLabelledBy to add; if empty, nothing is inserted
Returns:
sap.ui.commons.TextViewReference 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:
objectoBindingInfoThe binding information
Returns:
sap.ui.commons.TextViewReference 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.AccessibleRoleValue of property accessibleRole
getAriaDescribedBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
sap.ui.core.ID[]
getAriaLabelledBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
sap.ui.core.ID[]

Gets current value of property design.

Defines the visual appearance of the control.

Default value is Standard.

Returns:
sap.ui.commons.TextViewDesignValue 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:
booleanValue of property enabled
getHelpId(): string

Gets current value of property helpId.

Unique identifier used for help services.

Default value is .

Returns:
stringValue 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.TextViewColorValue of property semanticColor
getText(): string

Gets current value of property text.

Text to be displayed.

Default value is .

Returns:
stringValue 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.TextAlignValue 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.TextDirectionValue of property textDirection
getWidth(): sap.ui.core.CSSSize

Gets current value of property width.

Width of the TextView

Returns:
sap.ui.core.CSSSizeValue of property width
getWrapping(): boolean

Gets current value of property wrapping.

Disabled automatic wrapping of the text.

Default value is true.

Returns:
booleanValue of property wrapping
removeAllAriaDescribedBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaDescribedBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAllAriaLabelledBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAriaDescribedBy(vAriaDescribedBy): sap.ui.core.ID
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedByThe ariaDescribedBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaDescribedBy or null
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.ID
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledByThe ariaLabelledBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe 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.AccessibleRolesAccessibleRoleNew value for property accessibleRole
Returns:
sap.ui.commons.TextViewReference 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.TextViewDesignsDesignNew value for property design
Returns:
sap.ui.commons.TextViewReference 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:
booleanbEnabledNew value for property enabled
Returns:
sap.ui.commons.TextViewReference 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:
stringsHelpIdNew value for property helpId
Returns:
sap.ui.commons.TextViewReference 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.TextViewColorsSemanticColorNew value for property semanticColor
Returns:
sap.ui.commons.TextViewReference 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:
stringsTextNew value for property text
Returns:
sap.ui.commons.TextViewReference 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.TextAlignsTextAlignNew value for property textAlign
Returns:
sap.ui.commons.TextViewReference 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.TextDirectionsTextDirectionNew value for property textDirection
Returns:
sap.ui.commons.TextViewReference 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.CSSSizesWidthNew value for property width
Returns:
sap.ui.commons.TextViewReference 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:
booleanbWrappingNew value for property wrapping
Returns:
sap.ui.commons.TextViewReference to this in order to allow method chaining
Unbinds property text from model data.
Returns:
sap.ui.commons.TextViewReference to this in order to allow method chaining