This page was saved using jaction on 2006-09-04 8:33:48.
Address: http://flexdocs.kr/docs/flex2/langref/mx/core/IPropertyChangeNotifier.html
Title: mx.core.IPropertyChangeNotifier (Flex™ 2 레퍼런스 가이드)  •  Size: 17613
Packagemx.core
인터페이스public interface IPropertyChangeNotifier extends IEventDispatcher , IUID
SubinterfacesIManaged
인프리멘타ObjectProxy , UIComponent

IPropertyChangeNotifier 인터페이스는, 마커 인터페이스를 정의합니다. 이 인터페이스를 지원(support)하는 클래스는, 특수한 방법에서의 이벤트의 전파의 지원(support)를 선언합니다. 이 인터페이스를 Implements하는 클래스는, 이 클래스의 property마다, 및 property로서 공개되고 있는 네스트 된 클래스의 property 마다 이벤트를 dispatch할 필요가 있습니다. 익명의 (복잡해, 엄밀하게 형태 지정되어 있지 않다) property의 경우는, Implements하는 클래스가 custom 지원(support)를 제공하는지, ObjectProxy 클래스를 직접 사용합니다. 이 인터페이스의 Implements자는,PropertyChangeEvent.createUpdateEvent() Methods를 사용해, dispatch에 대한 적절한 갱신 이벤트를 작성할 필요가 있습니다.


Example
   
 function set myProperty(value:Object) :void
 {
    var oldValue:IPropertyChangeNotifier = _myProperty;
    var newValue:IPropertyChangeNotifier = value;
    
    // Need to ensure to dispatch changes on the new property.
    // Listeners use the source property to determine which object 
    // actually originated the event.
    // In their event handler code, they can tell if an event has been 
    // propagated from deep within the object graph by comparing 
    // event.target and event.source.  If they are equal, then the property
    // change is at the surface of the object.  If they are not equal, the
    // property change is somewhere deeper in the object graph.
    newValue.addEventListener(
                PropertyChangeEvent.PROPERTY_CHANGE, 
                dispatchEvent);
 
    // need to stop listening for events from the old property
    oldValue.removeEventListener(
                PropertyChangeEvent.PROPERTY_CHANGE,
                dispatchEvent);
 
    _myProperty = newValue;
 
    // now notify anyone that is listening
    if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE))
    {
         var event:PropertyChangeEvent = 
                         PropertyChangeEvent.createUpdateEvent(
                                                       this,
                                                       "myProperty",
                                                       newValue,
                                                       oldValue);
        dispatchEvent(event);
     }
  }
 
      
  



Public property
 property정의
 Inheriteduid : String
이 object의 일의의 ID 입니다.
IUID
Public Methods
 Methods정의
 InheritedaddEventListener (type:String , listener:Function , useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
event listener objects를 EventDispatcher object에 등록해, listener가 이벤트의 통지를 받도록(듯이) 합니다.
IEventDispatcher
 InheriteddispatchEvent (event:Event ):Boolean
이벤트를 event 플로우(flow)에 dispatch합니다.
IEventDispatcher
 InheritedhasEventListener (type:String ):Boolean
EventDispatcher object에, 특정의 event 타입에 대해서 등록된 listener가 있을지 어떨지를 확인합니다.
IEventDispatcher
 InheritedremoveEventListener (type:String , listener:Function , useCapture:Boolean = false):void
EventDispatcher object로부터 listener를 삭제합니다.
IEventDispatcher
 InheritedwillTrigger (type:String ):Boolean
지정된 event 타입에 대해, 이 EventDispatcher object 또는 그 조상에게 event listener가 등록되어 있는지 어떤지를 확인합니다.
IEventDispatcher






 

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

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