Class sap.suite.ui.commons.NumericContentModule: sap/suite/ui/commons/NumericContent

extends Control

NumericContent to be used in tile or in other place where need to show numeric values with sematic colors and deviations.

Deprecated API:Since version 1.34. Deprecated. Moved to openui5.

Constructor Summary
new sap.suite.ui.commons.NumericContent(sId?, mSettings?)Constructor for a new NumericContent.
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.suite.ui.commons.NumericContent.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.commons.NumericContent with name sClassName and enriches it with the information contained in oClassInfo.
sap.suite.ui.commons.NumericContent.getMetadata()Returns a metadata object for class sap.suite.ui.commons.NumericContent.
attachPress(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'press' event of this sap.suite.ui.commons.NumericContent.
detachPress(fnFunction, oListener)Detach event handler fnFunction from the 'press' event of this sap.suite.ui.commons.NumericContent.
firePress(mArguments?)Fire event press to attached listeners.
getAnimateTextChange()Getter for property animateTextChange.
getFormatterValue()Getter for property formatterValue.
getIcon()Getter for property icon.
getIconDescription()Getter for property iconDescription.
getIndicator()Getter for property indicator.
getNullifyValue()Getter for property nullifyValue.
getScale()Getter for property scale.
getSize()Getter for property size.
getState()Getter for property state.
getTruncateValueTo()Getter for property truncateValueTo.
getValue()Getter for property value.
getValueColor()Getter for property valueColor.
getWidth()Getter for property width.
getWithMargin()Getter for property withMargin.
setAnimateTextChange(bAnimateTextChange)Setter for property animateTextChange.
setFormatterValue(bFormatterValue)Setter for property formatterValue.
setIcon(sIcon)Setter for property icon.
setIconDescription(sIconDescription)Setter for property iconDescription.
setIndicator(oIndicator)Setter for property indicator.
setNullifyValue(bNullifyValue)Setter for property nullifyValue.
setScale(sScale)Setter for property scale.
setSize(oSize)Setter for property size.
setState(oState)Setter for property state.
setTruncateValueTo(iTruncateValueTo)Setter for property truncateValueTo.
setValue(sValue)Setter for property value.
setValueColor(oValueColor)Setter for property valueColor.
setWidth(sWidth)Setter for property width.
setWithMargin(bWithMargin)Setter for property withMargin.
Constructor Detail
new sap.suite.ui.commons.NumericContent(sId?, mSettings?)
Constructor for a new NumericContent.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.

If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).

The supported settings are:

  • Properties
    • size : sap.suite.ui.commons.InfoTileSize (default: sap.suite.ui.commons.InfoTileSize.Auto)
    • value : string
    • scale : string
    • valueColor : sap.suite.ui.commons.InfoTileValueColor (default: sap.suite.ui.commons.InfoTileValueColor.Neutral)
    • indicator : sap.suite.ui.commons.DeviationIndicator (default: sap.suite.ui.commons.DeviationIndicator.None)
    • state : sap.suite.ui.commons.LoadState (default: sap.suite.ui.commons.LoadState.Loaded)
    • animateTextChange : boolean (default: true)
    • formatterValue : boolean (default: false)
    • truncateValueTo : int (default: 4)
    • icon : sap.ui.core.URI
    • nullifyValue : boolean (default: true)
    • iconDescription : string
    • width : sap.ui.core.CSSSize
    • withMargin : boolean (default: true)
  • Aggregations
    • Associations
      • Events
        • press : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
      Parameters:
      {string}sId? id for the new control, generated automatically if no id is given
      {object}mSettings? initial settings for the new control
      Deprecated:
      Since version 1.34. Deprecated. Moved to openui5.
      Event Detail
      press(oControlEvent)
      The event is fired when the user chooses the numeric content.
      Parameters:
      {sap.ui.base.Event}oControlEvent
      {sap.ui.base.EventProvider}oControlEvent.getSource
      {object}oControlEvent.getParameters
      Method Detail
      sap.suite.ui.commons.NumericContent.extend(sClassName, oClassInfo?, FNMetaImpl?): function
      Creates a new subclass of class sap.suite.ui.commons.NumericContent with name sClassName and enriches it with the information contained in oClassInfo.

      oClassInfo might contain the same kind of informations as described in Element.extend.

      Parameters:
      {string}sClassName name of the class to be created
      {object}oClassInfo? object literal with informations about the class
      {function}FNMetaImpl? constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata.
      Returns:
      {function} the created class / constructor function
      sap.suite.ui.commons.NumericContent.getMetadata(): sap.ui.base.Metadata
      Returns a metadata object for class sap.suite.ui.commons.NumericContent.
      Returns:
      {sap.ui.base.Metadata} Metadata object describing this class
      attachPress(oData?, fnFunction, oListener?): sap.suite.ui.commons.NumericContent
      Attach event handler fnFunction to the 'press' event of this sap.suite.ui.commons.NumericContent.
      . When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.suite.ui.commons.NumericContent.
      itself.

      The event is fired when the user chooses the numeric content.

      Parameters:
      {object}oData? An application specific payload object, that will be passed to the event handler along with the event object when firing the event.
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener? Context object to call the event handler with. Defaults to this sap.suite.ui.commons.NumericContent.
      itself.
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      detachPress(fnFunction, oListener): sap.suite.ui.commons.NumericContent
      Detach event handler fnFunction from the 'press' event of this sap.suite.ui.commons.NumericContent.

      The passed function and listener object must match the ones used for event registration.

      Parameters:
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener Context object on which the given function had to be called.
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      firePress(mArguments?): sap.suite.ui.commons.NumericContent
      Fire event press to attached listeners.
      Parameters:
      {Map}mArguments? the arguments to pass along with the event.
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      getAnimateTextChange(): boolean
      Getter for property animateTextChange. If set to true, the change of the value will be animated.

      Default value is true

      Returns:
      {boolean} the value of property animateTextChange
      getFormatterValue(): boolean
      Getter 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.

      Default value is false

      Returns:
      {boolean} the value of property formatterValue
      getIcon(): sap.ui.core.URI
      Getter 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.

      Default value is empty/undefined

      Since:
      1.21
      Returns:
      {sap.ui.core.URI} the value of property icon
      getIconDescription(): string
      Getter for property iconDescription. Description of an icon that is used in the tooltip.

      Default value is empty/undefined

      Since:
      1.23
      Returns:
      {string} the value of property iconDescription
      Getter for property indicator. The indicator arrow that shows value deviation.

      Default value is None

      Returns:
      {sap.suite.ui.commons.DeviationIndicator} the value of property indicator
      getNullifyValue(): boolean
      Getter for property nullifyValue. If set to true, the omitted value property is set to 0.

      Default value is true

      Since:
      1.21
      Returns:
      {boolean} the value of property nullifyValue
      getScale(): string
      Getter 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.

      Default value is empty/undefined

      Returns:
      {string} the value of property scale
      Getter for property size. Updates the size of the chart. If not set then the default size is applied based on the device tile.

      Default value is Auto

      Returns:
      {sap.suite.ui.commons.InfoTileSize} the value of property size
      Getter for property state. Indicates the load status.

      Default value is Loaded

      Returns:
      {sap.suite.ui.commons.LoadState} the value of property state
      getTruncateValueTo(): int
      Getter for property truncateValueTo. The number of characters to display for the value property.

      Default value is 4

      Returns:
      {int} the value of property truncateValueTo
      getValue(): string
      Getter for property value. The actual value.

      Default value is empty/undefined

      Returns:
      {string} the value of property value
      Getter for property valueColor. The semantic color of the value.

      Default value is Neutral

      Returns:
      {sap.suite.ui.commons.InfoTileValueColor} the value of property valueColor
      getWidth(): sap.ui.core.CSSSize
      Getter for property width. The width of the chart. If it is not set, the size of the control is defined by the size property.

      Default value is empty/undefined

      Since:
      1.25
      Returns:
      {sap.ui.core.CSSSize} the value of property width
      getWithMargin(): boolean
      Getter for property withMargin. If the value is set to false, the content will fit to the whole size of the control.

      Default value is true

      Since:
      1.31
      Returns:
      {boolean} the value of property withMargin
      setAnimateTextChange(bAnimateTextChange): sap.suite.ui.commons.NumericContent
      Setter for property animateTextChange.

      Default value is true

      Parameters:
      {boolean}bAnimateTextChange new value for property animateTextChange
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      setFormatterValue(bFormatterValue): sap.suite.ui.commons.NumericContent
      Setter for property formatterValue.

      Default value is false

      Parameters:
      {boolean}bFormatterValue new value for property formatterValue
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      Setter for property icon.

      Default value is empty/undefined

      Parameters:
      {sap.ui.core.URI}sIcon new value for property icon
      Since:
      1.21
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      setIconDescription(sIconDescription): sap.suite.ui.commons.NumericContent
      Setter for property iconDescription.

      Default value is empty/undefined

      Parameters:
      {string}sIconDescription new value for property iconDescription
      Since:
      1.23
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      setIndicator(oIndicator): sap.suite.ui.commons.NumericContent
      Setter for property indicator.

      Default value is None

      Parameters:
      {sap.suite.ui.commons.DeviationIndicator}oIndicator new value for property indicator
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      setNullifyValue(bNullifyValue): sap.suite.ui.commons.NumericContent
      Setter for property nullifyValue.

      Default value is true

      Parameters:
      {boolean}bNullifyValue new value for property nullifyValue
      Since:
      1.21
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      Setter for property scale.

      Default value is empty/undefined

      Parameters:
      {string}sScale new value for property scale
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      Setter for property size.

      Default value is Auto

      Parameters:
      {sap.suite.ui.commons.InfoTileSize}oSize new value for property size
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      Setter for property state.

      Default value is Loaded

      Parameters:
      {sap.suite.ui.commons.LoadState}oState new value for property state
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      setTruncateValueTo(iTruncateValueTo): sap.suite.ui.commons.NumericContent
      Setter for property truncateValueTo.

      Default value is 4

      Parameters:
      {int}iTruncateValueTo new value for property truncateValueTo
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      Setter for property value.

      Default value is empty/undefined

      Parameters:
      {string}sValue new value for property value
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      setValueColor(oValueColor): sap.suite.ui.commons.NumericContent
      Setter for property valueColor.

      Default value is Neutral

      Parameters:
      {sap.suite.ui.commons.InfoTileValueColor}oValueColor new value for property valueColor
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      Setter for property width.

      Default value is empty/undefined

      Parameters:
      {sap.ui.core.CSSSize}sWidth new value for property width
      Since:
      1.25
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining
      setWithMargin(bWithMargin): sap.suite.ui.commons.NumericContent
      Setter for property withMargin.

      Default value is true

      Parameters:
      {boolean}bWithMargin new value for property withMargin
      Since:
      1.31
      Returns:
      {sap.suite.ui.commons.NumericContent}this to allow method chaining