Packagecom.esri.bacore.thematicmapping
Classpublic class ValueCalculator
InheritanceValueCalculator Inheritance flash.events.EventDispatcher
Subclasses TMValueCalculator

The ValueCalculator class is the base abstract class providing the calculation of the value of a feature for thematic shading.

This class is abstract. Derived classes should implement the getSummarizationFields and calculate methods.



Public Properties
 PropertyDefined By
  decimals : int
[read-only] The number of significant digits after the decimal point for a value calculated by this calculator.
ValueCalculator
  formatter : IValueFormatter
Value formatter to be used to format values.
ValueCalculator
  valueType : BAValueType
[read-only] The type of the current thematic value.
ValueCalculator
Public Methods
 MethodDefined By
  
Creates a new instance of the ValueCalculator class.
ValueCalculator
  
calculate(attributes:Object, provider:TMAttributesProvider):Number
Calculates a value to thematically shade the given feature by.
ValueCalculator
  
createBaseDescriptionFields(attributes:Object, provider:TMAttributesProvider, descriptionStyle:ValueDescriptionStyle):Array
[static] Creates base description fields for a graphic feature.
ValueCalculator
  
createDescriptionFields(attributes:Object, provider:TMAttributesProvider, descriptionStyle:ValueDescriptionStyle):Array
Creates a list of fields describing value calculation properties.
ValueCalculator
  
createTMValueFormat(formatWithUnits:Boolean):ValueFormat
Creates a format for formatting the thematic value.
ValueCalculator
  
Gets an array of names of summarization fields which are required for value calculation.
ValueCalculator
Events
 Event Summary Defined By
  The calculationMethodChanged event is dispatched when the method of value calculation is changed.ValueCalculator
Public Constants
 ConstantDefined By
  CALCULATION_METHOD_CHANGED : String = calculationMethodChanged
[static] The ValueCalculator.CALCULATION_METHOD_CHANGED constant defines the value of the type property of the flash.events.Event object for a calculationMethodChanged event.
ValueCalculator
Property Detail
decimalsproperty
decimals:int  [read-only]

The number of significant digits after the decimal point for a value calculated by this calculator. Negative value means unknown number of significant digits.


Implementation
    public function get decimals():int
formatterproperty 
formatter:IValueFormatter

Value formatter to be used to format values.


Implementation
    public function get formatter():IValueFormatter
    public function set formatter(value:IValueFormatter):void
valueTypeproperty 
valueType:BAValueType  [read-only]

The type of the current thematic value.


Implementation
    public function get valueType():BAValueType
Constructor Detail
ValueCalculator()Constructor
public function ValueCalculator()

Creates a new instance of the ValueCalculator class.

Method Detail
calculate()method
public function calculate(attributes:Object, provider:TMAttributesProvider):Number

Calculates a value to thematically shade the given feature by.

This method is "abstract". Its base implementation throws an error.

Parameters

attributes:Object — Attributes of a feature.
 
provider:TMAttributesProvider — Provider of thematic mapping attributes.

Returns
Number — The value calculated.
createBaseDescriptionFields()method 
public static function createBaseDescriptionFields(attributes:Object, provider:TMAttributesProvider, descriptionStyle:ValueDescriptionStyle):Array

Creates base description fields for a graphic feature.

The table below shows the avaiability and precedence of the description fields which appear in the output list depending on the ValueDescriptionStyle used.

FieldNONESIMPLESHORTLONG
"ID"nonoyesyes
"Name"nonoyesyes

Parameters

attributes:Object — Attributes of feature to get values from.
 
provider:TMAttributesProvider — Provider of thematic mapping attributes (can be null).
 
descriptionStyle:ValueDescriptionStyle — Value description style.

Returns
Array — An array of feature description fields containing KeyValuePair items.

See also

createDescriptionFields()method 
public function createDescriptionFields(attributes:Object, provider:TMAttributesProvider, descriptionStyle:ValueDescriptionStyle):Array

Creates a list of fields describing value calculation properties.

The table below shows the avaiability and precedence of the description fields which appear in the output list depending on the ValueDescriptionStyle used. Overrides in derived classes add more description fields to the output.

FieldNONESIMPLESHORTLONG
"ID"nonoyesyes
"Name"nonoyesyes
"Value"noyesyesyes

Parameters

attributes:Object — Attributes of feature to get values from.
 
provider:TMAttributesProvider — Provider of thematic mapping attributes (can be null).
 
descriptionStyle:ValueDescriptionStyle — Value description style.

Returns
Array — An array of feature description fields containing KeyValuePair items.

See also

createTMValueFormat()method 
public function createTMValueFormat(formatWithUnits:Boolean):ValueFormat

Creates a format for formatting the thematic value.

Parameters

formatWithUnits:Boolean — True value means formatting with units.

Returns
ValueFormat — A new value format.
getSummarizationFields()method 
public function getSummarizationFields():Array

Gets an array of names of summarization fields which are required for value calculation.

This method is "abstract". Its base implementation throws an error.

Returns
Array — The array of String items containing names of required summarization fields.
Event Detail
calculationMethodChanged Event
Event Object Type: flash.events.Event
Event.type property = com.esri.bacore.thematicmapping.ValueCalculator.CALCULATION_METHOD_CHANGED

The calculationMethodChanged event is dispatched when the method of value calculation is changed.

The ValueCalculator.CALCULATION_METHOD_CHANGED constant defines the value of the type property of the flash.events.Event object for a calculationMethodChanged event.
Constant Detail
CALCULATION_METHOD_CHANGEDConstant
public static const CALCULATION_METHOD_CHANGED:String = calculationMethodChanged

The ValueCalculator.CALCULATION_METHOD_CHANGED constant defines the value of the type property of the flash.events.Event object for a calculationMethodChanged event.