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

extends Control
implements IFormContent

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:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?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:
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.ObjectNumber.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.ObjectNumber.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAriaDescribedBy(vAriaDescribedBy): sap.m.ObjectNumber
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedBythe ariaDescribedBy to add; if empty, nothing is inserted
Returns:
sap.m.ObjectNumberReference to this in order to allow method chaining
getAriaDescribedBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
sap.ui.core.ID[]
getEmphasized(): boolean

Gets current value of property emphasized.

Indicates if the object number should appear emphasized.

Default value is true.

Returns:
booleanValue of property emphasized
getNumber(): string

Gets current value of property number.

Defines the number field.

Returns:
stringValue 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.ValueStateValue 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.TextAlignValue 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.TextDirectionValue 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.

Returns:
stringValue of property unit
Since:
1.16.1
removeAllAriaDescribedBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaDescribedBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAriaDescribedBy(vAriaDescribedBy): sap.ui.core.ID
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedByThe ariaDescribedBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe 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:
booleanbEmphasizedNew value for property emphasized
Returns:
sap.m.ObjectNumberReference 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:
stringsNumberNew value for property number
Returns:
sap.m.ObjectNumberReference to this in order to allow method chaining
setState(sState): sap.m.ObjectNumber
Sets the ObjectNumber's value state.
Parameters:
sap.ui.core.ValueStatesStateThe state to be set to
Returns:
sap.m.ObjectNumberthis pointer for chaining
setTextAlign(sAlign): sap.m.ObjectNumber
Sets the text alignment of the control without re-rendering the whole ObjectNumber.
Parameters:
sap.ui.core.TextAlignsAlignThe new value
Returns:
sap.m.ObjectNumberthis pointer for chaining
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.TextDirectionsTextDirectionNew value for property textDirection
Returns:
sap.m.ObjectNumberReference 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:
stringsUnitNew value for property unit
Returns:
sap.m.ObjectNumberReference to this in order to allow method chaining
Since:
1.16.1
getNumberUnit(): string

Gets current value of property numberUnit.

Defines the number units qualifier.

Returns:
stringValue of property numberUnit
Deprecated API:

Since version 1.16.1.

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

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:
stringsNumberUnitNew value for property numberUnit
Returns:
sap.m.ObjectNumberReference to this in order to allow method chaining
Deprecated API:

Since version 1.16.1.

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