Class sap.ui.unified.CurrencyModule: sap/ui/unified/Currency

extends Control

A text view which displays currency values and aligns them at the separator


Since: 1.21.1.
Constructor Summary
new sap.ui.unified.Currency(sId?, mSettings?)Constructor for a new Currency.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.unified.Currency.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.unified.Currency with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.unified.Currency.getMetadata()Returns a metadata object for class sap.ui.unified.Currency.
getCurrency()Gets current value of property currency.
getCurrencySymbol()Get symbol of the currency, if available
getFormattedValue()The formatted value
getMaxPrecision()Gets current value of property maxPrecision.
getUseSymbol()Gets current value of property useSymbol.
getValue()Gets current value of property value.
init()Initializes the control.
Constructor Detail
new sap.ui.unified.Currency(sId?, mSettings?)
Constructor for a new Currency.

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
Method Detail
sap.ui.unified.Currency.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.unified.Currency 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.ui.unified.Currency.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.unified.Currency.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getAccessibilityInfo()
See:
{sap.ui.core.Control#getAccessibilityInfo}
getCurrency(): string
Gets current value of property currency.

Determines the displayed currency code (ISO 4217). Note: If a * character is set instead of currency code, only the character itself will be rendered, ignoring the value property.

Returns:
{string} Value of property currency
getCurrencySymbol(): string
Get symbol of the currency, if available
Returns:
{string}
getFormattedValue(): string
The formatted value
Returns:
{string}
getMaxPrecision(): int
Gets current value of property maxPrecision.

Defines the space that is available for the precision of the various currencies.

Default value is 3.

Returns:
{int} Value of property maxPrecision
getUseSymbol(): boolean
Gets current value of property useSymbol.

Show the currency symbol instead of the ISO currency code

Default value is true.

Returns:
{boolean} Value of property useSymbol
getValue(): float
Gets current value of property value.

The currency value

Default value is 0.

Returns:
{float} Value of property value
init()
Initializes the control.