Packagejp.nium.events
Classpublic class ModelEvent
InheritanceModelEvent Inheritance flash.events.Event

ModelEvent クラスは、モデルオブジェクトの管理する値が状態が変更される直前や変更された直後に Model インスタンスによって送出されます。


Example
  // ModelEvent インスタンスを作成する
  var event:ModelEvent = new ModelEvent();
  



Public Properties
 PropertyDefined by
  dataName : String
[read-only] 変更される Model インスタンスのプロパティ名を取得します。
ModelEvent
  modelTarget : Model
[read-only] データ変更処理の対象となる Model インスタンスを取得します。
ModelEvent
  newData : *
[read-only] 変更後のデータを取得します。
ModelEvent
  oldData : *
[read-only] 変更前のデータを取得します。
ModelEvent
Public Methods
 MethodDefined by
  
ModelEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, modelTarget:Model = null, dataName:String = null, oldData:* = null, newData:* = null)
新しい ModelEvent インスタンスを作成します。 Creates a new ModelEvent object.
ModelEvent
  
clone():Event
ModelEvent インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an ModelEvent subclass.
ModelEvent
  
toString():String
指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
ModelEvent
Public Constants
 ConstantDefined by
  MODEL_ADDED : String = "modelAdded"
[static] modelAdded イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_ADDED constant defines the value of the type property of an modelAdded event object.
ModelEvent
  MODEL_REMOVED : String = "modelRemoved"
[static] modelRemoved イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_REMOVED constant defines the value of the type property of an modelRemoved event object.
ModelEvent
  MODEL_UPDATE_BEFORE : String = "modelUpdateBefore"
[static] modelUpdateBefore イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_UPDATE_BEFORE constant defines the value of the type property of an modelUpdateBefore event object.
ModelEvent
  MODEL_UPDATE_FAILURE : String = "modelUpdateFailure"
[static] modelUpdateFailure イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_UPDATE_FAILURE constant defines the value of the type property of an modelUpdateFailure event object.
ModelEvent
  MODEL_UPDATE_SUCCESS : String = "modelUpdateSuccess"
[static] modelUpdateSuccess イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_UPDATE_SUCCESS constant defines the value of the type property of an modelUpdateSuccess event object.
ModelEvent
Property detail
dataNameproperty
dataName:String  [read-only]

変更される Model インスタンスのプロパティ名を取得します。

Implementation
    public function get dataName():String
modelTargetproperty 
modelTarget:Model  [read-only]

データ変更処理の対象となる Model インスタンスを取得します。

Implementation
    public function get modelTarget():Model
newDataproperty 
newData:*  [read-only]

変更後のデータを取得します。

Implementation
    public function get newData():*
oldDataproperty 
oldData:*  [read-only]

変更前のデータを取得します。

Implementation
    public function get oldData():*
Constructor detail
ModelEvent()constructor
public function ModelEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, modelTarget:Model = null, dataName:String = null, oldData:* = null, newData:* = null)

新しい ModelEvent インスタンスを作成します。 Creates a new ModelEvent object.

Parameters
type:StringModelEvent.type としてアクセス可能なイベントタイプです。 The type of the event, accessible as ModelEvent.type.
 
bubbles:Boolean (default = false)ModelEvent インスタンスがイベントフローのバブリング段階で処理されるかどうかを判断します。デフォルト値は false です。 Determines whether the ModelEvent object participates in the bubbling stage of the event flow. The default value is false.
 
cancelable:Boolean (default = false)ModelEvent インスタンスがキャンセル可能かどうかを判断します。デフォルト値は false です。 Determines whether the ModelEvent object can be canceled. The default values is false.
 
modelTarget:Model (default = null)データ変更処理の対象となる Model インスタンスです。
 
dataName:String (default = null)変更される Model インスタンスのプロパティ名です。
 
oldData:* (default = null)変更前のデータです。
 
newData:* (default = null)変更後のデータです。
Method detail
clone()method
public override function clone():Event

ModelEvent インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an ModelEvent subclass.

Returns
Event元のオブジェクトと同じプロパティ値を含む新しい ModelEvent インスタンスです。 A new ModelEvent object that is identical to the original.
toString()method 
public override function toString():String

指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.

Returns
Stringオブジェクトのストリング表現です。 A string representation of the object.
Constant detail
MODEL_ADDEDconstant
public static const MODEL_ADDED:String = "modelAdded"

modelAdded イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_ADDED constant defines the value of the type property of an modelAdded event object.

See also

MODEL_REMOVEDconstant 
public static const MODEL_REMOVED:String = "modelRemoved"

modelRemoved イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_REMOVED constant defines the value of the type property of an modelRemoved event object.

See also

MODEL_UPDATE_BEFOREconstant 
public static const MODEL_UPDATE_BEFORE:String = "modelUpdateBefore"

modelUpdateBefore イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_UPDATE_BEFORE constant defines the value of the type property of an modelUpdateBefore event object.

See also

MODEL_UPDATE_FAILUREconstant 
public static const MODEL_UPDATE_FAILURE:String = "modelUpdateFailure"

modelUpdateFailure イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_UPDATE_FAILURE constant defines the value of the type property of an modelUpdateFailure event object.

See also

MODEL_UPDATE_SUCCESSconstant 
public static const MODEL_UPDATE_SUCCESS:String = "modelUpdateSuccess"

modelUpdateSuccess イベントオブジェクトの type プロパティ値を定義します。 The ModelEvent.MODEL_UPDATE_SUCCESS constant defines the value of the type property of an modelUpdateSuccess event object.

See also