Package | com.esri.bacore.thematicmapping |
Class | public class ValueCalculator |
Inheritance | ValueCalculator flash.events.EventDispatcher |
Subclasses | TMValueCalculator |
This class is abstract. Derived classes should implement the getSummarizationFields
and calculate
methods.
Property | Defined 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 |
Method | Defined 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 | ||
getSummarizationFields():Array
Gets an array of names of summarization fields which are required for value calculation. | ValueCalculator |
Event | Summary | Defined By | ||
---|---|---|---|---|
The calculationMethodChanged event is dispatched when the method of value calculation is changed. | ValueCalculator |
Constant | Defined 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 |
decimals | property |
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.
public function get decimals():int
formatter | property |
formatter:IValueFormatter
Value formatter to be used to format values.
public function get formatter():IValueFormatter
public function set formatter(value:IValueFormatter):void
valueType | property |
valueType:BAValueType
[read-only] The type of the current thematic value.
public function get valueType():BAValueType
ValueCalculator | () | Constructor |
public function ValueCalculator()
Creates a new instance of the ValueCalculator class.
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.
|
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.
Field | NONE | SIMPLE | SHORT | LONG |
---|---|---|---|---|
"ID" | no | no | yes | yes |
"Name" | no | no | yes | yes |
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.
|
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.
Field | NONE | SIMPLE | SHORT | LONG |
---|---|---|---|---|
"ID" | no | no | yes | yes |
"Name" | no | no | yes | yes |
"Value" | no | yes | yes | yes |
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.
|
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.
|
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.
ReturnsArray — The array of String items containing names of required summarization fields.
|
calculationMethodChanged | Event |
flash.events.Event
com.esri.bacore.thematicmapping.ValueCalculator.CALCULATION_METHOD_CHANGED
The calculationMethodChanged
event is dispatched when the method of value calculation is changed.
type
property of the flash.events.Event object for a calculationMethodChanged
event.
CALCULATION_METHOD_CHANGED | Constant |
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.