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(mParameters?)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:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?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.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.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:
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.m.NumericContent.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.NumericContent.
Returns:
sap.ui.base.MetadataMetadata 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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.NumericContent itself
Returns:
sap.m.NumericContentReference 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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.NumericContentReference to this in order to allow method chaining
firePress(mParameters?): sap.m.NumericContent
Fires event press to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.NumericContentReference 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:
booleanValue 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:
booleanValue 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.URIValue of property icon
getIconDescription(): string

Gets current value of property iconDescription.

Description of an icon that is used in the tooltip.

Returns:
stringValue 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.DeviationIndicatorValue 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:
booleanValue 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:
stringValue of property scale
getState(): sap.m.LoadState

Gets current value of property state.

Indicates the load status.

Default value is Loaded.

Returns:
sap.m.LoadStateValue of property state
getTruncateValueTo(): int

Gets current value of property truncateValueTo.

The number of characters of the value property to display.

Default value is 4.

Returns:
intValue of property truncateValueTo
getValue(): string

Gets current value of property value.

The actual value.

Returns:
stringValue 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.ValueColorValue 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.CSSSizeValue of property width
getWithMargin(): boolean

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.

Returns:
booleanValue 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:
booleanbAnimateTextChangeNew value for property animateTextChange
Returns:
sap.m.NumericContentReference 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:
booleanbFormatterValueNew value for property formatterValue
Returns:
sap.m.NumericContentReference 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.URIsIconNew value for property icon
Returns:
sap.m.NumericContentReference 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:
stringsIconDescriptionNew value for property iconDescription
Returns:
sap.m.NumericContentReference 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.DeviationIndicatorsIndicatorNew value for property indicator
Returns:
sap.m.NumericContentReference 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:
booleanbNullifyValueNew value for property nullifyValue
Returns:
sap.m.NumericContentReference 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:
stringsScaleNew value for property scale
Returns:
sap.m.NumericContentReference 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.LoadStatesStateNew value for property state
Returns:
sap.m.NumericContentReference to this in order to allow method chaining
setTruncateValueTo(iTruncateValueTo): sap.m.NumericContent

Sets a new value for property truncateValueTo.

The number of characters of the value property to display.

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

Default value is 4.

Parameters:
intiTruncateValueToNew value for property truncateValueTo
Returns:
sap.m.NumericContentReference 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:
stringsValueNew value for property value
Returns:
sap.m.NumericContentReference 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.ValueColorsValueColorNew value for property valueColor
Returns:
sap.m.NumericContentReference 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.CSSSizesWidthNew value for property width
Returns:
sap.m.NumericContentReference 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 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.

Parameters:
booleanbWithMarginNew value for property withMargin
Returns:
sap.m.NumericContentReference 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.

Returns:
sap.m.SizeValue of property size
Deprecated API:
Since version 1.38.0. The NumericContent control has now a fixed size, depending on the used media (desktop, tablet or phone).
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.SizesSizeNew value for property size
Returns:
sap.m.NumericContentReference to this in order to allow method chaining
Deprecated API:
Since version 1.38.0. The NumericContent control has now a fixed size, depending on the used media (desktop, tablet or phone).