This page was saved using jaction on 2006-09-04 8:34:00.
Address: http://flexdocs.kr/docs/flex2/langref/mx/controls/RadioButtonGroup.html
Title: mx.controls.RadioButtonGroup (Flex™ 2 레퍼런스 가이드)  •  Size: 44032
Packagemx.controls
Classpublic class RadioButtonGroup
InheritanceRadioButtonGroup Inheritance EventDispatcher Inheritance Object
ImplementsIMXMLObject

RadioButtonGroup 컨트롤은, 1 개의 상호 배타적 컨트롤로서 기능하는 RadioButton 컨트롤의 그룹을 정의합니다. RadioButton 컨트롤은 한 번에 1 개 밖에 선택할 수 없습니다. <mx:RadioButtonGroup> 태그를 사용해 그룹의 이름을 정의하려면 ,id property가 필요합니다.

MXML 문장구조법expandedMXML 문장구조법의 비표시

<mx:RadioButtonGroup> 태그는 그 Super 클래스의 모든 태그 속성을 Inheritance해, 다음의 태그 속성을 추가합니다.

 <mx:RadioButtonGroup property enabled="true|false" id="디폴트치 없음" labelPlacement="right|left|top|bottom"
  
event change="디폴트치 없음" itemClick="디폴트치 없음" /> 

View the examples

See also

mx.controls.RadioButton
RadioButton 컨트롤


Public property
 property정의
 Inheritedconstructor : Object
특정의 object 인스턴스의 클래스 object 또는 constructor    함수에의 참조입니다.
Object
  enabled : Boolean
선택이 가능한가 어떤가를 판별합니다.
RadioButtonGroup
  labelPlacement : String
그룹내의 각 컨트롤의 RadioButton 아이콘을 기준으로 한 RadioButton label의 위치입니다.
RadioButtonGroup
  numRadioButtons : int
[read-only] 이 RadioButtonGroup 에 속하는 RadioButton 의 수입니다.
RadioButtonGroup
 Inheritedprototype : Object
[static] 클래스 또는 함수 object의 prototype object에의 참조입니다.
Object
  selectedValue : Object
null (디폴트치) 이외의 값이 설정되어 있는 경우, 그룹으로부터 선택된 RadioButton 컨트롤의 value property의 값입니다.
RadioButtonGroup
  selection : RadioButton
그룹내에서 현재 선택되고 있는 RadioButton 컨트롤에의 참조를 포함합니다.
RadioButtonGroup
Public Methods
 Methods정의
  RadioButtonGroup (document:IFlexDisplayObject = null)
constructor   .
RadioButtonGroup
 InheritedaddEventListener (type:String , listener:Function , useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
event listener objects를 EventDispatcher object에 등록해, listener가 이벤트의 통지를 받도록(듯이) 합니다.
EventDispatcher
 InheriteddispatchEvent (event:Event ):Boolean
이벤트를 event 플로우(flow)에 dispatch합니다.
EventDispatcher
  getRadioButtonAt (index:int ):RadioButton
지정된 인덱스 위치에 있는 RadioButton 컨트롤을 돌려줍니다.
RadioButtonGroup
 InheritedhasEventListener (type:String ):Boolean
EventDispatcher object에, 특정의 event 타입에 대해서 등록된 listener가 있을지 어떨지를 확인합니다.
EventDispatcher
 InheritedhasOwnProperty (name:String ):Boolean
object로 지정된 property가 정의되고 있는지 어떤지를 나타냅니다.
Object
  initialized (document:Object , id:String ):void
지연 인스턴스화를 지원(support)하는 IMXMLObject.initialized() Methods의 Implements입니다.
RadioButtonGroup
 InheritedisPrototypeOf (theClass:Object ):Boolean
Object 클래스의 인스턴스가, Parameters로서 지정된 object의 prototype 체인내에 있을지 어떨지를 나타냅니다.
Object
 InheritedpropertyIsEnumerable (name:String ):Boolean
지정된 property가 존재해, 열거 가능한가 어떤가를 나타냅니다.
Object
 InheritedremoveEventListener (type:String , listener:Function , useCapture:Boolean = false):void
EventDispatcher object로부터 listener를 삭제합니다.
EventDispatcher
 InheritedsetPropertyIsEnumerable (name:String , isEnum:Boolean = true):void
루프 처리에 대한 다이나믹 property의 가용성을 설정합니다.
Object
 InheritedtoString ():String
지정된 object의 string 표현을 돌려줍니다.
Object
 InheritedvalueOf ():Object
지정된 object의 원시적치를 돌려줍니다.
Object
 InheritedwillTrigger (type:String ):Boolean
지정된 event 타입에 대해, 이 EventDispatcher object 또는 그 조상에게 event listener가 등록되어 있는지 어떤지를 확인합니다.
EventDispatcher
이벤트
 이벤트일람정의
  change 이 그룹내에서 선택된 RadioButton 컨트롤의 값이 변화했을 때에 dispatch됩니다. RadioButtonGroup
  itemClick 유저가 그룹내의 RadioButton 컨트롤을 선택했을 때에 dispatch됩니다. RadioButtonGroup
property의 상세
enabledproperty
enabled:Boolean   [read-write]

선택이 가능한가 어떤가를 판별합니다.

디폴트치true.

이 property는 데이터 바인딩의 소스로서 사용할 수 있습니다.

Implements
    public function get enabled():Boolean
    public function set enabled(value:Boolean ):void
labelPlacementproperty 
labelPlacement:String   [read-write]

그룹내의 각 컨트롤의 RadioButton 아이콘을 기준으로 한 RadioButton label의 위치입니다. 이 설정은 컨트롤 마다 재정의(override) 할 수 있습니다.

MXML 에서의 유효한 값은,"right","left","bottom", 및 "top" 입니다.

ActionScript 에서는, 다음의 정수를 사용해 이 property를 설정합니다. 이 property란,ButtonLabelPlacement.RIGHT,ButtonLabelPlacement.LEFT,ButtonLabelPlacement.BOTTOM, 및 ButtonLabelPlacement.TOP 입니다.

디폴트치"right".

이 property는 데이터 바인딩의 소스로서 사용할 수 있습니다.

Implements
    public function get labelPlacement():String
    public function set labelPlacement(value:String ):void
numRadioButtonsproperty 
numRadioButtons:int   [read-only]

이 RadioButtonGroup 에 속하는 RadioButton 의 수입니다.

디폴트치"undefined".

Implements
    public function get numRadioButtons():int
selectedValueproperty 
selectedValue:Object   [read-write]

null (디폴트치) 이외의 값이 설정되어 있는 경우, 그룹으로부터 선택된 RadioButton 컨트롤의 value property의 값입니다. 그 이외의 경우는, 선택된 RadioButton 의 label property의 값은 selectedValue 입니다. RadioButton 가 선택되어 있지 않은 경우, 이 property는 null 입니다.

selectedValue 를 설정하면,value property 또는 label property가 이 값에 일치하는 RadioButton 컨트롤이 선택됩니다.

디폴트치null.

이 property는 데이터 바인딩의 소스로서 사용할 수 있습니다.

Implements
    public function get selectedValue():Object
    public function set selectedValue(value:Object ):void
selectionproperty 
selection:RadioButton   [read-write]

그룹내에서 현재 선택되고 있는 RadioButton 컨트롤에의 참조를 포함합니다. 이 property에는 ActionScript 로부터로만 액세스 할 수 있습니다. MXML 로 설정할 수 없습니다.

디폴트치null.

이 property는 데이터 바인딩의 소스로서 사용할 수 있습니다.

Implements
    public function get selection():RadioButton
    public function set selection(value:RadioButton ):void
constructor    의 상세
RadioButtonGroup()constructor   
public 함수 RadioButtonGroup(document:IFlexDisplayObject = null)

constructor   .

Parameters
document:IFlexDisplayObject (default = null) — 클래스가 단순하게 EventDispatcher 를 Inheritance하는 경우는,document Parameters를 사용하지 말아 주세요.

See also

Methods의 상세
getRadioButtonAt()Methods
public function getRadioButtonAt(index:int ):RadioButton

지정된 인덱스 위치에 있는 RadioButton 컨트롤을 돌려줍니다.

Parameters
index:int — RadioButtonGroup 컨트롤내의 RadioButton 의 인덱스입니다. 최초의 컨트롤의 인덱스는 0 입니다.

반환값
RadioButton — 지정된 RadioButton 컨트롤입니다.
initialized()Methods 
public function initialized(document:Object , id:String ):void

지연 인스턴스화를 지원(support)하는 IMXMLObject.initialized() Methods의 Implements입니다.

Parameters
document:Object — 이 object를 작성한 MXML 문서
 
id:String — 문서가 이 object를 참조하기 위해서 사용하는 식별자입니다. object가 문서의 deep property인 경우,id 는 null 가 됩니다.

See also

이벤트의 상세
changeevent 
Event object type: flash.events.Event
Event.type property = flash.events.Event.CHANGE

이 그룹내에서 선택된 RadioButton 컨트롤의 값이 변화했을 때에 dispatch됩니다.

change event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblestrue
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target치가 변경된 object입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.
itemClickevent  
Event object type: mx.events.ItemClickEvent
ItemClickEvent.type property = mx.events.ItemClickEvent.ITEM_CLICK

유저가 그룹내의 RadioButton 컨트롤을 선택했을 때에 dispatch됩니다. 각 RadioButton 컨트롤에 대해 핸들러를 설정할 수도 있습니다.

ItemClickEvent.ITEM_CLICK 정수에 의해,itemClick 이벤트의 event object의 type property치가 정의됩니다.

event object의 각 property에는 다음의 값이 설정됩니다.

PropertyValue
bubblesfalse
cancelablefalse
currentTarget이벤트를 처리하는 event listener를 정의하는 object. 예를 들어, event listener의 등록에 myButton.addEventListener() 를 사용하면,currentTarget 의 값은 "myButton" 가 됩니다.
index클릭된 네비게이션 아이템의 인덱스입니다.
item클릭된 네비게이션 아이템의 데이터 프로바이더내의 아이템입니다.
label클릭된 네비게이션 아이템의 label입니다.
relatedObject이벤트를 생성한 child object입니다.
target이벤트를 dispatch한 object를 나타냅니다. 이 object는 반드시 이벤트를 받는 object라고는 할 수 없습니다. 이벤트를 받는 object에 항상 액세스 하려면 ,currentTarget property를 사용해 주세요.
Examples
RadioButtonGroupExample
<? xml version="1.0"? >
<! -- Simple example to demonstrate RadioButtonGroup control.  -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Script>
        <! [CDATA[
    
        import mx.controls.Alert;
        import  mx.events.ItemClickEvent;
    
        // Event handler function to display the selected button
        // in an Alert control.
        private function handleCard(event:ItemClickEvent) :void {
            if (event.currentTarget.selectedValue == "AmEx") {
                    Alert.show("You selected American Express") 
            } 
            else {
                if (event.currentTarget.selectedValue == "MC") {
                    Alert.show("You selected MasterCard") 
                } 
                else {
                    Alert.show("You selected Visa") 
                }
            } 
        }
        ]]>
    </mx:Script>

    <mx:Panel title="RadioButtonGroup Control Example" height="75%" width="75%" 
        paddingTop="10" paddingLeft="10">
    
        <mx:Label width="100%" color="blue" 
            text="Select a type of credit card. "/>

        <mx:RadioButtonGroup id="cardtype" itemClick="handleCard(event);"/>
        <mx:RadioButton groupName="cardtype" id="americanExpress" value="AmEx" 
            label="American Express" width="150" />
        <mx:RadioButton groupName="cardtype" id="masterCard" value="MC" 
            label="MasterCard" width="150" />
        <mx:RadioButton groupName="cardtype" id="visa" value="Visa" 
            label="Visa" width="150" />
        
    </mx:Panel>        
</mx:Application>






 

코멘트가 추가되었을 경우, 메일로 받기. | 코멘트 리포트

현재의 페이지: http://flexdocs.kr/docs/flex2/langref/mx/controls/RadioButtonGroup.html