Packageflexlib.controls
Classpublic class ConvertibleTreeList
InheritanceConvertibleTreeList Inheritance mx.containers.Canvas

A control that combines the functionality of the Tree component and the List component.

The ConvertibleTreeList allows you to use one control and have it display the dataProvider either as a Tree or as a List. You only have to set the dataProvider once. You can set the mode at any time to change the display mode.

See also

mx.controls.List
mx.controls.Tree


Public Properties
 PropertyDefined by
  allowMultipleSelection : Boolean
ConvertibleTreeList
  dataProvider : Object
ConvertibleTreeList
  iconField : String
The name of the field in the data provider object that determines what to display as the icon.
ConvertibleTreeList
  labelField : String
The name of the field in the data provider items to display as the label.
ConvertibleTreeList
  list : List
[read-only] The List control that is displayed when the mode is set to FULL_LIST, TEXT_LIST, or ICON_LIST.
ConvertibleTreeList
  listField : String
The name of the attribute that is used to check if an item in the dataProdiver should be included in the List control.
ConvertibleTreeList
  mode : String
The display mode for the ConvertibleTreeList control.
ConvertibleTreeList
  selectedIndex : Object
[read-only]
ConvertibleTreeList
  selectedItem : Object
ConvertibleTreeList
  selectedItems : Array
ConvertibleTreeList
  showRoot : Boolean
ConvertibleTreeList
  tree : Tree
[read-only] The Tree control that is displayed when the mode is set to ConvertibleTreeList.TREE
ConvertibleTreeList
Public Methods
 MethodDefined by
  
ConvertibleTreeList
Protected Methods
 MethodDefined by
  
ConvertibleTreeList
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
ConvertibleTreeList
Events
 EventSummaryDefined by
   Dispatched when the selectedIndex or selectedItem property changes as a result of user interaction.ConvertibleTreeList
Public Constants
 ConstantDefined by
  FULL_LIST : String = "list"
[static] If mode is set to FULL_LIST then the List control is used for display and both icons and labels are shown.
ConvertibleTreeList
  ICON_LIST : String = "icon"
[static] If mode is set to ICON_LIST then the List control is used for display and only icons are shown.
ConvertibleTreeList
  TEXT_LIST : String = "text"
[static] If mode is set to TEXT_LIST then the List control is used for display and only labels are shown.
ConvertibleTreeList
  TREE : String = "tree"
[static] If mode is set to TREE then the Tree control is used for display.
ConvertibleTreeList
Property detail
allowMultipleSelectionproperty
allowMultipleSelection:Boolean  [read-write]Implementation
    public function get allowMultipleSelection():Boolean
    public function set allowMultipleSelection(value:Boolean):void
dataProviderproperty 
dataProvider:Object  [read-write]Implementation
    public function get dataProvider():Object
    public function set dataProvider(value:Object):void
iconFieldproperty 
iconField:String  [read-write]

The name of the field in the data provider object that determines what to display as the icon. By default, the list class does not try to display icons with the text in the rows. However, by specifying an icon field, you can specify a graphic that is created and displayed as an icon in the row. This property is ignored by DataGrid.

The renderers will look in the data provider object for a property of the name supplied as the iconField. If the value of the property is a Class, it will instantiate that class and expect it to be an instance of an IFlexDisplayObject. If the value of the property is a String, it will look to see if a Class exists with that name in the application, and if it can't find one, it will also look for a property on the document with that name and expect that property to map to a Class.

The default value is null.

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

See also

mx.controls.listClasses.ListBase
labelFieldproperty 
labelField:String  [read-write]

The name of the field in the data provider items to display as the label. By default the list looks for a property named label on each item and displays it. However, if the data objects do not contain a label property, you can set the labelField property to use a different property in the data object. An example would be "FullName" when viewing a set of people names fetched from a database.

The default value is "label".

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

See also

mx.controls.listClasses.ListBase
listproperty 
list:List  [read-only]

The List control that is displayed when the mode is set to FULL_LIST, TEXT_LIST, or ICON_LIST.

Implementation
    public function get list():List
listFieldproperty 
listField:String  [read-write]

The name of the attribute that is used to check if an item in the dataProdiver should be included in the List control. The XML entry in the dataProvider should be something like: <entry showInList='true' label='Item' />, where you could set showInList to be false if you wanted the item to show up when this component is in Tree mode, but not in List mode.

The default value is "showInList".

Implementation
    public function get listField():String
    public function set listField(value:String):void
modeproperty 
mode:String  [read-write]

The display mode for the ConvertibleTreeList control.

Must be one of the static variables of ConvertibleTreeList, either TREE, FULL_LIST, TEXT_LIST, or ICON_LIST.

Implementation
    public function get mode():String
    public function set mode(value:String):void
selectedIndexproperty 
selectedIndex:Object  [read-only]Implementation
    public function get selectedIndex():Object
selectedItemproperty 
selectedItem:Object  [read-write]Implementation
    public function get selectedItem():Object
    public function set selectedItem(value:Object):void
selectedItemsproperty 
selectedItems:Array  [read-write]Implementation
    public function get selectedItems():Array
    public function set selectedItems(value:Array):void
showRootproperty 
showRoot:Boolean  [read-write]Implementation
    public function get showRoot():Boolean
    public function set showRoot(value:Boolean):void
treeproperty 
tree:Tree  [read-only]

The Tree control that is displayed when the mode is set to ConvertibleTreeList.TREE

Implementation
    public function get tree():Tree
Constructor detail
ConvertibleTreeList()constructor
public function ConvertibleTreeList()
Method detail
createChildren()method
protected override function createChildren():void
updateDisplayList()method 
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):voidParameters
unscaledWidth:Number
 
unscaledHeight:Number
Event detail
changeevent 
Event object type: mx.events.ListEvent

Dispatched when the selectedIndex or selectedItem property changes as a result of user interaction.

Constant detail
FULL_LISTconstant
public static const FULL_LIST:String = "list"

If mode is set to FULL_LIST then the List control is used for display and both icons and labels are shown.

ICON_LISTconstant 
public static const ICON_LIST:String = "icon"

If mode is set to ICON_LIST then the List control is used for display and only icons are shown.

TEXT_LISTconstant 
public static const TEXT_LIST:String = "text"

If mode is set to TEXT_LIST then the List control is used for display and only labels are shown.

TREEconstant 
public static const TREE:String = "tree"

If mode is set to TREE then the Tree control is used for display.