| Package | com.flextoolbox.controls |
| Class | public class TreeMap |
| Inheritance | TreeMap mx.core.UIComponent |
| Implements | ITreeMapBranchRenderer |
See also
| Property | Defined by | ||
|---|---|---|---|
| branchRenderer : ClassFactory
The custom branch renderer for the control.
| TreeMap | ||
| colorField : String
The name of the field in the data provider items to use as the color.
| TreeMap | ||
| colorFunction : Function
A user-supplied function to run on each item to determine its color.
| TreeMap | ||
| data : Object
Used to render data when the
TreeMap is a branch renderer
for a parent TreeMap. | TreeMap | ||
| dataDescriptor : ITreeDataDescriptor
Returns the current ITreeDataDescriptor.
| TreeMap | ||
| dataProvider : Object
Set of data to be viewed.
| TreeMap | ||
| deriveBranchWeightFromLeaves : Boolean
If true, the weight value of a branch will be the sum of its children.
| TreeMap | ||
| header : TreeMapHeader
The header.
| TreeMap | ||
| headerToolTip : String
A
TreeMap may display a tooltip on its header. | TreeMap | ||
| label : String
A
TreeMap may display a label in its header. | TreeMap | ||
| labelField : String
The name of the field in the data provider items to display as the label
of the data renderer.
| TreeMap | ||
| labelFunction : Function
A user-supplied function to run on each item to determine its label.
| TreeMap | ||
| layoutStrategy : ITreeMapLayoutStrategy
The custom layout algorithm for the control.
| TreeMap | ||
| maximumDepth : int
If value is >= 0, the treemap will only render branches to a specific depth.
| TreeMap | ||
| nodeRenderer : ClassFactory
The custom node renderer for the control.
| TreeMap | ||
| selectable : Boolean
Indicates if the node's within the TreeMap can be selected by the user.
| TreeMap | ||
| selected : Boolean
If this TreeMap is a renderer for a parent TreeMap,
it may be the selected node.
| TreeMap | ||
| selectedItem : Object
The data for the currently selected node.
| TreeMap | ||
| toolTipField : String
The name of the field in the data provider items to display as the ToolTip
of the data renderer.
| TreeMap | ||
| toolTipFunction : Function
A user-supplied function to run on each item to determine its ToolTip.
| TreeMap | ||
| weightField : String
The name of the field in the data provider items to use in weight calculations.
| TreeMap | ||
| weightFunction : Function
A user-supplied function to run on each item to determine its weight.
| TreeMap | ||
| zoomOutType : String
Determines the way that zoom out actions work.
| TreeMap | ||
| Property | Defined by | ||
|---|---|---|---|
| border : IFlexDisplayObject
The skinnable border.
| TreeMap | ||
| collection : ICollectionView
An ICollectionView that represents the data provider.
| TreeMap | ||
| zoomed : Boolean = false | TreeMap | ||
| zoomedNode : ITreeMapNodeRenderer
The node that is currently zoomed.
| TreeMap | ||
| Method | Defined by | ||
|---|---|---|---|
|
TreeMap()
Constructor.
| TreeMap | ||
|
itemToColor(item:Object):uint
Determines the color value for an item from the data provider.
| TreeMap | ||
|
itemToLabel(item:Object):String
Determines the label text for an item from the data provider.
| TreeMap | ||
|
itemToRenderer(data:Object):ITreeMapNodeRenderer
Returns the node renderer that displays specific data.
| TreeMap | ||
|
itemToToolTip(item:Object):String
Determines the tooltip text for an item from the data provider.
| TreeMap | ||
|
itemToWeight(item:Object):Number
Determines the weight value for an item from the data provider.
| TreeMap | ||
| Method | Defined by | ||
|---|---|---|---|
|
containsItem(item:Object, data:Object = null):Boolean
Searches the data provider for the specified item.
| TreeMap | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
Dispatched when the selectedIndex or selectedItem property
changes as a result of user interaction. | TreeMap | |||
| Dispatched when the user clicks on an node in the control. | TreeMap | |||
| Dispatched when the user double-clicks on an node in the control. | TreeMap | |||
| Dispatched when the user rolls the mouse pointer out of an node in the control. | TreeMap | |||
| Dispatched when the user rolls the mouse pointer over an node in the control. | TreeMap | |||
| border | property |
protected var border:IFlexDisplayObjectThe skinnable border.
| branchRenderer | property |
branchRenderer:ClassFactory [read-write]The custom branch renderer for the control. You can specify a drop-in, inline, or custom branch renderer. Unlike the renderers used by Tree components, nodes and branches in a TreeMap are quite different visually and functionally. As a result, it's easier to specify and customize seperate renderers for either type.
The default branch renderer is TreeMap.
Implementation public function get branchRenderer():ClassFactory
public function set branchRenderer(value:ClassFactory):void
| collection | property |
protected var collection:ICollectionView
An ICollectionView that represents the data provider.
When you set the dataProvider property,
Flex wraps the data provider as necessary to
support the ICollectionView interface and
sets this property to the result.
The TreeMap class then uses this property to access
data in the provider.
When you get the dataProvider property,
Flex returns this value.
| colorField | property |
colorField:String [read-write]The name of the field in the data provider items to use as the color.
This property can be used as the source for data binding.
Implementation public function get colorField():String
public function set colorField(value:String):void
| colorFunction | property |
colorFunction:Function [read-write]A user-supplied function to run on each item to determine its color.
The color function takes one argument, the item in the data provider. It returns a uint.
colorFunction(item:Object):uint
This property can be used as the source for data binding.
Implementation public function get colorFunction():Function
public function set colorFunction(value:Function):void
| data | property |
data:Object [read-write]
Used to render data when the TreeMap is a branch renderer
for a parent TreeMap. For most applications, it is
recommended that you use the dataProvider property.
public function get data():Object
public function set data(value:Object):void
See also
| dataDescriptor | property |
dataDescriptor:ITreeDataDescriptor [read-write]Returns the current ITreeDataDescriptor.
The default value is DefaultDataDescriptor.
public function get dataDescriptor():ITreeDataDescriptor
public function set dataDescriptor(value:ITreeDataDescriptor):void
| dataProvider | property |
dataProvider:Object [read-write]
Set of data to be viewed.
This property lets you use most types of objects as data providers.
If you set the dataProvider property to an Array,
it will be converted to an ArrayCollection. If you set the property to
an XML object, it will be converted into an XMLListCollection with
only one item. If you set the property to an XMLList, it will be
converted to an XMLListCollection.
If you set the property to an object that implements the
ICollectionView interface, the object will be used directly.
As a consequence of the conversions, when you get the
dataProvider property, it will always be
an ICollectionView, and therefore not necessarily be the type of object
you used to set the property.
This behavor is important to understand if you want to modify the data
in the data provider: changes to the original data may not be detected,
but changes to the ICollectionView object that you get back from the
dataProvider property will be detected.
The default value is null.
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
| deriveBranchWeightFromLeaves | property |
deriveBranchWeightFromLeaves:Boolean [read-write]
If true, the weight value of a branch will be the sum of its children.
If false, a branch's weight value is derived from the weightField or weightFunction.
This property can be used as the source for data binding.
Implementation public function get deriveBranchWeightFromLeaves():Boolean
public function set deriveBranchWeightFromLeaves(value:Boolean):void
| header | property |
public var header:TreeMapHeaderThe header. Contains a label. Works like the Accordion's header.
See also
| headerToolTip | property |
headerToolTip:String [read-write]
A TreeMap may display a tooltip on its header.
public function get headerToolTip():String
public function set headerToolTip(value:String):void
| label | property |
label:String [read-write]
A TreeMap may display a label in its header.
public function get label():String
public function set label(value:String):void
| labelField | property |
labelField:String [read-write]
The name of the field in the data provider items to display as the label
of the data renderer. As a special case, if the nodes are TreeMap
components, this function applies to the TreeMap label.
This property can be used as the source for data binding.
Implementation public function get labelField():String
public function set labelField(value:String):void
| labelFunction | property |
labelFunction:Function [read-write]A user-supplied function to run on each item to determine its label.
The label function takes one argument, the item in the data provider. It returns a String.
labelFunction(item:Object):String
This property can be used as the source for data binding.
Implementation public function get labelFunction():Function
public function set labelFunction(value:Function):void
| layoutStrategy | property |
layoutStrategy:ITreeMapLayoutStrategy [read-write]The custom layout algorithm for the control.
The default alogrithm is Squarify.
Implementation public function get layoutStrategy():ITreeMapLayoutStrategy
public function set layoutStrategy(value:ITreeMapLayoutStrategy):void
| maximumDepth | property |
maximumDepth:int [read-write]If value is >= 0, the treemap will only render branches to a specific depth.
Implementation public function get maximumDepth():int
public function set maximumDepth(value:int):void
| nodeRenderer | property |
nodeRenderer:ClassFactory [read-write]The custom node renderer for the control. You can specify a drop-in, inline, or custom node renderer.
The default node renderer is TreeMapNodeRenderer.
Implementation public function get nodeRenderer():ClassFactory
public function set nodeRenderer(value:ClassFactory):void
| selectable | property |
selectable:Boolean [read-write]Indicates if the node's within the TreeMap can be selected by the user.
Implementation public function get selectable():Boolean
public function set selectable(value:Boolean):void
| selected | property |
selected:Boolean [read-write]If this TreeMap is a renderer for a parent TreeMap, it may be the selected node.
Implementation public function get selected():Boolean
public function set selected(value:Boolean):void
| selectedItem | property |
selectedItem:Object [read-write]The data for the currently selected node. May be the data for a grandchild or deeper ancestor.
This property can be used as the source for data binding.
Implementation public function get selectedItem():Object
public function set selectedItem(value:Object):void
| toolTipField | property |
toolTipField:String [read-write]The name of the field in the data provider items to display as the ToolTip of the data renderer.
This property can be used as the source for data binding.
Implementation public function get toolTipField():String
public function set toolTipField(value:String):void
| toolTipFunction | property |
toolTipFunction:Function [read-write]A user-supplied function to run on each item to determine its ToolTip.
The tooltip function takes one argument, the item in the data provider. It returns a String.
toolTipFunction(item:Object):String
This property can be used as the source for data binding.
Implementation public function get toolTipFunction():Function
public function set toolTipFunction(value:Function):void
| weightField | property |
weightField:String [read-write]The name of the field in the data provider items to use in weight calculations.
This property can be used as the source for data binding.
Implementation public function get weightField():String
public function set weightField(value:String):void
| weightFunction | property |
weightFunction:Function [read-write]A user-supplied function to run on each item to determine its weight.
The weight function takes one arguments, the item in the data provider. It returns a Number.
weightFunction(item:Object):Number
This property can be used as the source for data binding.
Implementation public function get weightFunction():Function
public function set weightFunction(value:Function):void
| zoomed | property |
protected var zoomed:Boolean = false
| zoomedNode | property |
protected var zoomedNode:ITreeMapNodeRendererThe node that is currently zoomed. Null if none are zoomed.
| zoomOutType | property |
zoomOutType:String [read-write]
Determines the way that zoom out actions work. Values are defined by the
constants in the TreeMapZoomOutType class.
public function get zoomOutType():String
public function set zoomOutType(value:String):void
| TreeMap | () | constructor |
public function TreeMap()Constructor.
| containsItem | () | method |
protected function containsItem(item:Object, data:Object = null):BooleanSearches the data provider for the specified item.
Parametersitem:Object — this item to search for within the data provider
|
|
data:Object (default = null) — the current recursive position within the data provider
|
Boolean |
| itemToColor | () | method |
public function itemToColor(item:Object):uintDetermines the color value for an item from the data provider.
Parametersitem:Object |
uint |
| itemToLabel | () | method |
public function itemToLabel(item:Object):StringDetermines the label text for an item from the data provider.
Parametersitem:Object |
String |
| itemToRenderer | () | method |
public function itemToRenderer(data:Object):ITreeMapNodeRendererReturns the node renderer that displays specific data.
Parametersdata:Object — the data for which to find a matching node renderer
|
ITreeMapNodeRenderer —
the node renderer that matches the data
|
| itemToToolTip | () | method |
public function itemToToolTip(item:Object):StringDetermines the tooltip text for an item from the data provider.
Parametersitem:Object |
String |
| itemToWeight | () | method |
public function itemToWeight(item:Object):NumberDetermines the weight value for an item from the data provider.
Parametersitem:Object |
Number |
| change | event |
flash.events.Event
Dispatched when the selectedIndex or selectedItem property
changes as a result of user interaction.
| nodeClick | event |
com.flextoolbox.events.TreeMapEvent
Dispatched when the user clicks on an node in the control.
| nodeDoubleClick | event |
com.flextoolbox.events.TreeMapEvent
Dispatched when the user double-clicks on an node in the control.
| nodeRollOut | event |
com.flextoolbox.events.TreeMapEvent
Dispatched when the user rolls the mouse pointer out of an node in the control.
| nodeRollOver | event |
com.flextoolbox.events.TreeMapEvent
Dispatched when the user rolls the mouse pointer over an node in the control.