Packagefr.kapit.base
Classpublic class KapUIComponent
InheritanceKapUIComponent Inheritance mx.core.UIComponent
SubclassesRadarChart



Public Properties
 PropertyDefined by
  analysisPath : Object
An array used for CSV and General ICollectionView files and enables data source analysis with a given logic.
KapUIComponent
  attributesDescriptor : AttributesDescriptor
It assigns to each column reference in the analysisPath its attributes.
KapUIComponent
  csvDelimiter : String
CSV delimiter used for csv source parsing.
KapUIComponent
  customTreeDataDescriptor : ITreeDataDescriptor
Custom Tree Data descriptor for navigating inside data provider object.
KapUIComponent
  dataProvider : Object
Visualizer Data provider.
KapUIComponent
  groupProperty : String
Property in a node data object (XML node for example) which value refers to the group dependency.The value is considered as the unique id of the group.
KapUIComponent
  idProperty : String
For any data item in any ICollectionView dataProvider (XML, array collection containing objects with children property), The idProperty is the property which value is considered as the unique id of the item (node, group or link).
KapUIComponent
  ignoreRoot : Boolean
Indicator if common root node of ICollectionView should be ignored.
KapUIComponent
  kData : KData
[read-only] private
KapUIComponent
  linkProperty : String
Property in a node data object depending to an ICollectionView dataProvider which value will be assigned to the created link.
KapUIComponent
  mergeDescriptor : MergeDescriptor
Descriptor defining merging tasks that must be applied on a CSV source before displaying it.
KapUIComponent
  recordDelimiter : String
Record delimiter of CSV fields.
KapUIComponent
  reportingFunctions : Dictionary
Reporting functions used to compute a data field from an array of data fields generated after CSV parsing or advanced XML treatment.
KapUIComponent
  typesDescriptor : Dictionary
Column types descriptor.
KapUIComponent
  withHeaders : Boolean
Indicator if the CSV data provider first row are headers or not.
KapUIComponent
Protected Properties
 PropertyDefined by
  _analysisPath : Array
private
KapUIComponent
  _attributesDescriptor : AttributesDescriptor
private
KapUIComponent
  _csvDelimiter : String = ";"
private
KapUIComponent
  _customTreeDataDescriptor : ITreeDataDescriptor
private
KapUIComponent
  _dataProvider : Object
private
KapUIComponent
  _dataProviderChanged : Boolean
private
KapUIComponent
  _dataProviderType : int
private
KapUIComponent
  _groupProperty : String
private
KapUIComponent
  _idProperty : String
private
KapUIComponent
  _ignoreRoot : Boolean
private
KapUIComponent
  _kData : KData
KapUIComponent
  _linkProperty : String
private
KapUIComponent
  _mergeDescriptor : MergeDescriptor
private
KapUIComponent
  _recordDelimiter : String = ""
private
KapUIComponent
  _reportingFunctions : Dictionary
private
KapUIComponent
  _reportingFunctionsChanged : Boolean
private
KapUIComponent
  _typesDescriptor : Dictionary
private
KapUIComponent
  _useMultiLink : Boolean = true
private
KapUIComponent
  _withHeaders : Boolean = true
private
KapUIComponent
Public Methods
 MethodDefined by
  
KapUIComponent
  
addChild(child:DisplayObject):DisplayObject
KapUIComponent
  
addChildAt(child:DisplayObject, index:int):DisplayObject
KapUIComponent
  
setChildIndex(child:DisplayObject, index:int):void
KapUIComponent
Protected Methods
 MethodDefined by
  
loadKData():void
Generate a common data descriptor from the dataProvider and other data manipulation options.
KapUIComponent
Public Constants
 ConstantDefined by
  BICHROMATIC_COLORING : String = "bichromatic"
[static]
KapUIComponent
  DEFAULT_COLORING : String = "none"
[static]
KapUIComponent
  MONOCHROMATIC_COLORING : String = "monochromatic"
[static]
KapUIComponent
  UNIFORM_COLORING : String = "uniform"
[static]
KapUIComponent
Property detail
_analysisPathproperty
protected var _analysisPath:Array

private

analysisPathproperty 
analysisPath:Object  [read-write]

An array used for CSV and General ICollectionView files and enables data source analysis with a given logic. For CSV files, the analysis path is an Array containing the considered columns headers in the same order of the required analysis logic. For ICollectionView instances and Objects with children property, the analysis path is an Array containing the considered attributes in the same order of the required analysis logic. The String representation of that Array is also handled (visualizer.analysisPath=prop1;prop2).

This property can be used as the source for data binding.

Implementation
    public function get analysisPath():Object
    public function set analysisPath(value:Object):void

Example
Given the following CSV file, one of the analysis Paths should be ["Entreprise", "Departement", "ID"], the delimiter should be "," and the record delimiter should be "/"". "Entreprise","Departement","ID" "Enterp","D1","D11" "Enterp","D1","D12" "Enterp","D1","D13" "Enterp","D2","D21" "Enterp","D2","D22" "Enterp","D3","D31" ...

_attributesDescriptorproperty 
protected var _attributesDescriptor:AttributesDescriptor

private

attributesDescriptorproperty 
attributesDescriptor:AttributesDescriptor  [read-write]

It assigns to each column reference in the analysisPath its attributes. By default, Each field of an analysisPath column header have as attributes the other column headers of the CSV input. attributesDescriptor specifies the content and properties of extracted data sets.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get attributesDescriptor():AttributesDescriptor
    public function set attributesDescriptor(value:AttributesDescriptor):void

Example
//Assuming a CSV that have six columns ( "Entreprise", "Name", "Departement", "Technology", "Name", "Holidays") //and that we have specified ["Entreprise", "Name", "Departement"] as an analysisPath, we want to specify for each element extracted from a //column reference in the buildPath, its properties and data content. The following snippet shows how attributesDescriptor solves the problem. kData.buildPath=["Entreprise", "Name", "Departement"]; var attributesDescriptor:AttributesDescriptor=new AttributesDescriptor(); // Creation of the _Attributes var attributesEntity1:AttributesEntity=new AttributesEntity("Entreprise",["Technology","Age"]); // Data sets generated from the analysis of _Entreprise_ column have only _Technology_ and _Age_ properties var attributesEntity2:AttributesEntity=new AttributesEntity("Name",["Holidays"]); // Data sets generated from the analysis of _Name_ column have only _Holidays_ properties var attributesEntity3:AttributesEntity=new AttributesEntity("Departement",["Age"]); // Data sets generated from the analysis of _Department_ column have only _Age_ properties attributesDescriptor.AddAttributesDescription(attributesEntity1); // Adding AttributesEntity instances to the _AttributesDescriptor_ instance attributesDescriptor.AddAttributesDescription(attributesEntity2); attributesDescriptor.AddAttributesDescription(attributesEntity3); myVisualizer.attributesDescriptor=attributesDescriptor; // registering the created _AttributesDescriptor_ instance in _Visualizer_instance.

_computeExtractedHierarchiesproperty 
base_internal var _computeExtractedHierarchies:Boolean = false
_computeHierarchiesproperty 
base_internal var _computeHierarchies:Boolean = true
_computeSubGraphsproperty 
base_internal var _computeSubGraphs:Boolean = true
_considerSingleNodeAsHierarchyproperty 
base_internal var _considerSingleNodeAsHierarchy:Boolean = true
_csvDelimiterproperty 
protected var _csvDelimiter:String = ";"

private

csvDelimiterproperty 
csvDelimiter:String  [read-write]

CSV delimiter used for csv source parsing.

The default value is ;.

This property can be used as the source for data binding.

Implementation
    public function get csvDelimiter():String
    public function set csvDelimiter(value:String):void
_customTreeDataDescriptorproperty 
protected var _customTreeDataDescriptor:ITreeDataDescriptor

private

customTreeDataDescriptorproperty 
customTreeDataDescriptor:ITreeDataDescriptor  [read-write]

Custom Tree Data descriptor for navigating inside data provider object.

This property can be used as the source for data binding.

Implementation
    public function get customTreeDataDescriptor():ITreeDataDescriptor
    public function set customTreeDataDescriptor(value:ITreeDataDescriptor):void
_dataProviderproperty 
protected var _dataProvider:Object

private

dataProviderproperty 
dataProvider:Object  [read-write]

Visualizer Data provider. It can be a :

This property can be used as the source for data binding.

Implementation
    public function get dataProvider():Object
    public function set dataProvider(value:Object):void

See also

_dataProviderChangedproperty 
protected var _dataProviderChanged:Boolean

private

_dataProviderTypeproperty 
protected var _dataProviderType:int

private

_groupPropertyproperty 
protected var _groupProperty:String

private

groupPropertyproperty 
groupProperty:String  [read-write]

Property in a node data object (XML node for example) which value refers to the group dependency.The value is considered as the unique id of the group. Using the groupProperty, each node will be depending to a given group according to the groupProperty value. If the value is null or the data unit does not contain the referred property, the node won't be depending to any group. Note : The groupProperty won't work without the idPropert set.

This property can be used as the source for data binding.

Implementation
    public function get groupProperty():String
    public function set groupProperty(value:String):void

Example
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:visualizer="fr.kapit.visualizer.> <fx:Declarations> <fx:XML id="xmlDataProvider" xmlns=""> <node id="0" group="group2"> <node id="1" group="group1"> <node id="2" group="group1"/> <node id="3"/> <node id="4" group="group1"/> </node> <node id="2" group="group1"> <node id="3"/> </node> </node> </fx:XML> </fx:Declarations> <visualizer:Visualizer width="100%" height="100%" dataProvider="{xmlDataProvider}" nodeLabelFields="@id" idProperty="@id" groupProperty="@group" layout="hierarchicalCyclic"> </visualizer:Visualizer> </s:Application>

_idPropertyproperty 
protected var _idProperty:String

private

idPropertyproperty 
idProperty:String  [read-write]

For any data item in any ICollectionView dataProvider (XML, array collection containing objects with children property), The idProperty is the property which value is considered as the unique id of the item (node, group or link). It enables extracting general graphs from hierarchical ICollectionView data providers.

This property can be used as the source for data binding.

Implementation
    public function get idProperty():String
    public function set idProperty(value:String):void

See also


Example
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:visualizer="fr.kapit.visualizer.> <fx:Declarations> <fx:XML id="xmlDataProvider" xmlns=""> <node id="0"> <node id="1"> <node id="2"/> <node id="3"/> <node id="4"/> </node> <node id="2"> <node id="3"/> </node> </node> </fx:XML> </fx:Declarations> <visualizer:Visualizer width="100%" height="100%" dataProvider="{xmlDataProvider}" nodeLabelFields="@id" idProperty="@id" layout="hierarchicalCyclic"> </visualizer:Visualizer> </s:Application>

_ignoreRootproperty 
protected var _ignoreRoot:Boolean

private

ignoreRootproperty 
ignoreRoot:Boolean  [read-write]

Indicator if common root node of ICollectionView should be ignored. This property should be used when manipulating ICollectionView instances or Object with children property or customTreeDataDescritor.

If set to True, the generated output of the visualizer will be a disconnected graph showing the generated subGraphs from all direct input children.

The default value is false.

This property can be used as the source for data binding.

Implementation
    public function get ignoreRoot():Boolean
    public function set ignoreRoot(value:Boolean):void
_kDataproperty 
protected var _kData:KData
kDataproperty 
kData:KData  [read-only]

private

Implementation
    public function get kData():KData
_linkPropertyproperty 
protected var _linkProperty:String

private

linkPropertyproperty 
linkProperty:String  [read-write]

Property in a node data object depending to an ICollectionView dataProvider which value will be assigned to the created link. The value is affected to the link created between the node data object and its parent in the data provider structure.

This property can be used as the source for data binding.

Implementation
    public function get linkProperty():String
    public function set linkProperty(value:String):void

Example
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
       xmlns:s="library://ns.adobe.com/flex/spark" 
       xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:visualizer="fr.kapit.visualizer.>
    <fx:Script>
     <![CDATA[
      private function linkLabelFieldFunction(data:Object):Array
      {
       return [data[0].toString()];
      }
     ]]>
    </fx:Script>
     <fx:Declarations>
    <fx:XML id="xmlDataProvider" xmlns="">
      <node id="0">
       <node id="1" link="1 to 0">
        <node id="2" link="1 to 2"/>
        <node id="3" link="1 to 3"/>
        <node id="4" link="1 to 4"/>
       </node>
       <node id="2" link="0 to 2">
        <node id="3" link="2 to 3"/>
       </node>
      </node>
     </fx:XML>
    </fx:Declarations>
    <visualizer:Visualizer 
     width="100%" height="100%" 
     dataProvider="{xmlDataProvider}"
     nodeLabelFields="@id"
     idProperty="@id"
     linkDecoratorLabelFieldFunction="linkLabelFieldFunction"
     layout="hierarchicalCyclic">
    </visualizer:Visualizer>
   </s:Application>
   

_mergeDescriptorproperty 
protected var _mergeDescriptor:MergeDescriptor

private

mergeDescriptorproperty 
mergeDescriptor:MergeDescriptor  [read-write]

Descriptor defining merging tasks that must be applied on a CSV source before displaying it. In fact, a MergeDescriptor object is a set of MergeEntity instances, each one defines columns to be merged in one column according to a merging function. A MergeEntity instance is created by defining :

A MergeEntity is a unit merging task that must be added to the MergeDescriptor to be taken into account using the addMergeDescription(mergeEntity) method. When merging, the developer can choose between leaving the content of merged columns to be taken into account when performing data processing and adding the merging column or replacing them by the resulting column. This can be accomplished by setting to true or false the leaveMergeColumns of the MergeDescriptor instance. The mergingDescriptor should be used only with CSV files.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get mergeDescriptor():MergeDescriptor
    public function set mergeDescriptor(value:MergeDescriptor):void

Example
//Assuming a CSV that have two columns named "work_days" and "total_days" and that we want to merge them into // a "holidays" column via a substraction function named mergeFunction var mergeDescriptor:MergeDescriptor=new MergeDescriptor(); // Initializing a merge Descriptor var mergeEntity:MergeEntity=new MergeEntity(["work_days","total_days"],"holidays",mergeFunction); // Merging _"work_days"_ and _"total_days"_ into a _holidays_ column mergeDescriptor.addMergeDescription(mergeEntity); // Adding the merge entity to the merge descriptor mergeDescriptor.leaveMergeColumns=false; // Replace merged columns with new resulting column (_holidays_ column) myVisualizer.mergeDescriptor=mergeDescriptor; // Assigning Merging Descriptor ... private function mergeFunction(arr:Array):Number { if(arr.length!=2) return 0; return Number(arr[1])-Number(arr[0]); }

_recordDelimiterproperty 
protected var _recordDelimiter:String = ""

private

recordDelimiterproperty 
recordDelimiter:String  [read-write]

Record delimiter of CSV fields.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get recordDelimiter():String
    public function set recordDelimiter(value:String):void
_reportingFunctionsproperty 
protected var _reportingFunctions:Dictionary

private

reportingFunctionsproperty 
reportingFunctions:Dictionary  [read-write]

Reporting functions used to compute a data field from an array of data fields generated after CSV parsing or advanced XML treatment. In fact, when building data sets and their corresponding data from a given column (or attribute), several rows are grouped into one row and each data field content (attribute column/attribute) is added to an array. Transforming the data fields arrays into a real data by applying standard or custom functions can be very important to have correct and coherent data for nodes data. The reportingFunctions property is a Dictionary that assigns to a given column key (column name for CSV) or attribute (for XML) its reporting function. This function should accept as parameters an array and a type class (uint for example). Actually, there are two standard functions that can be accessed statically from the ReportingUtils class:

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get reportingFunctions():Dictionary
    public function set reportingFunctions(value:Dictionary):void

Example
//Assuming a CSV that have six columns ( "Entreprise", "Name", "Departement", "Technology", "Name", "Holidays") //and that we have specified ["Entreprise", "Name", "Departement"] as an analysisPath, we want to specify to sum Holidays Data sets for each generated node data and to compute Age mean for ech department, technology and Employee. The following snippet shows how reporting functions solves the problem. var reportingFunctions:Dictionary=new Dictionary(); reportingFunctions["Age"]=ReportingUtils.mean; reportingFunctions["Holidays"]=ReportingUtils.sum; myVisualizer.reportingFunctions=reportingFunctions;

_reportingFunctionsChangedproperty 
protected var _reportingFunctionsChanged:Boolean

private

_supportGMLproperty 
base_internal var _supportGML:Boolean = true
_typesDescriptorproperty 
protected var _typesDescriptor:Dictionary

private

typesDescriptorproperty 
typesDescriptor:Dictionary  [read-write]

Column types descriptor. This Object specifies the Class needed to parse the content of a column fields. By default, the Visualizer component recognize Data Types of columns content (String, Number, Date....). But in some cases, especially when dealing with IDs, Numbers, for example, must be considered as String and we need to specify this for the Visualizer. The solution is to specify the Type of the column fields where bypassing the automatic type assignment is needed. The Types Descripor is a Dictionary that allows to assign a Type Class to a given column data and thus giving the Visualizer integrator the possibility to correctly describe the content of his data source columns.

The default value is null;.

This property can be used as the source for data binding.

Implementation
    public function get typesDescriptor():Dictionary
    public function set typesDescriptor(value:Dictionary):void

Example
var typesDescriptor:Dictionary= new Dictionary(); typesDescriptor["Age"]=String; typesDescriptor["BirthDay"]=Date; myVisualizer.typesDescriptor=typesDescriptor;

_useMultiLinkproperty 
protected var _useMultiLink:Boolean = true

private

_withHeadersproperty 
protected var _withHeaders:Boolean = true

private

withHeadersproperty 
withHeaders:Boolean  [read-write]

Indicator if the CSV data provider first row are headers or not.

The default value is true.

This property can be used as the source for data binding.

Implementation
    public function get withHeaders():Boolean
    public function set withHeaders(value:Boolean):void
Constructor detail
KapUIComponent()constructor
public function KapUIComponent()
Method detail
addChild()method
public override function addChild(child:DisplayObject):DisplayObject

Parameters
child:DisplayObject

Returns
DisplayObject
addChildAt()method 
public override function addChildAt(child:DisplayObject, index:int):DisplayObject

Parameters
child:DisplayObject
 
index:int

Returns
DisplayObject
loadKData()method 
protected function loadKData():void

Generate a common data descriptor from the dataProvider and other data manipulation options.

setChildIndex()method 
public override function setChildIndex(child:DisplayObject, index:int):void

Parameters
child:DisplayObject
 
index:int
Constant detail
BICHROMATIC_COLORINGconstant
public static const BICHROMATIC_COLORING:String = "bichromatic"
COLLECTION_DATA_SOURCEconstant 
base_internal static const COLLECTION_DATA_SOURCE:uint = 0
CSV_DATA_SOURCEconstant 
base_internal static const CSV_DATA_SOURCE:uint = 2
DEFAULT_COLORINGconstant 
public static const DEFAULT_COLORING:String = "none"
GML_DATA_SOURCEconstant 
base_internal static const GML_DATA_SOURCE:uint = 1
MONOCHROMATIC_COLORINGconstant 
public static const MONOCHROMATIC_COLORING:String = "monochromatic"
UNDEFINED_COLORINGconstant 
base_internal static const UNDEFINED_COLORING:String = "undefined"
UNIFORM_COLORINGconstant 
public static const UNIFORM_COLORING:String = "uniform"