Shows numeric values used for example in tiles colored according to their meaning and displays deviations.
Constructor for a new sap.m.GenericTile control.
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.m.NumericContent(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 |
---|---|---|---|
adaptiveFontSize | boolean | true | If set to its default value true this property applies the appropriate font style class based on the language. When set to false the font size will always be large |
animateTextChange | boolean | true | If set to true, the change of the value will be animated. Visibility: public |
formatterValue | boolean | false | If set to true, the value parameter contains a numeric value and scale. If set to false (default), the value parameter contains a numeric value only. Visibility: public |
icon | sap.ui.core.URI | The icon to be displayed as a graphical element within the control. This can be an image or an icon from the icon font. Visibility: public |
|
iconDescription | string | Description of an icon that is used in the tooltip. Visibility: public |
|
indicator | sap.m.DeviationIndicator | None | The indicator arrow that shows value deviation. Visibility: public |
nullifyValue | boolean | true | If set to true, the omitted value property is set to 0. Visibility: public |
scale | string | The scaling prefix. Financial characters can be used for currencies and counters. The SI prefixes can be used for units. If the scaling prefix contains more than three characters, only the first three characters are displayed. Visibility: public |
|
size | sap.m.Size | Auto | Updates the size of the control. If not set, then the default size is applied based on the device tile. Visibility: public |
state | sap.m.LoadState | Loaded | Indicates the load status. Visibility: public |
truncateValueTo | int | The number of characters of the Note If |
|
value | string | The actual value. Visibility: public |
|
valueColor | sap.m.ValueColor | Neutral | The semantic color of the value. Visibility: public |
width | sap.ui.core.CSSSize | The width of the control. If it is not set, the size of the control is defined by the 'size' property. Visibility: public |
|
withMargin | boolean | true | If the value is set to false, the content is adjusted to the whole size of the control. Visibility: public |
Event | Description |
---|---|
press |
The event is fired when the user chooses the numeric content. |
Method | Description |
---|---|
attachPress |
Attaches event handler When called, the context of the event handler (its The event is fired when the user chooses the numeric content. |
detachPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.NumericContent.extend |
Creates a new subclass of class sap.m.NumericContent with name
|
firePress |
Fires event press to attached listeners. |
getAdaptiveFontSize |
Gets current value of property adaptiveFontSize. If set to its default value true this property applies the appropriate font style class based on the language. When set to false the font size will always be large Default value is |
getAnimateTextChange |
Gets current value of property animateTextChange. If set to true, the change of the value will be animated. Default value is |
getFormatterValue |
Gets current value of property formatterValue. If set to true, the value parameter contains a numeric value and scale. If set to false (default), the value parameter contains a numeric value only. Default value is |
getIcon |
Gets current value of property icon. The icon to be displayed as a graphical element within the control. This can be an image or an icon from the icon font. |
getIconDescription |
Gets current value of property iconDescription. Description of an icon that is used in the tooltip. |
getIndicator |
Gets current value of property indicator. The indicator arrow that shows value deviation. Default value is |
sap.m.NumericContent.getMetadata |
Returns a metadata object for class sap.m.NumericContent. |
getNullifyValue |
Gets current value of property nullifyValue. If set to true, the omitted value property is set to 0. Default value is |
getScale |
Gets current value of property scale. The scaling prefix. Financial characters can be used for currencies and counters. The SI prefixes can be used for units. If the scaling prefix contains more than three characters, only the first three characters are displayed. |
getSize |
Gets current value of property size. Updates the size of the control. If not set, then the default size is applied based on the device tile. Default value is
Since 1.38.0 The NumericContent control has now a fixed size, depending on the used media (desktop, tablet or phone).
|
getState |
Gets current value of property state. Indicates the load status. Default value is |
getTruncateValueTo |
Gets current value of property truncateValueTo. The number of characters of the Note If |
getValue |
Gets current value of property value. The actual value. |
getValueColor |
Gets current value of property valueColor. The semantic color of the value. Default value is |
getWidth |
Gets current value of property width. The width of the control. If it is not set, the size of the control is defined by the 'size' property. |
getWithMargin |
Gets current value of property withMargin. If the value is set to false, the content is adjusted to the whole size of the control. Default value is |
setAdaptiveFontSize |
Sets a new value for property adaptiveFontSize. If set to its default value true this property applies the appropriate font style class based on the language. When set to false the font size will always be large When called with a value of Default value is |
setAnimateTextChange |
Sets a new value for property animateTextChange. If set to true, the change of the value will be animated. When called with a value of Default value is |
setFormatterValue |
Sets a new value for property formatterValue. If set to true, the value parameter contains a numeric value and scale. If set to false (default), the value parameter contains a numeric value only. When called with a value of Default value is |
setIcon |
Sets a new value for property icon. The icon to be displayed as a graphical element within the control. This can be an image or an icon from the icon font. When called with a value of |
setIconDescription |
Sets a new value for property iconDescription. Description of an icon that is used in the tooltip. When called with a value of |
setIndicator |
Sets a new value for property indicator. The indicator arrow that shows value deviation. When called with a value of Default value is |
setNullifyValue |
Sets a new value for property nullifyValue. If set to true, the omitted value property is set to 0. When called with a value of Default value is |
setScale |
Sets a new value for property scale. The scaling prefix. Financial characters can be used for currencies and counters. The SI prefixes can be used for units. If the scaling prefix contains more than three characters, only the first three characters are displayed. When called with a value of |
setSize |
Sets a new value for property size. Updates the size of the control. If not set, then the default size is applied based on the device tile. When called with a value of Default value is
Since 1.38.0 The NumericContent control has now a fixed size, depending on the used media (desktop, tablet or phone).
|
setState |
Sets a new value for property state. Indicates the load status. When called with a value of Default value is |
setTruncateValueTo |
Sets a new value for property truncateValueTo. The number of characters of the Note If When called with a value of |
setValue |
Sets a new value for property value. The actual value. When called with a value of |
setValueColor |
Sets a new value for property valueColor. The semantic color of the value. When called with a value of Default value is |
setWidth |
Sets a new value for property width. The width of the control. If it is not set, the size of the control is defined by the 'size' property. When called with a value of |
setWithMargin |
Sets a new value for property withMargin. If the value is set to false, the content is adjusted to the whole size of the control. When called with a value of Default value is |
Attaches event handler fnFunction
to the press event of this sap.m.NumericContent
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.NumericContent
itself.
The event is fired when the user chooses the numeric content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the press event of this sap.m.NumericContent
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.m.NumericContent 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 |
Fires event press to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Gets current value of property adaptiveFontSize.
If set to its default value true this property applies the appropriate font style class based on the language. When set to false the font size will always be large
Default value is true
.
Gets current value of property animateTextChange.
If set to true, the change of the value will be animated.
Default value is true
.
Gets current value of property formatterValue.
If set to true, the value parameter contains a numeric value and scale. If set to false (default), the value parameter contains a numeric value only.
Default value is false
.
Gets current value of property icon.
The icon to be displayed as a graphical element within the control. This can be an image or an icon from the icon font.
Gets current value of property iconDescription.
Description of an icon that is used in the tooltip.
Gets current value of property indicator.
The indicator arrow that shows value deviation.
Default value is "None"
.
Gets current value of property nullifyValue.
If set to true, the omitted value property is set to 0.
Default value is true
.
Gets current value of property scale.
The scaling prefix. Financial characters can be used for currencies and counters. The SI prefixes can be used for units. If the scaling prefix contains more than three characters, only the first three characters are displayed.
Gets current value of property size.
Updates the size of the control. If not set, then the default size is applied based on the device tile.
Default value is "Auto"
.
Gets current value of property truncateValueTo.
The number of characters of the value
property to display.
Note If adaptiveFontSize
is set to true
the default value of this property will vary between languages. If adaptiveFontSize
is set to false
the default value of this property is 4
.
Gets current value of property valueColor.
The semantic color of the value.
Default value is "Neutral"
.
Gets current value of property width.
The width of the control. If it is not set, the size of the control is defined by the 'size' property.
Gets current value of property withMargin.
If the value is set to false, the content is adjusted to the whole size of the control.
Default value is true
.
Sets a new value for property adaptiveFontSize.
If set to its default value true this property applies the appropriate font style class based on the language. When set to false the font size will always be large
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 |
---|---|---|---|
bAdaptiveFontSize | boolean | true |
New value for property |
Sets a new value for property animateTextChange.
If set to true, the change of the value will be animated.
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 |
---|---|---|---|
bAnimateTextChange | boolean | true |
New value for property |
Sets a new value for property formatterValue.
If set to true, the value parameter contains a numeric value and scale. If set to false (default), the value parameter contains a numeric value only.
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 |
---|---|---|---|
bFormatterValue | boolean | false |
New value for property |
Sets a new value for property icon.
The icon to be displayed as a graphical element within the control. This can be an image or an icon from the icon font.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIcon | sap.ui.core.URI |
New value for property |
Sets a new value for property iconDescription.
Description of an icon that is used in the tooltip.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconDescription | string |
New value for property |
Sets a new value for property indicator.
The indicator arrow that shows value deviation.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "None"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIndicator | sap.m.DeviationIndicator | "None" |
New value for property |
Sets a new value for property nullifyValue.
If set to true, the omitted value property is set to 0.
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 |
---|---|---|---|
bNullifyValue | boolean | true |
New value for property |
Sets a new value for property scale.
The scaling prefix. Financial characters can be used for currencies and counters. The SI prefixes can be used for units. If the scaling prefix contains more than three characters, only the first three characters are displayed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sScale | string |
New value for property |
Sets a new value for property size.
Updates the size of the control. If not set, then the default size is applied based on the device tile.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "Auto"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSize | sap.m.Size | "Auto" |
New value for property |
Sets a new value for property state.
Indicates the load status.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "Loaded"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sState | sap.m.LoadState | "Loaded" |
New value for property |
Sets a new value for property truncateValueTo.
The number of characters of the value
property to display.
Note If adaptiveFontSize
is set to true
the default value of this property will vary between languages. If adaptiveFontSize
is set to false
the default value of this property is 4
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
iTruncateValueTo | int |
New value for property |
Sets a new value for property value.
The actual value.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | string |
New value for property |
Sets a new value for property valueColor.
The semantic color of the value.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "Neutral"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValueColor | sap.m.ValueColor | "Neutral" |
New value for property |
Sets a new value for property width.
The width of the control. If it is not set, the size of the control is defined by the 'size' property.
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 withMargin.
If the value is set to false, the content is adjusted to the whole size of the control.
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 |
---|---|---|---|
bWithMargin | boolean | true |
New value for property |