Package | flexlib.controls |
Class | public class ConvertibleTreeList |
Inheritance | ConvertibleTreeList ![]() |
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
Property | Defined 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 |
Method | Defined by | ||
---|---|---|---|
ConvertibleTreeList |
Method | Defined by | ||
---|---|---|---|
createChildren():void
| ConvertibleTreeList | ||
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
| ConvertibleTreeList |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when the selectedIndex or selectedItem property
changes as a result of user interaction. | ConvertibleTreeList |
Constant | Defined 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 |
allowMultipleSelection | property |
allowMultipleSelection:Boolean
[read-write]Implementation
public function get allowMultipleSelection():Boolean
public function set allowMultipleSelection(value:Boolean):void
dataProvider | property |
dataProvider:Object
[read-write]Implementation
public function get dataProvider():Object
public function set dataProvider(value:Object):void
iconField | property |
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
.
public function get iconField():String
public function set iconField(value:String):void
See also
labelField | property |
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"
.
public function get labelField():String
public function set labelField(value:String):void
See also
list | property |
list:List
[read-only]
The List control that is displayed when the mode
is set to FULL_LIST
,
TEXT_LIST
, or ICON_LIST
.
public function get list():List
listField | property |
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"
.
public function get listField():String
public function set listField(value:String):void
mode | property |
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
selectedIndex | property |
selectedIndex:Object
[read-only]Implementation
public function get selectedIndex():Object
selectedItem | property |
selectedItem:Object
[read-write]Implementation
public function get selectedItem():Object
public function set selectedItem(value:Object):void
selectedItems | property |
selectedItems:Array
[read-write]Implementation
public function get selectedItems():Array
public function set selectedItems(value:Array):void
showRoot | property |
showRoot:Boolean
[read-write]Implementation
public function get showRoot():Boolean
public function set showRoot(value:Boolean):void
tree | property |
tree:Tree
[read-only]
The Tree control that is displayed when the mode
is set to ConvertibleTreeList.TREE
public function get tree():Tree
ConvertibleTreeList | () | constructor |
public function ConvertibleTreeList()
createChildren | () | method |
protected override function createChildren():void
updateDisplayList | () | method |
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Parameters
unscaledWidth:Number |
|
unscaledHeight:Number |
change | event |
mx.events.ListEvent
Dispatched when the selectedIndex
or selectedItem
property
changes as a result of user interaction.
FULL_LIST | constant |
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_LIST | constant |
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_LIST | constant |
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.
TREE | constant |
public static const TREE:String = "tree"
If mode is set to TREE then the Tree control is used for display.