| Pacote | mx.collections |
| Classe | public class HierarchicalCollectionView |
| Herança | HierarchicalCollectionView EventDispatcher Object |
| Implementações | IHierarchicalCollectionView, IXMLNotifiable |
| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Ocultar sintaxe MXML<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"
/>
| Propriedade | Definido por | ||
|---|---|---|---|
![]() | constructor : Object
Uma referência ao objeto de classe ou à função de construtor de uma determinada ocorrência de objeto. | Object | |
| hasRoot : Boolean [somente leitura]
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 [somente leitura]
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 | ||
| Método | Definido por | ||
|---|---|---|---|
Constructor. | HierarchicalCollectionView | ||
Adds a child node to a node of the data. | HierarchicalCollectionView | ||
Add a child node to a node at the specified index. | HierarchicalCollectionView | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra um objeto de ouvinte de evento em um objeto EventDispatcher, de forma que o ouvinte receba a notificação de um evento. | 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 | ||
![]() |
Envia um evento para o fluxo de eventos. | 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 | ||
![]() |
Verifica se o objeto EventDispatcher tem ouvintes registrados para um tipo específico de evento. | EventDispatcher | |
![]() |
Indica se um objeto tem uma propriedade especificada definida. | Object | |
![]() |
Indica se uma ocorrência da classe Object está na cadeia de protótipos do objeto especificado como o parâmetro. | Object | |
Opens a node to display its children. | HierarchicalCollectionView | ||
![]() |
Indica se a propriedade especificada existe e é enumerável. | 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 | ||
![]() |
Remove um ouvinte do objeto EventDispatcher. | EventDispatcher | |
![]() |
Define a disponibilidade de uma propriedade dinâmica para operações de repetição. | Object | |
![]() |
Retorna a representação da string deste objeto, formatado segundo as convenções específicas para a localidade. | Object | |
![]() |
Retorna a representação de string do objeto especificado. | Object | |
![]() |
Retorna o valor primitivo do objeto especificado. | Object | |
![]() |
Verifica se um ouvinte de evento está registrado nesse objeto EventDispatcher ou em qualquer um de seus ancestrais para o tipo de evento especificado. | EventDispatcher | |
hasRoot | propriedade |
hasRoot:Boolean [somente leitura] | Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | 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.
Implementação
public function get hasRoot():Booleanlength | propriedade |
openNodes | propriedade |
openNodes:Object| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
An Array of Objects containing the data provider element for all the open branch nodes of the data.
Implementação
public function get openNodes():Object public function set openNodes(value:Object):voidshowRoot | propriedade |
showRoot:Boolean| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | 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.
O valor padrão é true.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange .
Implementação
public function get showRoot():Boolean public function set showRoot(value:Boolean):voidsource | propriedade |
source:IHierarchicalData| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
The source data of the IHierarchicalCollectionView.
Implementação
public function get source():IHierarchicalData public function set source(value:IHierarchicalData):voidHierarchicalCollectionView | () | Construtor |
public function HierarchicalCollectionView(hierarchicalData:IHierarchicalData = null, argOpenNodes:Object = null)| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Constructor.
ParâmetroshierarchicalData:IHierarchicalData (default = null) — The data structure containing the hierarchical data.
| |
argOpenNodes:Object (default = null) — The Object that defines a node to appear as open.
|
addChild | () | método |
public function addChild(parent:Object, newChild:Object):Boolean| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Adds a child node to a node of the data.
Parâmetros
parent:Object — The Object that defines the parent node.
| |
newChild:Object — The Object that defines the new node.
|
Boolean — true if the node is added successfully.
|
addChildAt | () | método |
public function addChildAt(parent:Object, newChild:Object, index:int):Boolean| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Add a child node to a node at the specified index. This implementation does the following:
- If the
parentis null or undefined, inserts thechildat the specifiedindexin the collection specified bysource. - If the
parenthas achildrenfield or property, the method adds thechildto it at theindexlocation. In this case, thesourceis not required. - If the
parentdoes not have achildrenfield or property, the method adds thechildrento theparent. The method then adds thechildto the parent at theindexlocation. In this case, thesourceis not required. - If the
indexvalue is greater than the collection length or number of children in the parent, adds the object as the last child.
Parâmetros
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.
|
Boolean — true if the child is added successfully.
|
closeNode | () | método |
contains | () | método |
public function contains(item:Object):Boolean| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Checks the collection for the data item using standard equality test.
Parâmetros
item:Object — The Object that defines the node to look for.
|
Boolean — true if the data item is in the collection,
and false if not.
|
createCursor | () | método |
public function createCursor():IViewCursor| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns a new instance of a view iterator over the items in this view.
RetornaIViewCursor — IViewCursor instance.
|
Elementos da API relacionados
getChildren | () | método |
public function getChildren(node:Object):ICollectionView| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns a collection of children, if they exist.
Parâmetros
node:Object — The Object that defines the node.
If null, return a collection of top level nodes.
|
ICollectionView — ICollectionView instance containing the child nodes.
|
getNodeDepth | () | método |
getParentItem | () | método |
public function getParentItem(node:Object):*| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns the parent of a node.
The parent of a top-level node is null.
Parâmetros
node:Object — The Object that defines the node.
|
* — The parent node containing the node,
null for a top-level node,
and undefined if the parent cannot be determined.
|
openNode | () | método |
refresh | () | método |
public function refresh():Boolean| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | 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.
Boolean — true if the refresh() was complete,
false if the refresh() is incomplete.
|
removeChild | () | método |
public function removeChild(parent:Object, child:Object):Boolean| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Removes the child node from the parent node.
Parâmetros
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.
|
Boolean — true if the node is removed successfully.
|
removeChildAt | () | método |
public function removeChildAt(parent:Object, index:int):Boolean| Versão da linguagem: | ActionScript 3.0 |
| Versão de produto: | Flex 3 |
| Versões de runtime: | Flash Player 9, AIR 1.1 |
Removes the child node from a node at the specified index.
Parâmetros
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.
|
Boolean — true if the child is removed successfully.
|
Wed Jun 13 2018, 11:10 AM Z
Mostrar sintaxe MXML