Adobe® Flash® Platform용 ActionScript® 3.0 참조 설명서
 |  패키지 및 클래스 목록 숨기기 |  패키지  |  클래스  |  새로운 내용  |  색인  |  부록  |  영어로 표시되는 이유
필터: 서버에서 데이터를 검색하는 중...
서버에서 데이터를 검색하는 중...
mx.collections 

GroupingCollection  - AS3 Flex

패키지mx.collections
클래스public class GroupingCollection
상속GroupingCollection Inheritance HierarchicalData Inheritance EventDispatcher Inheritance Object
구현 IGroupingCollection
버전부터 사용되지 않음 4.0: 사용 GroupingCollection2

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

The GroupingCollection class lets you create grouped data from flat data for display in the AdvancedDataGrid control. When you create the instance of the GroupingCollection from your flat data, you specify the field or fields of the data used to create the hierarchy.

To populate the AdvancedDataGrid control with grouped data, you create an instance of the GroupingCollection class from your flat data, and then pass that GroupingCollection instance to the data provider of the AdvancedDataGrid control. To specify the grouping fields of your flat data, you pass a Grouping instance to the GroupingCollection.grouping property. The Grouping instance contains an Array of GroupingField instances, one per grouping field.

The following example uses the GroupingCollection class to define two grouping fields: Region and Territory.

  <mx:AdvancedDataGrid id="myADG"    
    <mx:dataProvider> 
      <mx:GroupingCollection id="gc" source="{dpFlat}"> 
        <mx:grouping> 
          <mx:Grouping> 
            <mx:GroupingField name="Region"/> 
            <mx:GroupingField name="Territory"/> 
          </mx:Grouping> 
        </mx:grouping> 
      </mx:GroupingCollection> 
    </mx:dataProvider>  
     
    <mx:columns> 
      <mx:AdvancedDataGridColumn dataField="Region"/> 
      <mx:AdvancedDataGridColumn dataField="Territory"/> 
      <mx:AdvancedDataGridColumn dataField="Territory_Rep"/> 
      <mx:AdvancedDataGridColumn dataField="Actual"/> 
      <mx:AdvancedDataGridColumn dataField="Estimate"/> 
    </mx:columns> 
  </mx:AdvancedDataGrid>
  

MXML 구문expandedMXML 구문 숨기기
The <mx.GroupingCollection> inherits all the tag attributes of its superclass, and defines the following tag attributes:

  <mx:GroupingCollection
  Properties 
    grouping="No default"
    source="No default"
    summaries="No default"
  />
  

This Class has been deprecated and replaced by a new Class GroupingCollection2 which provide faster, improved performance and a new summary calculation mechanism. Class SummaryField has also been deprecated and replaced by a new Class SummaryField2. Properties operation and summaryFunction are not present in the Class SummaryField2. A new property summaryOperation is introduced in SummaryField2.

기본 MXML 속성grouping

관련 API 요소



공용 속성
 속성정의 주체
 InheritedchildrenField : String
Indicates the field name to be used to detect children objects in a data item.
HierarchicalData
 Inheritedconstructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다.
Object
  grouping : Grouping
Specifies the Grouping instance applied to the source data.
GroupingCollection
  source : Object
[재정의] The source collection containing the flat data to be grouped.
GroupingCollection
  summaries : Array
Array of SummaryRow instances that define any root-level data summaries.
GroupingCollection
보호 속성
 속성정의 주체
  timer : flash.utils:Timer
The timer which is associated with an asynchronous refresh operation.
GroupingCollection
공용 메서드
 메서드정의 주체
  
Constructor.
GroupingCollection
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다.
EventDispatcher
  
If the refresh is performed asynchronously, cancels the refresh operation and stops the building of the groups.
GroupingCollection
 Inherited
Returns true if the node can contain children.
HierarchicalData
 Inherited
이벤트를 이벤트 흐름으로 전달합니다.
EventDispatcher
 Inherited
Returns an Object representing the node's children.
HierarchicalData
 Inherited
Returns data from a node.
HierarchicalData
  
[재정의] Return super.source, if the grouping property is set, and an ICollectionView instance that refers to super.source if not.
GroupingCollection
 Inherited
Returns true if the node has children.
HierarchicalData
 Inherited
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다.
EventDispatcher
 Inherited
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다.
Object
 Inherited
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다.
Object
 Inherited
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다.
Object
  
refresh(async:Boolean = false):Boolean
Applies the grouping to the view.
GroupingCollection
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventDispatcher 객체에서 리스너를 제거합니다.
EventDispatcher
 Inherited
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다.
Object
 Inherited
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다.
Object
 Inherited
지정된 객체의 문자열 표현을 반환합니다.
Object
 Inherited
지정된 객체의 프리미티브 값을 반환합니다.
Object
 Inherited
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다.
EventDispatcher
보호 메서드
 메서드정의 주체
  
Returns the parent of a node.
GroupingCollection
이벤트
 이벤트 요약 정의 주체
 Inherited[브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 얻어 활성화될 때 전달됩니다.EventDispatcher
 Inherited[브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 잃고 비활성화될 때 전달됩니다.EventDispatcher
속성 세부 정보

grouping

속성
grouping:Grouping

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Specifies the Grouping instance applied to the source data. Setting the grouping property does not automatically refresh the view, so you must call the refresh() method after setting this property.



구현
    public function get grouping():Grouping
    public function set grouping(value:Grouping):void

관련 API 요소

source

속성 
source:Object[재정의]

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

The source collection containing the flat data to be grouped. If the source is not a collection, it will be auto-wrapped into a collection.



구현
    override public function get source():Object
    override public function set source(value:Object):void

summaries

속성 
public var summaries:Array

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Array of SummaryRow instances that define any root-level data summaries. Specify one or more SummaryRow instances to define the data summaries, as the following example shows:

      <mx:AdvancedDataGrid id="myADG" 
         width="100%" height="100%" 
         initialize="gc.refresh();">        
         <mx:dataProvider>
             <mx:GroupingCollection id="gc" source="{dpFlat}">
                 <mx:summaries>
                     <mx:SummaryRow summaryPlacement="last">
                         <mx:fields>
                             <mx:SummaryField dataField="Actual" 
                                 label="Min Actual" operation="MIN"/>
                             <mx:SummaryField dataField="Actual" 
                                 label="Max Actual" operation="MAX"/>
                         </mx:fields>
                       </mx:SummaryRow>
                     </mx:summaries>
                 <mx:Grouping>
                     <mx:GroupingField name="Region"/>
                     <mx:GroupingField name="Territory"/>
                 </mx:Grouping>
             </mx:GroupingCollection>
         </mx:dataProvider>        
         
         <mx:columns>
             <mx:AdvancedDataGridColumn dataField="Region"/>
             <mx:AdvancedDataGridColumn dataField="Territory_Rep"
                 headerText="Territory Rep"/>
             <mx:AdvancedDataGridColumn dataField="Actual"/>
             <mx:AdvancedDataGridColumn dataField="Estimate"/>
             <mx:AdvancedDataGridColumn dataField="Min Actual"/>
             <mx:AdvancedDataGridColumn dataField="Max Actual"/>
         </mx:columns>
      </mx:AdvancedDataGrid>

관련 API 요소

timer

속성 
protected var timer:flash.utils:Timer

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

The timer which is associated with an asynchronous refresh operation. You can use it to change the timing interval, pause the refresh, or perform other actions. The default value for the delay property of the Timer instance is 1, corresponding to 1 millisecond.

생성자 세부 정보

GroupingCollection

()생성자
public function GroupingCollection()

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Constructor.

메서드 세부 정보

cancelRefresh

()메서드
public function cancelRefresh():void

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

If the refresh is performed asynchronously, cancels the refresh operation and stops the building of the groups. This method only cancels the refresh if it is initiated by a call to the refresh() method with an argument of true, corresponding to an asynchronous refresh.

getParent

()메서드 
protected function getParent(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 as child, null for a top-level node, and undefined if the parent cannot be determined.

getRoot

()메서드 
override public function getRoot():Object

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Return super.source, if the grouping property is set, and an ICollectionView instance that refers to super.source if not.

반환값
Object — The object to return.

refresh

()메서드 
public function refresh(async:Boolean = false):Boolean

언어 버전: ActionScript 3.0
제품 버전: Flex 3
런타임 버전: Flash Player 9, AIR 1.1

Applies the grouping to the view. The IGroupingCollection does not detect changes to a group automatically, so you must call the refresh() method to update the view after setting the group property.

The refresh() method can be applied asynchronously by calling refresh(true).

When refresh() is called synchronously, a client should wait for a CollectionEvent event with the value of the kind property set to CollectionEventKind.REFRESH to ensure that the refresh() method completed.

매개 변수

async:Boolean (default = false) — If true, defines the refresh to be asynchronous. By default it is false denoting synchronous refresh.

반환값
Booleantrue if the refresh() method completed, and false if the refresh is incomplete, which can mean that items are still pending.




[ X ]영어로 표시되는 이유
ActionScript 3.0 참조 설명서의 내용이 영어로 나타납니다.

ActionScript 3.0 참조 설명서 중 일부는 전체 언어로 번역되지 않았습니다. 언어 요소가 번역되지 않은 경우 영어로 나타납니다. 예를 들어 ga.controls.HelpBox 클래스는 어떤 언어로도 번역되지 않았습니다. 그러므로 한국어 버전의 참조 설명서에서 ga.controls.HelpBox 클래스는 영어로 나타납니다.