Packagejp.co.fujitsu.reffi.client.flex.controller
Classpublic class EventBinder
InheritanceEventBinder Inheritance Object



Public Properties
 PropertyDefined By
  bindInfo : Dictionary
[概 要] イベント定義情報を保持するオブジェクトです.
EventBinder
  controller : BaseController
[概 要] このEventBinderを保持しているコントローラオブジェクトです.
EventBinder
Public Methods
 MethodDefined By
  
[概 要] コンストラクタです.
EventBinder
  
addEventBinding(componentName:String, type:String, actionClass:Class, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[概 要] イベント紐付け情報追加メソッドです.
EventBinder
  
addEventBindingImmediately(componentName:String, type:String, action:Class, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[概 要] イベント紐付け情報追加メソッドです.
EventBinder
  
addEventBindings(componentNames:Array, type:String, actionClass:Class, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[概 要] イベント紐付け情報追加メソッドです.
EventBinder
  
getActionClasses(componentName:String, eventType:String):Array
[概 要] componentNameをname属性値として持つエレメントの、eventTypeイベント発動時の アクションクラス型配列を取得します.
EventBinder
  
getEventTypes(componentName:String):Array
[概 要] 引数指定された名前を持つエレメントに登録されているイベントタイプ群を返却します.
EventBinder
  
hasEventBinding(componentName:String):Boolean
[概 要] 引数componentNameに対するイベント紐付け情報があるかどうか調べます.
EventBinder
  
removeEventBinding(componentName:String, type:String):void
[概 要] イベント紐付け情報削除メソッドです.
EventBinder
Property Detail
bindInfoproperty
bindInfo:Dictionary

[概 要]

イベント定義情報を保持するオブジェクトです.

[詳 細]

コンポーネントの名前、イベントタイプ、アクションクラスをマッピングします。

[備 考]


Implementation
    public function get bindInfo():Dictionary
    public function set bindInfo(value:Dictionary):void
controllerproperty 
controller:BaseController

[概 要]

このEventBinderを保持しているコントローラオブジェクトです.

[詳 細]

イベントハンドリングを委譲されたコントローラは、このEventBinder オブジェクトを参照して、イベントを起こしたコンポーネントの名前と イベントタイプを元に、実行するべきアクションクラスを取得します。

[備 考]


Implementation
    public function get controller():BaseController
    public function set controller(value:BaseController):void
Constructor Detail
EventBinder()Constructor
public function EventBinder(controller:BaseController)

[概 要]

コンストラクタです.

[詳 細]

bindInfo領域の生成、引数controllerのプロパティへの設定を行います。

[備 考]

Parameters
controller:BaseController
Method Detail
addEventBinding()method
public function addEventBinding(componentName:String, type:String, actionClass:Class, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

[概 要]

イベント紐付け情報追加メソッドです.

[詳 細]

引数componentNameが既に登録されている場合、componentName用のMapを取り出し、 イベントタイプをキーにしてアクションを登録します。 componentNameが未登録の場合、componentName用のMapを新規に生成して、 イベントタイプをキーにしてアクションを登録します。 登録された情報はイベント紐付け情報保持オブジェクト(bindInfoプロパティ)に保持され、 コントローラのエレメント挿抜リスナによって参照されます。

[備 考]

Parameters

componentName:String — コンポーネント(エレメント)のname属性値
 
type:String — イベントタイプ
 
actionClass:Class — 起動するアクションのクラス型
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)

addEventBindingImmediately()method 
public function addEventBindingImmediately(componentName:String, type:String, action:Class, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

[概 要]

イベント紐付け情報追加メソッドです.

[詳 細]

addEventBinding(String, String, Class)メソッドを 呼び出して、イベント紐付け情報保持オブジェクト(bindInfo)に追加します。 追加後、ui Documentを取得して、追加された紐付け情報を即座に反映します。

[備 考]

addEventBindingと違い、登録された情報が画面オブジェクトに 反映されるのはこのメソッド呼び出し直後です。

Parameters

componentName:String — コンポーネント(エレメント)のname属性値
 
type:String — イベントタイプ
 
action:Class — 起動するアクションのクラス型
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)

See also

addEventBindings()method 
public function addEventBindings(componentNames:Array, type:String, actionClass:Class, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

[概 要]

イベント紐付け情報追加メソッドです.

[詳 細]

componentNames配列内のコンポーネント名全てに引数typeイベントタイプで 引数actionClassを紐付けます。

[備 考]

Parameters

componentNames:Array — コンポーネント(エレメント)のname属性値配列
 
type:String — イベントタイプ
 
actionClass:Class — 起動するアクションのクラス型
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)

getActionClasses()method 
public function getActionClasses(componentName:String, eventType:String):Array

[概 要]

componentNameをname属性値として持つエレメントの、eventTypeイベント発動時の アクションクラス型配列を取得します.

[詳 細]

bindInfoフィールドから、引数componentNameで紐付け情報を取り出し、 取り出した[イベントタイプ = アクションクラス]のマップから、eventTypeイベント のアクションクラス群を取得、返却します。

[備 考]

Parameters

componentName:String — コンポーネントのname属性値
 
eventType:String — イベントタイプ

Returns
Array — componentName、eventTypeに対応するアクションクラス型
getEventTypes()method 
public function getEventTypes(componentName:String):Array

[概 要]

引数指定された名前を持つエレメントに登録されているイベントタイプ群を返却します.

[詳 細]

bindInfoフィールドから、引数componentNameで紐付け情報を取り出し、 登録されている全イベントタイプをString配列に変換して返却します。

[備 考]

Parameters

componentName:String — コンポーネントのname属性値

Returns
Array — componentNameに登録されている全イベントタイプが入った配列
hasEventBinding()method 
public function hasEventBinding(componentName:String):Boolean

[概 要]

引数componentNameに対するイベント紐付け情報があるかどうか調べます.

[詳 細]

binInfoプロパティにcomponentNameプロパティが存在するか調べて返却します。

[備 考]

Parameters

componentName:String — イベント紐付け情報が登録されているか調べるコンポーネント名

Returns
Boolean
removeEventBinding()method 
public function removeEventBinding(componentName:String, type:String):void

[概 要]

イベント紐付け情報削除メソッドです.

[詳 細]

保持されているコンポーネン紐付け情報から、引数componentNameの 引数typeイベントに対する紐付けを削除します。

[備 考]

Parameters

componentName:String — コンポーネントのname属性値
 
type:String — アクション紐付け情報を削除するイベントタイプ