Flash 8 Documentation |
|||
| Components Language Reference > Tree component (Flash Professional only) > Tree class (Flash Professional only) | |||
Inheritance MovieClip > UIObject class > UIComponent class > View > ScrollView > ScrollSelectList > List component > Tree
ActionScript Class Name mx.controls.Tree
The methods, properties, and events of the Tree class allow you to manage and manipulate Tree objects.
The following table lists methods of the Tree class.
|
Method |
Description |
|---|---|
|
Adds a node to a Tree instance. |
|
|
Adds a node at a specific location in a Tree instance. |
|
|
Returns the display index of a given node. |
|
|
Specifies whether the folder is a branch (has a folder icon and an expander arrow). |
|
|
Indicates whether a node is open or closed. |
|
|
Maps a display index of the tree onto the node that is displayed there. |
|
|
Returns a node on the root of the tree. |
|
|
Updates the tree. |
|
|
Removes all nodes from a Tree instance and refreshes the tree. |
|
|
Removes a node at a specified position and refreshes the tree. |
|
|
Specifies an icon for the specified node. |
|
|
Specifies whether a node is a branch (has a folder icon and expander arrow). |
|
|
Opens or closes a node. |
The following table lists the methods the Tree class inherits from the UIObject class. When calling these methods from the Tree object, use the form TreeInstance.methodName.
|
Method |
Description |
|---|---|
|
Creates an object on the specified class. |
|
|
Creates a subobject on an object. |
|
|
Destroys a component instance. |
|
|
Calls a function when parameters have been set in the Property and Component inspectors. |
|
|
Gets the style property from the style declaration or object. |
|
|
Marks the object so it is redrawn on the next frame interval. |
|
|
Moves the object to the requested position. |
|
|
Forces validation of the object so it is drawn in the current frame. |
|
|
Resizes the object to the requested size. |
|
|
Sets a skin in the object. |
|
|
Sets the style property on the style declaration or object. |
The following table lists the methods the Tree class inherits from the UIComponent class. When calling these methods from the Tree object, use the form TreeInstance.methodName.
|
Method |
Description |
|---|---|
|
Returns a reference to the object that has focus. |
|
|
Sets focus to the component instance. |
The following table lists the methods the Tree class inherits from the List class. When calling these methods from the Tree object, use the form TreeInstance.methodName.
|
Method |
Description |
|---|---|
|
Adds an item to the end of the list. |
|
|
Adds an item to the list at the specified index. With the Tree component, it is better to use Tree.addTreeNodeAt(). |
|
|
Returns the item at the specified index. |
|
|
Removes all items from the list. |
|
|
Removes the item at the specified index. |
|
|
Replaces the item at the specified index with another item. |
|
|
Applies the specified properties to the specified item. |
|
|
Sorts the items in the list according to the specified compare function. |
|
|
Sorts the items in the list according to a specified property. |
The following table lists properties of the Tree class.
|
Property |
Description |
|---|---|
|
Specifies an XML data source. |
|
|
Specifies the first node at the top of the display. |
|
|
Specifies the selected node in a Tree instance. |
|
|
Specifies the selected nodes in a Tree instance. |
The following table lists the properties the Tree class inherits from the UIObject class. When accessing these properties from the Tree object, use the form TreeInstance.propertyName.
|
Property |
Description |
|---|---|
|
Read-only; the position of the bottom edge of the object, relative to the bottom edge of its parent. |
|
|
Read-only; the height of the object, in pixels. |
|
|
Read-only; the left edge of the object, in pixels. |
|
|
Read-only; the position of the right edge of the object, relative to the right edge of its parent. |
|
|
A number indicating the scaling factor in the x direction of the object, relative to its parent. |
|
|
A number indicating the scaling factor in the y direction of the object, relative to its parent. |
|
|
Read-only; the position of the top edge of the object, relative to its parent. |
|
|
A Boolean value indicating whether the object is visible ( |
|
|
Read-only; the width of the object, in pixels. |
|
|
Read-only; the left edge of the object, in pixels. |
|
|
Read-only; the top edge of the object, in pixels. |
The following table lists the properties the Tree class inherits from the UIComponent class. When accessing these properties from the Tree object, use the form TreeInstance.propertyName.
|
Property |
Description |
|---|---|
|
Indicates whether the component can receive focus and input. |
|
|
A number indicating the tab order for a component in a document. |
The following table lists the properties the Tree class inherits from the List class. When accessing these properties from the Tree object, use the form TreeInstance.propertyName.
|
Property |
Description |
|---|---|
|
Assigns the class or symbol to use to display each row of the list. |
|
|
The source of the list items. |
|
|
The horizontal position of the list. |
|
|
Indicates whether the horizontal scroll bar is displayed ( |
|
|
A field in each item to be used to specify icons. |
|
|
A function that determines which icon to use. |
|
|
Specifies a field of each item to be used as label text. |
|
|
A function that determines which fields of each item to use for the label text. |
|
|
The number of items in the list. This property is read-only. |
|
|
The number of pixels the list can scroll to the right, when List.hScrollPolicy is set to |
|
|
Indicates whether multiple selection is allowed in the list ( |
|
|
The number of rows that are at least partially visible in the list. |
|
|
The pixel height of every row in the list. |
|
|
Indicates whether the list is selectable ( |
|
|
The index of a selection in a single-selection list. |
|
|
An array of the selected items in a multiple-selection list. |
|
|
The selected item in a single-selection list. This property is read-only. |
|
|
The selected item objects in a multiple-selection list. This property is read-only. |
|
|
Scrolls the list so the topmost visible item is the number assigned. |
|
|
Indicates whether the vertical scroll bar is displayed ( |
The following table lists events of the Tree class.
|
Event |
Description |
|---|---|
|
Broadcast when a node is closed by a user. |
|
|
Broadcast when a node is opened by a user. |
The following table lists the events the Tree class inherits from the UIObject class.
|
Event |
Description |
|---|---|
|
Broadcast when an object is about to draw its graphics. |
|
|
Broadcast when an object's state changes from visible to invisible. |
|
|
Broadcast when subobjects are being created. |
|
|
Broadcast when the object has moved. |
|
|
Broadcast when an object has been resized. |
|
|
Broadcast when an object's state changes from invisible to visible. |
|
|
Broadcast when the subobjects are being unloaded. |
The following table lists the events the Tree class inherits from the UIComponent class.
|
Event |
Description |
|---|---|
|
Broadcast when an object receives focus. |
|
|
Broadcast when an object loses focus. |
|
|
Broadcast when a key is pressed. |
|
|
Broadcast when a key is released. |
The following table lists the events the Tree class inherits from the List class.
|
Event |
Description |
|---|---|
|
Broadcast whenever user interaction causes the selection to change. |
|
|
Broadcast when the pointer rolls over and then off list items. |
|
|
Broadcast when the pointer rolls over list items. |
|
|
Broadcast when a list is scrolled. |
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00004122.html
Comments
No screen name said on Nov 2, 2006 at 6:39 AM :