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.
setCurrency(sCurrency)Sets a new value for property currency.
setMaxPrecision(iMaxPrecision)Sets a new value for property maxPrecision.
setUseSymbol(bUseSymbol)Sets a new value for property useSymbol.
setValue(fValue)Sets a new value for property value.
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:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?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:
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.ui.unified.Currency.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.unified.Currency.
Returns:
sap.ui.base.MetadataMetadata object describing this class
getAccessibilityInfo(): Object
Returns:
ObjectCurrent accessibility state of the control.
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:
stringValue of property currency
getCurrencySymbol(): string
Get symbol of the currency, if available.
Returns:
string
getFormattedValue(): string
The formatted value.
Returns:
stringThe formatted value
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:
intValue 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:
booleanValue of property useSymbol
getValue(): float

Gets current value of property value.

The currency value

Default value is 0.

Returns:
floatValue of property value
init()
Initializes the control.
setCurrency(sCurrency): sap.ui.unified.Currency

Sets a new value for 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.

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

Parameters:
stringsCurrencyNew value for property currency
Returns:
sap.ui.unified.CurrencyReference to this in order to allow method chaining
setMaxPrecision(iMaxPrecision): sap.ui.unified.Currency

Sets a new value for property maxPrecision.

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

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

Default value is 3.

Parameters:
intiMaxPrecisionNew value for property maxPrecision
Returns:
sap.ui.unified.CurrencyReference to this in order to allow method chaining
setUseSymbol(bUseSymbol): sap.ui.unified.Currency

Sets a new value for property useSymbol.

Show the currency symbol instead of the ISO currency code

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

Default value is true.

Parameters:
booleanbUseSymbolNew value for property useSymbol
Returns:
sap.ui.unified.CurrencyReference to this in order to allow method chaining
setValue(fValue): sap.ui.unified.Currency

Sets a new value for property value.

The currency value

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

Default value is 0.

Parameters:
floatfValueNew value for property value
Returns:
sap.ui.unified.CurrencyReference to this in order to allow method chaining