套件 | mx.collections |
類別 | public class HierarchicalData |
繼承 | HierarchicalData EventDispatcher Object |
實作 | IHierarchicalData |
子類別 | GroupingCollection, GroupingCollection2 |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
dataProvider
property an instance of the HierarchicalData class.
This implementation handles E4X, XML, and Object nodes in similar but different
ways. See each method description for details on how the method
accesses values in nodes of various types.
相關 API 元素
屬性 | 定義自 | ||
---|---|---|---|
childrenField : String
Indicates the field name to be used to detect children objects in
a data item. | HierarchicalData | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
source : Object
The source collection. | HierarchicalData |
方法 | 定義自 | ||
---|---|---|---|
HierarchicalData(value:Object = null)
Constructor. | HierarchicalData | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
Returns true if the node can contain children. | HierarchicalData | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
Returns an Object representing the node's children. | HierarchicalData | ||
Returns data from a node. | HierarchicalData | ||
Returns the root data item. | HierarchicalData | ||
Returns true if the node has children. | HierarchicalData | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
childrenField | 屬性 |
childrenField:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Indicates the field name to be used to detect children objects in
a data item.
By default, all subnodes are considered as children for
XML data, and the children
property is used for the Object data type.
This is helpful in adapting to a data format that uses custom data fields
to represent children.
實作
public function get childrenField():String
public function set childrenField(value:String):void
source | 屬性 |
source:Object
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The source collection. The collection should implement the IList interface to facilitate operation like the addition and removal of items.
實作
public function get source():Object
public function set source(value:Object):void
相關 API 元素
HierarchicalData | () | 建構函式 |
canHaveChildren | () | 方法 |
public function canHaveChildren(node:Object):Boolean
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Returns true
if the node can contain children.
Nodes do not have to contain children for the method
to return true
.
This method is useful in determining whether other
nodes can be appended as children to the specified node.
參數
node:Object — The Object that defines the node.
|
Boolean — true if the node can contain children.
|
getChildren | () | 方法 |
public function getChildren(node:Object):Object
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Returns an Object representing the node's children.
參數
node:Object — The Object that defines the node.
If null , return a collection of top-level nodes.
|
Object — An Object containing the children nodes.
|
getData | () | 方法 |
getRoot | () | 方法 |
hasChildren | () | 方法 |
Tue Jun 12 2018, 03:47 PM Z