Packagefr.kapit.components.treemap.utils
Classpublic class TreeMapDefaultColorGenerator
ImplementsITreeMapColorGenerator

Default implementation of ITreeMapColorGenerator.



Public Properties
 PropertyDefined by
  continueGreyColor : uint
Indicates the color used to render nodes that are outside of the selected range in the treemap legend in the case of continue colors.
TreeMapDefaultColorGenerator
  discreteColors : Boolean
Used by the treemap to tell the color generator whether color values are discrete or continue.
TreeMapDefaultColorGenerator
  discreteDarkGreyColor : uint
Used in association with discreteLightGreyColor to determine the color used to render nodes that are outside of the selected range in the treemap legend in the case of discrete colors.
TreeMapDefaultColorGenerator
  discreteLightGreyColor : uint
Used in association with discreteDarkGreyColor to determine the color used to render nodes that are outside of the selected range in the treemap legend in the case of discrete colors.
TreeMapDefaultColorGenerator
  treeMap : TreeMap
The treemap associated with color generator.
TreeMapDefaultColorGenerator
Public Methods
 MethodDefined by
  
Constructor.
TreeMapDefaultColorGenerator
  
color(value:*, outsideOfRange:Boolean = false):uint
This function is used by the treemap to associate colors with values that are extracted from the color fields in the treemap dataProvider.
TreeMapDefaultColorGenerator
Protected Methods
 MethodDefined by
  
getContinueColor(value:*, outsideOfRange:Boolean):uint
Detemines the color value in the case of continue colors.
TreeMapDefaultColorGenerator
  
getDiscreteColor(val:*, outsideOfRange:Boolean):uint
Detemines the color value in the case of discrete colors.
TreeMapDefaultColorGenerator
Property detail
continueGreyColorproperty
continueGreyColor:uint  [read-write]

Indicates the color used to render nodes that are outside of the selected range in the treemap legend in the case of continue colors.

The default value is 0xCCCCCC.

Implementation
    public function get continueGreyColor():uint
    public function set continueGreyColor(value:uint):void
discreteColorsproperty 
discreteColors:Boolean  [read-write]

Used by the treemap to tell the color generator whether color values are discrete or continue. Its value is equal to true if the dataprovider contains non numeric values for colors or if the treemap discreteColors property is set to true, otherwise its value is equal to false.

Implementation
    public function get discreteColors():Boolean
    public function set discreteColors(value:Boolean):void
discreteDarkGreyColorproperty 
discreteDarkGreyColor:uint  [read-write]

Used in association with discreteLightGreyColor to determine the color used to render nodes that are outside of the selected range in the treemap legend in the case of discrete colors.

The default value is 0x444444.

Implementation
    public function get discreteDarkGreyColor():uint
    public function set discreteDarkGreyColor(value:uint):void
discreteLightGreyColorproperty 
discreteLightGreyColor:uint  [read-write]

Used in association with discreteDarkGreyColor to determine the color used to render nodes that are outside of the selected range in the treemap legend in the case of discrete colors.

The default value is 0xBBBBBB.

Implementation
    public function get discreteLightGreyColor():uint
    public function set discreteLightGreyColor(value:uint):void
treeMapproperty 
treeMap:TreeMap  [read-write]

The treemap associated with color generator.

Implementation
    public function get treeMap():TreeMap
    public function set treeMap(value:TreeMap):void
Constructor detail
TreeMapDefaultColorGenerator()constructor
public function TreeMapDefaultColorGenerator()

Constructor.

Method detail
color()method
public function color(value:*, outsideOfRange:Boolean = false):uint

This function is used by the treemap to associate colors with values that are extracted from the color fields in the treemap dataProvider. The result of this function is used to render nodes, the legend and the color filter.

Parameters
value:* — the value to which a color should be associated.
 
outsideOfRange:Boolean (default = false) — indicates whether the given value is outside of the selected range in the legend.

Returns
uint — the color to be associated with the given value.
getContinueColor()method 
protected function getContinueColor(value:*, outsideOfRange:Boolean):uint

Detemines the color value in the case of continue colors.

Parameters
value:*
 
outsideOfRange:Boolean

Returns
uint
getDiscreteColor()method 
protected function getDiscreteColor(val:*, outsideOfRange:Boolean):uint

Detemines the color value in the case of discrete colors.

Parameters
val:*
 
outsideOfRange:Boolean

Returns
uint