Package | com.esri.bacore |
Class | public class ValueFormat |
Inheritance | ValueFormat Object |
See also
Property | Defined By | ||
---|---|---|---|
decimals : int
The number of significant digits after the decimal point. | ValueFormat | ||
formatter : IValueFormatter
Formatter to be used to format the value. | ValueFormat | ||
formatWithUnits : Boolean
True value of this property means formatting with units. | ValueFormat | ||
valueType : BAValueType
The type of value to be formatted. | ValueFormat |
Method | Defined By | ||
---|---|---|---|
ValueFormat(decimals:int = -1, valueType:BAValueType = null, valueFormatter:IValueFormatter = null, formatWithUnits:Boolean = true)
Initializes a new instance of the ValueFormat class. | ValueFormat | ||
formatValue(value:Number):String
Formats a value to the string representation applying properties of this format. | ValueFormat |
decimals | property |
decimals:int
The number of significant digits after the decimal point. Negative value means unknown number of digits.
The default value is -1
.
public function get decimals():int
public function set decimals(value:int):void
formatter | property |
formatter:IValueFormatter
Formatter to be used to format the value.
The default value is an instance of the ValueFormatter class.
.
public function get formatter():IValueFormatter
public function set formatter(value:IValueFormatter):void
See also
formatWithUnits | property |
formatWithUnits:Boolean
True value of this property means formatting with units.
If this property value is true, the formatValueWithUnits
method of value formatter is used.
Otherwise, the formatValue
method is used.
The default value is true
.
public function get formatWithUnits():Boolean
public function set formatWithUnits(value:Boolean):void
valueType | property |
valueType:BAValueType
The type of value to be formatted.
The default value is BAValueType.COUNT
.
public function get valueType():BAValueType
public function set valueType(value:BAValueType):void
ValueFormat | () | Constructor |
public function ValueFormat(decimals:int = -1, valueType:BAValueType = null, valueFormatter:IValueFormatter = null, formatWithUnits:Boolean = true)
Initializes a new instance of the ValueFormat class.
Parametersdecimals:int (default = -1 ) — The number of significant digits after the decimal point.
Negative value means unknown number of digits.
| |
valueType:BAValueType (default = null ) — The type of value to be formatted.
| |
valueFormatter:IValueFormatter (default = null ) — Formatter to be used to format the value.
| |
formatWithUnits:Boolean (default = true ) — True value means formatting with units.
|
formatValue | () | method |
public function formatValue(value:Number):String
Formats a value to the string representation applying properties of this format.
Parameters
value:Number — A value to be formatted.
|
String |