ActionScript® 3.0 — dokumentacja dla platformy Adobe® Flash®
Strona główna  |  Ukryj listę pakietów i klas |  Pakiety  |  Klasy  |  Nowości  |  Indeks  |  Dodatki  |  Dlaczego język angielski?
Filtry: Pobieranie danych z serwera...
Pobieranie danych z serwera...
mx.collections 

HierarchicalCollectionView  - AS3 Flex

Pakietmx.collections
Klasapublic class HierarchicalCollectionView
DziedziczenieHierarchicalCollectionView Inheritance EventDispatcher Inheritance Object
Implementuje IHierarchicalCollectionView, IXMLNotifiable

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The HierarchicalCollectionView class provides a hierarchical view of a standard collection.

Składnia MXMLexpandedUkryj składnię MXML
The <mx.HierarchicalCollectionView> inherits all the tag attributes of its superclass, and defines the following tag attributes:

  <mx:HierarchicalCollectionView
  Properties 
    showRoot="true|false"
    source="No default"
  />
  


Właściwości publiczne
 WłaściwośćZdefiniowane przez
 Inheritedconstructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu.
Object
  hasRoot : Boolean
[tylko do odczytu] A flag that, if true, indicates that the current data provider has a root node; for example, a single top-level node in a hierarchical structure.
HierarchicalCollectionView
  length : int
[tylko do odczytu] The length of the currently parsed collection.
HierarchicalCollectionView
  openNodes : Object
An Array of Objects containing the data provider element for all the open branch nodes of the data.
HierarchicalCollectionView
  showRoot : Boolean
A Boolean flag that specifies whether to display the data provider's root node.
HierarchicalCollectionView
  source : IHierarchicalData
The source data of the IHierarchicalCollectionView.
HierarchicalCollectionView
Metody publiczne
 MetodaZdefiniowane przez
  
HierarchicalCollectionView(hierarchicalData:IHierarchicalData = null, argOpenNodes:Object = null)
Constructor.
HierarchicalCollectionView
  
addChild(parent:Object, newChild:Object):Boolean
Adds a child node to a node of the data.
HierarchicalCollectionView
  
addChildAt(parent:Object, newChild:Object, index:int):Boolean
Add a child node to a node at the specified index.
HierarchicalCollectionView
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Rejestruje obiekt detektora zdarzeń w obiekcie EventDispatcher, dzięki czemu detektor będzie otrzymywał powiadomienia o zdarzeniu.
EventDispatcher
  
Closes a node to hide its children.
HierarchicalCollectionView
  
Checks the collection for the data item using standard equality test.
HierarchicalCollectionView
  
Returns a new instance of a view iterator over the items in this view.
HierarchicalCollectionView
 Inherited
Wywołuje zdarzenie, tj. kieruje je do przepływu zdarzeń.
EventDispatcher
  
Returns a collection of children, if they exist.
HierarchicalCollectionView
  
Returns the depth of the node in the collection.
HierarchicalCollectionView
  
Returns the parent of a node.
HierarchicalCollectionView
 Inherited
Sprawdza, czy obiekt EventDispatcher zawiera jakiekolwiek detektory zarejestrowane dla konkretnego typu zdarzeń.
EventDispatcher
 Inherited
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość.
Object
 Inherited
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr.
Object
  
Opens a node to display its children.
HierarchicalCollectionView
 Inherited
Wskazuje, czy określona właściwość istnieje i jest przeliczalna.
Object
  
Applies the sort and filter to the view.
HierarchicalCollectionView
  
Removes the child node from the parent node.
HierarchicalCollectionView
  
Removes the child node from a node at the specified index.
HierarchicalCollectionView
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Usuwa detektor z obiektu EventDispatcher.
EventDispatcher
 Inherited
Ustawia dostępność właściwości dynamicznej używanej w pętlach.
Object
 Inherited
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych.
Object
 Inherited
Zwraca ciąg reprezentujący określony obiekt.
Object
 Inherited
Zwraca pierwotną wartość dla określonego obiektu.
Object
 Inherited
Sprawdza, czy detektor zdarzeń określonego typu jest zarejestrowany w tym obiekcie EventDispatcher lub jego elementach macierzystych.
EventDispatcher
Zdarzenia
 Zdarzenie Podsumowanie Zdefiniowane przez
 Inherited[zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja środowiska wykonawczego AIR uzyskuje fokus w systemie operacyjnym i przechodzi w stan aktywny.EventDispatcher
 Inherited[zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja AIR traci fokus w systemie operacyjnym i przechodzi w stan nieaktywny.EventDispatcher
Szczegół właściwości

hasRoot

właściwość
hasRoot:Boolean  [tylko do odczytu]

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

A flag that, if true, indicates that the current data provider has a root node; for example, a single top-level node in a hierarchical structure. XML and Object are examples of data types that have a root node, while Lists and Arrays do not.



Implementacja
    public function get hasRoot():Boolean

length

właściwość 
length:int  [tylko do odczytu]

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The length of the currently parsed collection.



Implementacja
    public function get length():int

openNodes

właściwość 
openNodes:Object

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

An Array of Objects containing the data provider element for all the open branch nodes of the data.



Implementacja
    public function get openNodes():Object
    public function set openNodes(value:Object):void

showRoot

właściwość 
showRoot:Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

A Boolean flag that specifies whether to display the data provider's root node. If the source data has a root node, and this property is set to false, the collection will not include the root item. Only the descendants of the root item will be included in the collection.

This property has no effect on a source with no root node, such as List and Array objects.

Wartością domyślną jest true.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie propertyChange .



Implementacja
    public function get showRoot():Boolean
    public function set showRoot(value:Boolean):void

source

właściwość 
source:IHierarchicalData

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The source data of the IHierarchicalCollectionView.



Implementacja
    public function get source():IHierarchicalData
    public function set source(value:IHierarchicalData):void
Konstruktor Szczegół

HierarchicalCollectionView

()Konstruktor
public function HierarchicalCollectionView(hierarchicalData:IHierarchicalData = null, argOpenNodes:Object = null)

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Constructor.

Parametry
hierarchicalData:IHierarchicalData (default = null) — The data structure containing the hierarchical data.
 
argOpenNodes:Object (default = null) — The Object that defines a node to appear as open.
Szczegół metody

addChild

()metoda
public function addChild(parent:Object, newChild:Object):Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Adds a child node to a node of the data.

Parametry

parent:Object — The Object that defines the parent node.
 
newChild:Object — The Object that defines the new node.

Zwraca
Booleantrue if the node is added successfully.

addChildAt

()metoda 
public function addChildAt(parent:Object, newChild:Object, index:int):Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Add a child node to a node at the specified index. This implementation does the following:

  • If the parent is null or undefined, inserts the child at the specified index in the collection specified by source.
  • If the parent has a children field or property, the method adds the child to it at the index location. In this case, the source is not required.
  • If the parent does not have a children field or property, the method adds the children to the parent. The method then adds the child to the parent at the index location. In this case, the source is not required.
  • If the index value is greater than the collection length or number of children in the parent, adds the object as the last child.

Parametry

parent:Object — The Object that defines the parent node.
 
newChild:Object — The Object that defines the child node.
 
index:int — The 0-based index of where to insert the child node.

Zwraca
Booleantrue if the child is added successfully.

closeNode

()metoda 
public function closeNode(node:Object):void

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Closes a node to hide its children.

Parametry

node:Object — The Object that defines the node.

contains

()metoda 
public function contains(item:Object):Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Checks the collection for the data item using standard equality test.

Parametry

item:Object — The Object that defines the node to look for.

Zwraca
Booleantrue if the data item is in the collection, and false if not.

createCursor

()metoda 
public function createCursor():IViewCursor

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Returns a new instance of a view iterator over the items in this view.

Zwraca
IViewCursor — IViewCursor instance.

Powiązane elementy interfejsu API

mx.utils.IViewCursor

getChildren

()metoda 
public function getChildren(node:Object):ICollectionView

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Returns a collection of children, if they exist.

Parametry

node:Object — The Object that defines the node. If null, return a collection of top level nodes.

Zwraca
ICollectionView — ICollectionView instance containing the child nodes.

getNodeDepth

()metoda 
public function getNodeDepth(node:Object):int

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Returns the depth of the node in the collection.

Parametry

node:Object — The Object that defines the node.

Zwraca
int — The depth of the node.

getParentItem

()metoda 
public function getParentItem(node:Object):*

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Returns the parent of a node. The parent of a top-level node is null.

Parametry

node:Object — The Object that defines the node.

Zwraca
* — The parent node containing the node, null for a top-level node, and undefined if the parent cannot be determined.

openNode

()metoda 
public function openNode(node:Object):void

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Opens a node to display its children.

Parametry

node:Object — The Object that defines the node.

refresh

()metoda 
public function refresh():Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Applies the sort and filter to the view. The ICollectionView does not detect changes to a sort or filter automatically, so you must call the refresh() method to update the view after setting the sort or filterFunction property. If your ICollectionView implementation also implements the IMXMLObject interface, you should to call the refresh() method from your initialized() method.

Returns true if the refresh was successful and false if the sort is not yet complete (e.g., items are still pending). A client of the view should wait for a CollectionEvent event with the CollectionEventKind.REFRESH kind property to ensure that the refresh() operation is complete.

Zwraca
Booleantrue if the refresh() was complete, false if the refresh() is incomplete.

removeChild

()metoda 
public function removeChild(parent:Object, child:Object):Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Removes the child node from the parent node.

Parametry

parent:Object — The Object that defines the parent node, and null for top-level nodes.
 
child:Object — The Object that defines the child node to be removed.

Zwraca
Booleantrue if the node is removed successfully.

removeChildAt

()metoda 
public function removeChildAt(parent:Object, index:int):Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Removes the child node from a node at the specified index.

Parametry

parent:Object — The Object that defines the parent node.
 
index:int — The 0-based index of the child node to remove relative to the parent.

Zwraca
Booleantrue if the child is removed successfully.




[ X ]Dlaczego język angielski?
Treść dokumentacji języka ActionScript 3.0 wyświetlana w języku angielskim

Niektóre części dokumentacji języka ActionScript 3.0 nie są przetłumaczone na poszczególne języki. Gdy element nie jest przetłumaczony na dany język, jest wyświetlany tekst angielski. Na przykład opis klasy ga.controls.HelpBox nie jest przetłumaczony na żaden dodatkowy język. Z tego powodu polska wersja dokumentacji zawiera opis klasy ga.controls.HelpBox w języku angielskim.