パッケージmx.core
インターフェイスpublic interface IPropertyChangeNotifier extends IEventDispatcher, IUID
SubinterfacesIManaged
インプリメンタObjectProxy, UIComponent

IPropertyChangeNotifier インターフェイスは、マーカーインターフェイスを定義します。このインターフェイスをサポートするクラスは、特殊な方法でのイベントの伝播のサポートを宣言します。このインターフェイスを実装するクラスは、このクラスのプロパティごと、およびプロパティとして公開されているネストされたクラスのプロパティごとにイベントを送出する必要があります。匿名の (複雑で、厳密に型指定されていない) プロパティの場合は、実装するクラスがカスタムサポートを提供するか、ObjectProxy クラスを直接使用します。このインターフェイスの実装者は、PropertyChangeEvent.createUpdateEvent() メソッドを使用して、送出に対する適切な更新イベントを作成する必要があります。



   
 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);
     }
  }
 
      
  



パブリックプロパティ
 プロパティ定義
 Inheriteduid : String
このオブジェクトの一意の ID です。
IUID
パブリックメソッド
 メソッド定義
 InheritedaddEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
イベントリスナーオブジェクトを EventDispatcher オブジェクトに登録し、リスナーがイベントの通知を受け取るようにします。
IEventDispatcher
 InheriteddispatchEvent(event:Event):Boolean
イベントをイベントフローに送出します。
IEventDispatcher
 InheritedhasEventListener(type:String):Boolean
EventDispatcher オブジェクトに、特定のイベントタイプに対して登録されたリスナーがあるかどうかを確認します。
IEventDispatcher
 InheritedremoveEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventDispatcher オブジェクトからリスナーを削除します。
IEventDispatcher
 InheritedwillTrigger(type:String):Boolean
指定されたイベントタイプについて、この EventDispatcher オブジェクトまたはその祖先にイベントリスナーが登録されているかどうかを確認します。
IEventDispatcher