Class sap.m.ObjectNumberModule: sap/m/ObjectNumber

extends Control

The ObjectNumber control displays number and number unit properties for an object. The number can be displayed using semantic colors to provide additional meaning about the object to the user.


Since: 1.12.
Constructor Summary
new sap.m.ObjectNumber(sId?, mSettings?)Constructor for a new ObjectNumber.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.ObjectNumber.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.ObjectNumber with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.ObjectNumber.getMetadata()Returns a metadata object for class sap.m.ObjectNumber.
addAriaDescribedBy(vAriaDescribedBy)Adds some ariaDescribedBy into the association ariaDescribedBy.
getAriaDescribedBy()Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
getEmphasized()Gets current value of property emphasized.
getNumber()Gets current value of property number.
getState()Gets current value of property state.
getTextAlign()Gets current value of property textAlign.
getTextDirection()Gets current value of property textDirection.
getUnit()Gets current value of property unit.
removeAllAriaDescribedBy()Removes all the controls in the association named ariaDescribedBy.
removeAriaDescribedBy(vAriaDescribedBy)Removes an ariaDescribedBy from the association named ariaDescribedBy.
setEmphasized(bEmphasized)Sets a new value for property emphasized.
setNumber(sNumber)Sets a new value for property number.
setState(sState)Sets the ObjectNumber's value state.
setTextAlign(sAlign)Sets the text alignment of the control without re-rendering the whole ObjectNumber.
setTextDirection(sTextDirection)Sets a new value for property textDirection.
setUnit(sUnit)Sets a new value for property unit.
getNumberUnit()Gets current value of property numberUnit.
setNumberUnit(sNumberUnit)Sets a new value for property numberUnit.
Constructor Detail
new sap.m.ObjectNumber(sId?, mSettings?)
Constructor for a new ObjectNumber.

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.m.ObjectNumber.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.ObjectNumber 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.ObjectNumber.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.ObjectNumber.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAriaDescribedBy(vAriaDescribedBy): sap.m.ObjectNumber
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
{string|sap.ui.core.Control}vAriaDescribedBy the ariaDescribedBy to add; if empty, nothing is inserted
Returns:
{sap.m.ObjectNumber} Reference to this in order to allow method chaining
getAriaDescribedBy(): sap.ui.core.Control[]
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
{sap.ui.core.Control[]}
getEmphasized(): boolean
Gets current value of property emphasized.

Indicates if the object number should appear emphasized.

Default value is true.

Returns:
{boolean} Value of property emphasized
getNumber(): string
Gets current value of property number.

Defines the number field.

Returns:
{string} Value of property number
Gets current value of property state.

Determines the object number's value state. Setting this state will cause the number to be rendered in state-specific colors (only blue-crystal theme).

Default value is None.

Returns:
{sap.ui.core.ValueState} Value of property state
getTextAlign(): sap.ui.core.TextAlign
Gets current value of property textAlign.

Sets the horizontal alignment of the number and unit.

Default value is Begin.

Returns:
{sap.ui.core.TextAlign} Value of property textAlign
getTextDirection(): sap.ui.core.TextDirection
Gets current value of property textDirection.

Available options for the number and unit text direction are LTR(left-to-right) and RTL(right-to-left). By default, the control inherits the text direction from its parent control.

Default value is Inherit.

Returns:
{sap.ui.core.TextDirection} Value of property textDirection
getUnit(): string
Gets current value of property unit.

Defines the number units qualifier. If numberUnit and unit are both set, the unit value is used.

Since:
1.16.1
Returns:
{string} Value of property unit
removeAllAriaDescribedBy(): sap.ui.core.Control[]
Removes all the controls in the association named ariaDescribedBy.
Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeAriaDescribedBy(vAriaDescribedBy): sap.ui.core.Control
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
{int|string|sap.ui.core.Control}vAriaDescribedBy The ariaDescribedByto be removed or its index or ID
Returns:
{sap.ui.core.Control} the removed ariaDescribedBy or null
setEmphasized(bEmphasized): sap.m.ObjectNumber
Sets a new value for property emphasized.

Indicates if the object number should appear emphasized.

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

Default value is true.

Parameters:
{boolean}bEmphasized New value for property emphasized
Returns:
{sap.m.ObjectNumber} Reference to this in order to allow method chaining
setNumber(sNumber): sap.m.ObjectNumber
Sets a new value for property number.

Defines the number field.

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

Parameters:
{string}sNumber New value for property number
Returns:
{sap.m.ObjectNumber} Reference to this in order to allow method chaining
setState(sState): ObjectNumber
Sets the ObjectNumber's value state.
Parameters:
{sap.ui.core.ValueState}sState The state to be set to
Returns:
{ObjectNumber} this pointer for chaining
setTextAlign(sAlign)
Sets the text alignment of the control without re-rendering the whole ObjectNumber.
Parameters:
{sap.ui.core.TextAlign}sAlign The new value
setTextDirection(sTextDirection): sap.m.ObjectNumber
Sets a new value for property textDirection.

Available options for the number and unit text direction are LTR(left-to-right) and RTL(right-to-left). By default, the control inherits the text direction from its parent control.

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

Default value is Inherit.

Parameters:
{sap.ui.core.TextDirection}sTextDirection New value for property textDirection
Returns:
{sap.m.ObjectNumber} Reference to this in order to allow method chaining
setUnit(sUnit): sap.m.ObjectNumber
Sets a new value for property unit.

Defines the number units qualifier. If numberUnit and unit are both set, the unit value is used.

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

Parameters:
{string}sUnit New value for property unit
Since:
1.16.1
Returns:
{sap.m.ObjectNumber} Reference to this in order to allow method chaining
getNumberUnit(): string
Gets current value of property numberUnit.

Defines the number units qualifier.

Deprecated:
Since version 1.16.1.

Replaced by unit property due to the number before unit is redundant.

Returns:
{string} Value of property numberUnit
setNumberUnit(sNumberUnit): sap.m.ObjectNumber
Sets a new value for property numberUnit.

Defines the number units qualifier.

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

Parameters:
{string}sNumberUnit New value for property numberUnit
Deprecated:
Since version 1.16.1.

Replaced by unit property due to the number before unit is redundant.

Returns:
{sap.m.ObjectNumber} Reference to this in order to allow method chaining