Class sap.m.NumericContentModule: sap/m/NumericContent

extends Control

Shows numeric values used for example in tiles colored according to their meaning and displays deviations.


Since: 1.34.
Constructor Summary
new sap.m.NumericContent(sId?, mSettings?)Constructor for a new sap.m.GenericTile control.
Event Summary
press(oControlEvent)The event is fired when the user chooses the numeric content.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.NumericContent.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.NumericContent with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.NumericContent.getMetadata()Returns a metadata object for class sap.m.NumericContent.
attachPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the press event of this sap.m.NumericContent.
detachPress(fnFunction, oListener)Detaches event handler fnFunction from the press event of this sap.m.NumericContent.
firePress(mArguments?)Fires event press to attached listeners.
getAnimateTextChange()Gets current value of property animateTextChange.
getFormatterValue()Gets current value of property formatterValue.
getIcon()Gets current value of property icon.
getIconDescription()Gets current value of property iconDescription.
getIndicator()Gets current value of property indicator.
getNullifyValue()Gets current value of property nullifyValue.
getScale()Gets current value of property scale.
getState()Gets current value of property state.
getTruncateValueTo()Gets current value of property truncateValueTo.
getValue()Gets current value of property value.
getValueColor()Gets current value of property valueColor.
getWidth()Gets current value of property width.
getWithMargin()Gets current value of property withMargin.
setAnimateTextChange(bAnimateTextChange)Sets a new value for property animateTextChange.
setFormatterValue(bFormatterValue)Sets a new value for property formatterValue.
setIcon(sIcon)Sets a new value for property icon.
setIconDescription(sIconDescription)Sets a new value for property iconDescription.
setIndicator(sIndicator)Sets a new value for property indicator.
setNullifyValue(bNullifyValue)Sets a new value for property nullifyValue.
setScale(sScale)Sets a new value for property scale.
setState(sState)Sets a new value for property state.
setTruncateValueTo(iTruncateValueTo)Sets a new value for property truncateValueTo.
setValue(sValue)Sets a new value for property value.
setValueColor(sValueColor)Sets a new value for property valueColor.
setWidth(sWidth)Sets a new value for property width.
setWithMargin(bWithMargin)Sets a new value for property withMargin.
getSize()Gets current value of property size.
setSize(sSize)Sets a new value for property size.
Constructor Detail
new sap.m.NumericContent(sId?, mSettings?)
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 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:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Event Detail
press(oControlEvent)
The event is fired when the user chooses the numeric content.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.m.NumericContent.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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.m.NumericContent.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.NumericContent.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachPress(oData?, fnFunction, oListener?): sap.m.NumericContent
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.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.NumericContent itself
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
detachPress(fnFunction, oListener): sap.m.NumericContent
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
firePress(mArguments?): sap.m.NumericContent
Fires event press to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
getAnimateTextChange(): boolean
Gets current value of property animateTextChange.

If set to true, the change of the value will be animated.

Default value is true.

Returns:
{boolean} Value of property animateTextChange
getFormatterValue(): boolean
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.

Returns:
{boolean} Value of property formatterValue
getIcon(): sap.ui.core.URI
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.

Returns:
{sap.ui.core.URI} Value of property icon
getIconDescription(): string
Gets current value of property iconDescription.

Description of an icon that is used in the tooltip.

Returns:
{string} Value of property iconDescription
getIndicator(): sap.m.DeviationIndicator
Gets current value of property indicator.

The indicator arrow that shows value deviation.

Default value is None.

Returns:
{sap.m.DeviationIndicator} Value of property indicator
getNullifyValue(): boolean
Gets current value of property nullifyValue.

If set to true, the omitted value property is set to 0.

Default value is true.

Returns:
{boolean} Value of property nullifyValue
getScale(): string
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.

Returns:
{string} Value of property scale
getState(): sap.m.LoadState
Gets current value of property state.

Indicates the load status.

Default value is Loaded.

Returns:
{sap.m.LoadState} Value of property state
getTruncateValueTo(): int
Gets current value of property truncateValueTo.

The number of characters to display for the value property.

Default value is 4.

Returns:
{int} Value of property truncateValueTo
getValue(): string
Gets current value of property value.

The actual value.

Returns:
{string} Value of property value
getValueColor(): sap.m.ValueColor
Gets current value of property valueColor.

The semantic color of the value.

Default value is Neutral.

Returns:
{sap.m.ValueColor} Value of property valueColor
getWidth(): sap.ui.core.CSSSize
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.

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

If the value is set to false, the content will fit to the whole size of the control.

Default value is true.

Returns:
{boolean} Value of property withMargin
setAnimateTextChange(bAnimateTextChange): sap.m.NumericContent
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.

Parameters:
{boolean}bAnimateTextChange New value for property animateTextChange
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setFormatterValue(bFormatterValue): sap.m.NumericContent
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.

Parameters:
{boolean}bFormatterValue New value for property formatterValue
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setIcon(sIcon): sap.m.NumericContent
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.

Parameters:
{sap.ui.core.URI}sIcon New value for property icon
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setIconDescription(sIconDescription): sap.m.NumericContent
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.

Parameters:
{string}sIconDescription New value for property iconDescription
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setIndicator(sIndicator): sap.m.NumericContent
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.

Parameters:
{sap.m.DeviationIndicator}sIndicator New value for property indicator
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setNullifyValue(bNullifyValue): sap.m.NumericContent
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.

Parameters:
{boolean}bNullifyValue New value for property nullifyValue
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setScale(sScale): sap.m.NumericContent
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.

Parameters:
{string}sScale New value for property scale
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setState(sState): sap.m.NumericContent
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.

Parameters:
{sap.m.LoadState}sState New value for property state
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setTruncateValueTo(iTruncateValueTo): sap.m.NumericContent
Sets a new value for property truncateValueTo.

The number of characters to display for the value property.

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

Default value is 4.

Parameters:
{int}iTruncateValueTo New value for property truncateValueTo
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setValue(sValue): sap.m.NumericContent
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.

Parameters:
{string}sValue New value for property value
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setValueColor(sValueColor): sap.m.NumericContent
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.

Parameters:
{sap.m.ValueColor}sValueColor New value for property valueColor
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setWidth(sWidth): sap.m.NumericContent
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.

Parameters:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
setWithMargin(bWithMargin): sap.m.NumericContent
Sets a new value for property withMargin.

If the value is set to false, the content will fit 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.

Parameters:
{boolean}bWithMargin New value for property withMargin
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining
getSize(): sap.m.Size
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.

Deprecated:
Since version 1.38.0. The NumericContent control has now a fixed size, depending on the used media (desktop, tablet or phone).
Returns:
{sap.m.Size} Value of property size
setSize(sSize): sap.m.NumericContent
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.

Parameters:
{sap.m.Size}sSize New value for property size
Deprecated:
Since version 1.38.0. The NumericContent control has now a fixed size, depending on the used media (desktop, tablet or phone).
Returns:
{sap.m.NumericContent} Reference to this in order to allow method chaining