The InfoLabel
is a small non-interactive control which contains text information and non-semantic color chosen from a list of predefined color schemes. It serves the purpose to attract the user attention to some piece of information (state, quantity, condition, etc.).
The control visualizes text information without user interaction. The text inside the control is always in upper case. It can have smaller or larger side paddings which can be specified by the renderMode
property. The text-background color pair can be changed by setting a number between 1 and 10 that corresponds to the 10 predefined color combinations of the colorScheme
property. The control is designed to be vertically aligned with UI5 Input and Button control families. When using InfoLabel
in non-editable Forms
, Tables
, etc., set displayOnly=true
for best visual results.
Constructor for a new InfoLabel
.
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.tnt.InfoLabel(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 |
---|---|---|---|
colorScheme | int | 7 | Specifies the fill and text color of the control. Accepts a number between 1 and 10 as a value. You can choose from 10 predefined background and text color combinations. The color schemes are non-semantic, you can select them according to your own preferences. Note: ColorScheme 10 is available only in Fiori 3 theme. The default |
displayOnly | boolean | false | Determines if the |
icon | sap.ui.core.URI | empty string | Defines the icon to be displayed as graphical element within the |
renderMode | sap.tnt.RenderMode | Loose | Specifies the type of the |
text | string | empty string | Specifies the text inside the |
textDirection | sap.ui.core.TextDirection | Inherit | Available options for the text direction are LTR and RTL. By default the control inherits the text direction from its parent control. Visibility: public |
width | sap.ui.core.CSSSize | Specifies the width of the |
Method | Description |
---|---|
bindText |
Binds property text to model data. See ManagedObject.bindProperty for a detailed description of the possible properties of |
sap.tnt.InfoLabel.extend |
Creates a new subclass of class sap.tnt.InfoLabel with name
|
getColorScheme |
Gets current value of property colorScheme. Specifies the fill and text color of the control. Accepts a number between 1 and 10 as a value. You can choose from 10 predefined background and text color combinations. The color schemes are non-semantic, you can select them according to your own preferences. Note: ColorScheme 10 is available only in Fiori 3 theme. The default Default value is |
getDisplayOnly |
Gets current value of property displayOnly. Determines if the Default value is |
getIcon |
Gets current value of property icon. Defines the icon to be displayed as graphical element within the Default value is |
sap.tnt.InfoLabel.getMetadata |
Returns a metadata object for class sap.tnt.InfoLabel. |
getRenderMode |
Gets current value of property renderMode. Specifies the type of the Default value is |
getText |
Gets current value of property text. Specifies the text inside the Default value is |
getTextDirection |
Gets current value of property textDirection. Available options for the text direction are LTR and RTL. By default the control inherits the text direction from its parent control. Default value is |
getWidth |
Gets current value of property width. Specifies the width of the |
setColorScheme |
Sets a new value for property colorScheme. Specifies the fill and text color of the control. Accepts a number between 1 and 10 as a value. You can choose from 10 predefined background and text color combinations. The color schemes are non-semantic, you can select them according to your own preferences. Note: ColorScheme 10 is available only in Fiori 3 theme. The default When called with a value of Default value is |
setDisplayOnly |
Sets a new value for property displayOnly. Determines if the When called with a value of Default value is |
setIcon |
Sets a new value for property icon. Defines the icon to be displayed as graphical element within the When called with a value of Default value is |
setRenderMode |
Sets a new value for property renderMode. Specifies the type of the When called with a value of Default value is |
setText |
Sets a new value for property text. Specifies the text inside the When called with a value of Default value is |
setTextDirection |
Sets a new value for property textDirection. Available options for the text direction are LTR and RTL. By default the control inherits the text direction from its parent control. When called with a value of Default value is |
setWidth |
Sets a new value for property width. Specifies the width of the When called with a value of |
unbindText |
Unbinds property text from model data. |
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.tnt.InfoLabel 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 |
Gets current value of property colorScheme.
Specifies the fill and text color of the control. Accepts a number between 1 and 10 as a value. You can choose from 10 predefined background and text color combinations. The color schemes are non-semantic, you can select them according to your own preferences. Note: ColorScheme 10 is available only in Fiori 3 theme. The default colorScheme
is 7.
Default value is 7
.
Gets current value of property displayOnly.
Determines if the InfoLabel
is in displayOnly
mode. When set to true
the control size adjusts to fit other controls, for example non-editable Forms
.
Default value is false
.
Gets current value of property icon.
Defines the icon to be displayed as graphical element within the InfoLabel
. It can be an icon from the icon font.
Default value is empty string
.
Gets current value of property renderMode.
Specifies the type of the InfoLabel
paddings - loose or narrow. Note: By default the padding is loose. It is recommended to use narrow (smaller) paddings for numeric texts.
Default value is Loose
.
Gets current value of property text.
Specifies the text inside the InfoLabel
control.
Default value is empty string
.
Gets current value of property textDirection.
Available options for the text direction are LTR and RTL. By default the control inherits the text direction from its parent control.
Default value is Inherit
.
Gets current value of property width.
Specifies the width of the InfoLabel
control. By default, the InfoLabel
control has the width of the content. Set this property to restrict the width to a custom value.
Sets a new value for property colorScheme.
Specifies the fill and text color of the control. Accepts a number between 1 and 10 as a value. You can choose from 10 predefined background and text color combinations. The color schemes are non-semantic, you can select them according to your own preferences. Note: ColorScheme 10 is available only in Fiori 3 theme. The default colorScheme
is 7.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 7
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iColorScheme | int | 7 |
New value for property |
Sets a new value for property displayOnly.
Determines if the InfoLabel
is in displayOnly
mode. When set to true
the control size adjusts to fit other controls, for example non-editable Forms
.
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 |
---|---|---|---|
bDisplayOnly | boolean | false |
New value for property |
Sets a new value for property icon.
Defines the icon to be displayed as graphical element within the InfoLabel
. It can be an icon from the icon font.
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 |
---|---|---|---|
sIcon | sap.ui.core.URI | "" |
New value for property |
Sets a new value for property renderMode.
Specifies the type of the InfoLabel
paddings - loose or narrow. Note: By default the padding is loose. It is recommended to use narrow (smaller) paddings for numeric texts.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Loose
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sRenderMode | sap.tnt.RenderMode | Loose |
New value for property |
Sets a new value for property text.
Specifies the text inside the InfoLabel
control.
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 textDirection.
Available options for the text direction are LTR and RTL. By default the control inherits 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.
Specifies the width of the InfoLabel
control. By default, the InfoLabel
control has the width of the content. Set this property to restrict the width to a custom value.
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 |