Packagecom.esri.bacore.thematicmapping
Classpublic class TMColorRamp
InheritanceTMColorRamp Inheritance ColorRamp Inheritance flash.events.EventDispatcher

The TMColorRamp class provides an implementation of ColorRamp based on ColorRampSchema.

See also

ColorRampSchema


Public Properties
 PropertyDefined By
  colorRampSchema : ColorRampSchema
Color ramp schema.
TMColorRamp
  isUpdatable : Boolean
[override] [read-only] Specifies an ability to update discrete ramp colors.
TMColorRamp
  rampColorsCount : uint
[override] The current number of discrete colors specified in this color ramp.
TMColorRamp
Public Methods
 MethodDefined By
  
TMColorRamp(schema:ColorRampSchema, colorsCount:int, isUpdatable:Boolean = true)
Creates a new instance of the TMColorRamp class.
TMColorRamp
  
getColorByIndex(index:int):uint
[override] Gets a discrete color by index.
TMColorRamp
 Inherited
getColorByValue(value:Number):uint
Gets a gradient color by value in the range of [0, 1].
ColorRamp
 Inherited
mixColors(color1:uint, color2:uint, value:Number):uint
[static] Mixes color1 with color2 using linear interpolation.
ColorRamp
  
updateRampColor(index:int, value:uint):Boolean
[override] Updates an individual color of this color ramp with a user-defined value.
TMColorRamp
  
updateRampColors(values:Array):Boolean
[override] Updates all colors of this color ramp with user-defined values.
TMColorRamp
Events
 Event Summary Defined By
 InheritedThe rampColorsChanged event is dispatched when the discrete colors of this color ramp are changed.ColorRamp
Public Constants
 ConstantDefined By
 InheritedRAMP_COLORS_CHANGED : String = rampColorsChanged
[static] The ColorRamp.RAMP_COLORS_CHANGED constant defines the value of the type property of the flash.events.Event object for a rampColorsChanged event.
ColorRamp
Property Detail
colorRampSchemaproperty
colorRampSchema:ColorRampSchema

Color ramp schema.


Implementation
    public function get colorRampSchema():ColorRampSchema
    public function set colorRampSchema(value:ColorRampSchema):void
isUpdatableproperty 
isUpdatable:Boolean  [read-only] [override]

Specifies an ability to update discrete ramp colors.


Implementation
    public function get isUpdatable():Boolean
rampColorsCountproperty 
rampColorsCount:uint[override]

The current number of discrete colors specified in this color ramp.


Implementation
    public function get rampColorsCount():uint
    public function set rampColorsCount(value:uint):void
Constructor Detail
TMColorRamp()Constructor
public function TMColorRamp(schema:ColorRampSchema, colorsCount:int, isUpdatable:Boolean = true)

Creates a new instance of the TMColorRamp class.

Parameters
schema:ColorRampSchema — Color ramp schema.
 
colorsCount:int — The numbers of colors (should be positive).
 
isUpdatable:Boolean (default = true) — Allows update ramp colors with user-defined values.
Method Detail
getColorByIndex()method
override public function getColorByIndex(index:int):uint

Gets a discrete color by index. If the index is negative, the first color is returned. If the index is greater or equal to rampColorsCount the last color is returned.

Parameters

index:int — Zero-based index of color in the discrete color ramp.

Returns
uint — Required ARGB-color.
updateRampColor()method 
override public function updateRampColor(index:int, value:uint):Boolean

Updates an individual color of this color ramp with a user-defined value.

The updated color will be reset when the number of colors is changed. If the color ramp doesn't updatable, this operation is ignored.

Parameters

index:int — Zero-based index of color to be updated.
 
value:uint — New value of color.

Returns
Boolean
updateRampColors()method 
override public function updateRampColors(values:Array):Boolean

Updates all colors of this color ramp with user-defined values.

The number of input colors can differ from the current number of ramp colors. In this case, the current number of colors is changed to match with the number of input colors.

The updated colors will be reset when the number of colors is changed. If the color ramp doesn't updatable, this operation is ignored.

Parameters

values:Array — Values of colors.

Returns
Boolean