패키지 | mx.collections |
클래스 | public class HierarchicalCollectionView |
상속 | HierarchicalCollectionView EventDispatcher Object |
구현 | IHierarchicalCollectionView, IXMLNotifiable |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
<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" />
속성 | 정의 주체 | ||
---|---|---|---|
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
hasRoot : Boolean [읽기 전용]
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 [읽기 전용]
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 |
메서드 | 정의 주체 | ||
---|---|---|---|
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
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | 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 | ||
이벤트를 이벤트 흐름으로 전달합니다. | 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 | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
Opens a node to display its children. | HierarchicalCollectionView | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | 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 | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher |
hasRoot | 속성 |
hasRoot:Boolean
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get hasRoot():Boolean
length | 속성 |
openNodes | 속성 |
showRoot | 속성 |
showRoot:Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
기본값: true.
이 속성은 데이터 바인딩에 대한 소스로 사용할 수 있습니다. 이 속성을 수정하면 propertyChange
이벤트를 전달합니다.
구현
public function get showRoot():Boolean
public function set showRoot(value:Boolean):void
source | 속성 |
source:IHierarchicalData
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The source data of the IHierarchicalCollectionView.
구현
public function get source():IHierarchicalData
public function set source(value:IHierarchicalData):void
HierarchicalCollectionView | () | 생성자 |
public function HierarchicalCollectionView(hierarchicalData:IHierarchicalData = null, argOpenNodes:Object = null)
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constructor.
매개 변수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.
|
addChild | () | 메서드 |
public function addChild(parent:Object, newChild:Object):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Adds a child node to a node of the data.
매개 변수
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 | () | 메서드 |
public function addChildAt(parent:Object, newChild:Object, index:int):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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 thechild
at the specifiedindex
in the collection specified bysource
. - If the
parent
has achildren
field or property, the method adds thechild
to it at theindex
location. In this case, thesource
is not required. - If the
parent
does not have achildren
field or property, the method adds thechildren
to theparent
. The method then adds thechild
to the parent at theindex
location. In this case, thesource
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.
매개 변수
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 | () | 메서드 |
contains | () | 메서드 |
public function contains(item:Object):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Checks the collection for the data item using standard equality test.
매개 변수
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 | () | 메서드 |
public function createCursor():IViewCursor
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Returns a new instance of a view iterator over the items in this view.
반환값IViewCursor — IViewCursor instance.
|
관련 API 요소
getChildren | () | 메서드 |
public function getChildren(node:Object):ICollectionView
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Returns a collection of children, if they exist.
매개 변수
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 | () | 메서드 |
getParentItem | () | 메서드 |
public function getParentItem(node:Object):*
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Returns the parent of a node.
The parent of a top-level node is null
.
매개 변수
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 | () | 메서드 |
refresh | () | 메서드 |
public function refresh():Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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 | () | 메서드 |
public function removeChild(parent:Object, child:Object):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Removes the child node from the parent node.
매개 변수
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 | () | 메서드 |
public function removeChildAt(parent:Object, index:int):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Removes the child node from a node at the specified index.
매개 변수
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.
|
Tue Jun 12 2018, 03:17 PM Z