Is used to display some continous text. The control can inherit the text direction from its parent control.
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#constructor for a general description of the syntax of the settings object.
new sap.ui.commons.TextView(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 |
---|---|---|---|
accessibleRole | sap.ui.core.AccessibleRole | The ARIA role for the control. Visibility: public |
|
design | sap.ui.commons.TextViewDesign | Standard | Defines the visual appearance of the control. Visibility: public |
enabled | boolean | true | Switches the enabled state of the control. When the control is disabled, it is greyed out and no longer focusable. Visibility: public |
helpId | string | empty string | Unique identifier used for help services. Visibility: public |
semanticColor | sap.ui.commons.TextViewColor | Default | Semantic color of the text View Visibility: public |
text | string | empty string | Text to be displayed. Visibility: public |
textAlign | sap.ui.core.TextAlign | Begin | Sets the horizontal alignment of the text. Visibility: public |
textDirection | sap.ui.core.TextDirection | Inherit | Determines the text directionality. Available options are LTR and RTL. Alternatively, the control can inherit the text direction from its parent control. Visibility: public |
width | sap.ui.core.CSSSize | Width of the TextView Visibility: public |
|
wrapping | boolean | true | Disabled automatic wrapping of the text. Visibility: public |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaDescribedBy | 0..n | sap.ui.core.Control |
Association to controls / IDs which describe this control (see WAI-ARIA attribute aria-describedby). |
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / IDs which label this control (see WAI-ARIA attribute aria-labelledby). |
Method | Description |
---|---|
addAriaDescribedBy |
Adds some ariaDescribedBy into the association ariaDescribedBy. |
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
bindText |
Binds property text to model data. See ManagedObject.bindProperty for a detailed description of the possible properties of |
sap.ui.commons.TextView.extend |
Creates a new subclass of class sap.ui.commons.TextView with name
|
getAccessibilityInfo |
References:
|
getAccessibleRole |
Gets current value of property accessibleRole. The ARIA role for the control. |
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. Defines the visual appearance of the control. Default value is |
getEnabled |
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 |
getHelpId |
Gets current value of property helpId. Unique identifier used for help services. Default value is |
sap.ui.commons.TextView.getMetadata |
Returns a metadata object for class sap.ui.commons.TextView. |
getSemanticColor |
Gets current value of property semanticColor. Semantic color of the text View Default value is |
getText |
Gets current value of property text. Text to be displayed. Default value is |
getTextAlign |
Gets current value of property textAlign. Sets the horizontal alignment of the text. Default value is |
getTextDirection |
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 |
getWidth |
Gets current value of property width. Width of the TextView |
getWrapping |
Gets current value of property wrapping. Disabled automatic wrapping of the text. Default value is |
removeAllAriaDescribedBy |
Removes all the controls in the association named ariaDescribedBy. |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAriaDescribedBy |
Removes an ariaDescribedBy from the association named ariaDescribedBy. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
setAccessibleRole |
Sets a new value for property accessibleRole. The ARIA role for the control. When called with a value of |
setDesign |
Sets a new value for property design. Defines the visual appearance of the control. When called with a value of Default value is |
setEnabled |
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 Default value is |
setHelpId |
Sets a new value for property helpId. Unique identifier used for help services. When called with a value of Default value is |
setSemanticColor |
Sets a new value for property semanticColor. Semantic color of the text View When called with a value of Default value is |
setText |
Sets a new value for property text. Text to be displayed. When called with a value of Default value is |
setTextAlign |
Sets a new value for property textAlign. Sets the horizontal alignment of the text. When called with a value of Default value is |
setTextDirection |
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 Default value is |
setWidth |
Sets a new value for property width. Width of the TextView When called with a value of |
setWrapping |
Sets a new value for property wrapping. Disabled automatic wrapping of the text. When called with a value of Default value is |
unbindText |
Unbinds property text from model data. |
Adds some ariaDescribedBy into the association ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to add; if empty, nothing is inserted |
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 |
Binds property text to model data.
See ManagedObject.bindProperty for a detailed description of the possible properties of oBindingInfo
Param | Type | DefaultValue | Description |
---|---|---|---|
oBindingInfo | sap.ui.base.ManagedObject.PropertyBindingInfo |
The binding information |
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.
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 |
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Gets current value of property design.
Defines the visual appearance of the control.
Default value is Standard
.
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
.
Gets current value of property helpId.
Unique identifier used for help services.
Default value is empty string
.
Gets current value of property semanticColor.
Semantic color of the text View
Default value is Default
.
Gets current value of property textAlign.
Sets the horizontal alignment of the text.
Default value is Begin
.
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
.
Gets current value of property wrapping.
Disabled automatic wrapping of the text.
Default value is true
.
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to be removed or its index or ID |
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 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAccessibleRole | sap.ui.core.AccessibleRole |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDesign | sap.ui.commons.TextViewDesign | Standard |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnabled | boolean | true |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHelpId | string | '' |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSemanticColor | sap.ui.commons.TextViewColor | Default |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sText | string | '' |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextAlign | sap.ui.core.TextAlign | Begin |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextDirection | sap.ui.core.TextDirection | Inherit |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bWrapping | boolean | true |
New value for property |