Packagejp.nium.core.display
Classpublic class ExDisplayObject
InheritanceExDisplayObject Inheritance Object
Implements IExDisplayObject
Subclasses ExDisplayObjectContainer

ExDisplayObject クラスは、IExDisplayObject インターフェイスを実装した DisplayObject クラスの基本機能を拡張するための委譲クラスです。 このクラスを実装すると拡張されたイベント機能を持つ EventIntegrator クラスが Mix-in されることになります。 ExDisplayObject class which implements IExDisplayObject interface is a delegate class to extend the basic function of DisplayObject class. If implement this class, the EventIntegrator class which has extended event function will be Mixed-in.

View the examples



Public Properties
 PropertyDefined By
  className : String
[read-only] インスタンスのクラス名を取得します。 Indicates the instance className of the IExDisplayObject.
ExDisplayObject
  group : String
インスタンスのグループ名を取得または設定します。 Indicates the instance group of the IExDisplayObject.
ExDisplayObject
  id : String
インスタンスの識別子を取得または設定します。 Indicates the instance id of the IExDisplayObject.
ExDisplayObject
Protected Properties
 PropertyDefined By
  target : IExDisplayObject
[read-only] IExDisplayObject インターフェイスを実装した操作対象インスタンスです。 It is an instance for the operation which implements the IExDisplayObject interface.
ExDisplayObject
Public Methods
 MethodDefined By
  
新しい ExDisplayObject インスタンスを作成します。 Creates a new ExDisplayObject object.
ExDisplayObject
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーを removeEventListener() メソッドで削除した場合には、restoreRemovedListeners() メソッドで再登録させることができます。 Register the event listener object into the EventIntegrator instance to get the event notification.
ExDisplayObject
  
addExclusivelyEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーは、IEventIntegrator インスタンスの管理外となるため、removeEventListener() メソッドで削除した場合にも、restoreRemovedListeners() メソッドで再登録させることができません。 Register the event listener object into the EventIntegrator instance to get the event notification.
ExDisplayObject
  
completelyRemoveEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができません。 Remove the listener from EventIntegrator instance.
ExDisplayObject
  
dispatchEvent(event:Event):Boolean
イベントをイベントフローに送出します。 Dispatches an event into the event flow.
ExDisplayObject
  
getInstanceById(id:String):DisplayObject
指定された id と同じ値が設定されている IExDisplayObject インターフェイスを実装したインスタンスを返します。 Returns the instance which implements the IExDisplayObject interface with same specified id value.
ExDisplayObject
  
getInstancesByGroup(group:String, sort:Boolean = false):Array
指定された group と同じ値を持つ IExDisplayObject インターフェイスを実装したインスタンスを含む配列を返します。 Returns the array contains the instance which implements the IExDisplayObject interface with same specified group value.
ExDisplayObject
  
getInstancesByRegExp(fieldName:String, pattern:RegExp, sort:Boolean = false):Array
指定された fieldName が条件と一致する IExDisplayObject インターフェイスを実装したインスタンスを含む配列を返します。 Returns the array contains the instance which implements the IExDisplayObject interface which the specified fieldName matches to the condition.
ExDisplayObject
  
hasEventListener(type:String):Boolean
EventIntegrator インスタンスに、特定のイベントタイプに対して登録されたリスナーがあるかどうかを確認します。 Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
ExDisplayObject
  
removeAllListeners(completely:Boolean = false):void
addEventListener() メソッド経由で登録された全てのイベントリスナー登録を削除します。 完全に登録を削除しなかった場合には、削除されたイベントリスナーを restoreRemovedListeners() メソッドで復帰させることができます。 Remove the whole event listener registered via addEventListener() method.
ExDisplayObject
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができます。 Remove the listener from EventIntegrator instance.
ExDisplayObject
  
removeEventListener() メソッド、または removeAllListeners() メソッド経由で削除された全てイベントリスナーを再登録します。 Re-register the whole event listener removed via removeEventListener() or removeAllListeners() method.
ExDisplayObject
  
setProperties(props:Object):DisplayObject
インスタンスに対して、複数のプロパティを一括設定します。 Setup the several instance properties.
ExDisplayObject
  
toBitmapData(transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF):BitmapData
指定されたオブジェクトの BitmapData 表現を返します。 Returns the BitmapData representation of the specified object.
ExDisplayObject
  
toString():String
指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
ExDisplayObject
  
willTrigger(type:String):Boolean
指定されたイベントタイプについて、この EventIntegrator インスタンスまたはその祖先にイベントリスナーが登録されているかどうかを確認します。 Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
ExDisplayObject
Property Detail
classNameproperty
className:String  [read-only]

インスタンスのクラス名を取得します。 Indicates the instance className of the IExDisplayObject.


Implementation
    public function get className():String
groupproperty 
group:String

インスタンスのグループ名を取得または設定します。 Indicates the instance group of the IExDisplayObject.


Implementation
    public function get group():String
    public function set group(value:String):void
idproperty 
id:String

インスタンスの識別子を取得または設定します。 Indicates the instance id of the IExDisplayObject.


Implementation
    public function get id():String
    public function set id(value:String):void
targetproperty 
target:IExDisplayObject  [read-only]

IExDisplayObject インターフェイスを実装した操作対象インスタンスです。 It is an instance for the operation which implements the IExDisplayObject interface.


Implementation
    protected function get target():IExDisplayObject
Constructor Detail
ExDisplayObject()Constructor
public function ExDisplayObject(target:IExDisplayObject)

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

Parameters
target:IExDisplayObject関連付けたい IExDisplayObject インターフェイスを実装したインスタンスです。 It is an instance that wants to be related which implements IExDisplayObject interface.
Method Detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーを removeEventListener() メソッドで削除した場合には、restoreRemovedListeners() メソッドで再登録させることができます。 Register the event listener object into the EventIntegrator instance to get the event notification. If the registered listener by this method removed by using removeEventListener() method, it can re-register using restoreRemovedListeners() method.

Parameters

type:Stringイベントのタイプです。 The type of event.
 
listener:Functionイベントを処理するリスナー関数です。この関数は Event インスタンスを唯一のパラメータとして受け取り、何も返さないものである必要があります。関数は任意の名前を持つことができます。 The listener function that processes the event. This function must accept an Event object as its only parameter and must return nothing. The function can have any name.
 
useCapture:Boolean (default = false)リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階で動作するかどうかを判断します。useCapture を true に設定すると、リスナーはキャプチャ段階のみでイベントを処理し、ターゲット段階またはバブリング段階では処理しません。useCapture を false に設定すると、リスナーはターゲット段階またはバブリング段階のみでイベントを処理します。3 つの段階すべてでイベントを受け取るには、addEventListener を 2 回呼び出します。useCapture を true に設定して 1 度呼び出し、useCapture を false に設定してもう一度呼び出します。 Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener twice, once with useCapture set to true, then again with useCapture set to false.
 
priority:int (default = 0)イベントリスナーの優先度レベルです。優先度は、符号付き 32 ビット整数で指定します。数値が大きくなるほど優先度が高くなります。優先度が n のすべてのリスナーは、優先度が n -1 のリスナーよりも前に処理されます。複数のリスナーに対して同じ優先度が設定されている場合、それらは追加された順番に処理されます。デフォルトの優先度は 0 です。 The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.
 
useWeakReference:Boolean (default = false)リスナーへの参照が強参照と弱参照のいずれであるかを判断します。デフォルトである強参照の場合は、リスナーのガベージコレクションが回避されます。弱参照では回避されません。 Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not.

addExclusivelyEventListener()method 
public function addExclusivelyEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーは、IEventIntegrator インスタンスの管理外となるため、removeEventListener() メソッドで削除した場合にも、restoreRemovedListeners() メソッドで再登録させることができません。 Register the event listener object into the EventIntegrator instance to get the event notification. The listener registered by this method can not re-registered by using restoreRemovedListeners() method in case it is removed by using removeEventListener() method, because it is not managed by IEventIntegrator instance

Parameters

type:Stringイベントのタイプです。 The type of event.
 
listener:Functionイベントを処理するリスナー関数です。この関数は Event インスタンスを唯一のパラメータとして受け取り、何も返さないものである必要があります。関数は任意の名前を持つことができます。 The listener function that processes the event. This function must accept an Event object as its only parameter and must return nothing. The function can have any name.
 
useCapture:Boolean (default = false)リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階で動作するかどうかを判断します。useCapture を true に設定すると、リスナーはキャプチャ段階のみでイベントを処理し、ターゲット段階またはバブリング段階では処理しません。useCapture を false に設定すると、リスナーはターゲット段階またはバブリング段階のみでイベントを処理します。3 つの段階すべてでイベントを受け取るには、addEventListener を 2 回呼び出します。useCapture を true に設定して 1 度呼び出し、useCapture を false に設定してもう一度呼び出します。 Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener twice, once with useCapture set to true, then again with useCapture set to false.
 
priority:int (default = 0)イベントリスナーの優先度レベルです。優先度は、符号付き 32 ビット整数で指定します。数値が大きくなるほど優先度が高くなります。優先度が n のすべてのリスナーは、優先度が n -1 のリスナーよりも前に処理されます。複数のリスナーに対して同じ優先度が設定されている場合、それらは追加された順番に処理されます。デフォルトの優先度は 0 です。 The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.
 
useWeakReference:Boolean (default = false)リスナーへの参照が強参照と弱参照のいずれであるかを判断します。デフォルトである強参照の場合は、リスナーのガベージコレクションが回避されます。弱参照では回避されません。 Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not.

completelyRemoveEventListener()method 
public function completelyRemoveEventListener(type:String, listener:Function, useCapture:Boolean = false):void

EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができません。 Remove the listener from EventIntegrator instance. The listener removed by using this method can not re-register by restoreRemovedListeners() method.

Parameters

type:Stringイベントのタイプです。 The type of event.
 
listener:Function削除するリスナーオブジェクトです。 The listener object to remove.
 
useCapture:Boolean (default = false)リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階に対して登録されたかどうかを示します。リスナーがキャプチャ段階だけでなくターゲット段階とバブリング段階にも登録されている場合は、removeEventListener() を 2 回呼び出して両方のリスナーを削除する必要があります。1 回は useCapture() を true に設定し、もう 1 回は useCapture() を false に設定する必要があります。 Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener() are required to remove both, one call with useCapture() set to true, and another call with useCapture() set to false.

dispatchEvent()method 
public function dispatchEvent(event:Event):Boolean

イベントをイベントフローに送出します。 Dispatches an event into the event flow.

Parameters

event:Eventイベントフローに送出されるイベントオブジェクトです。イベントが再度送出されると、イベントのクローンが自動的に作成されます。イベントが送出された後にそのイベントの target プロパティは変更できないため、再送出処理のためにはイベントの新しいコピーを作成する必要があります。 The Event object that is dispatched into the event flow. If the event is being redispatched, a clone of the event is created automatically. After an event is dispatched, its target property cannot be changed, so you must create a new copy of the event for redispatching to work.

Returns
Boolean値が true の場合、イベントは正常に送出されました。値が false の場合、イベントの送出に失敗したか、イベントで preventDefault() が呼び出されたことを示しています。 A value of true if the event was successfully dispatched. A value of false indicates failure or that preventDefault() was called on the event.
getInstanceById()method 
public function getInstanceById(id:String):DisplayObject

指定された id と同じ値が設定されている IExDisplayObject インターフェイスを実装したインスタンスを返します。 Returns the instance which implements the IExDisplayObject interface with same specified id value.

Parameters

id:String条件となるストリングです。

Returns
DisplayObject条件と一致するインスタンスです。
getInstancesByGroup()method 
public function getInstancesByGroup(group:String, sort:Boolean = false):Array

指定された group と同じ値を持つ IExDisplayObject インターフェイスを実装したインスタンスを含む配列を返します。 Returns the array contains the instance which implements the IExDisplayObject interface with same specified group value.

Parameters

group:String条件となるストリングです。
 
sort:Boolean (default = false)配列をソートするかどうかを指定します。

Returns
Array条件と一致するインスタンスです。
getInstancesByRegExp()method 
public function getInstancesByRegExp(fieldName:String, pattern:RegExp, sort:Boolean = false):Array

指定された fieldName が条件と一致する IExDisplayObject インターフェイスを実装したインスタンスを含む配列を返します。 Returns the array contains the instance which implements the IExDisplayObject interface which the specified fieldName matches to the condition.

Parameters

fieldName:String調査するフィールド名です。
 
pattern:RegExp条件となる正規表現です。
 
sort:Boolean (default = false)配列をソートするかどうかを指定します。

Returns
Array条件と一致するインスタンスです。
hasEventListener()method 
public function hasEventListener(type:String):Boolean

EventIntegrator インスタンスに、特定のイベントタイプに対して登録されたリスナーがあるかどうかを確認します。 Checks whether the EventDispatcher object has any listeners registered for a specific type of event.

Parameters

type:Stringイベントのタイプです。 The type of event.

Returns
Boolean指定したタイプのリスナーが登録されている場合は true に、それ以外の場合は false になります。 A value of true if a listener of the specified type is registered; false otherwise.
removeAllListeners()method 
public function removeAllListeners(completely:Boolean = false):void

addEventListener() メソッド経由で登録された全てのイベントリスナー登録を削除します。 完全に登録を削除しなかった場合には、削除されたイベントリスナーを restoreRemovedListeners() メソッドで復帰させることができます。 Remove the whole event listener registered via addEventListener() method. If do not remove completely, removed event listener can restore by restoreRemovedListeners() method.

Parameters

completely:Boolean (default = false)情報を完全に削除するかどうかです。 Whether if it removes the information completely.

removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができます。 Remove the listener from EventIntegrator instance. The listener removed by using this method can re-register by restoreRemovedListeners() method.

Parameters

type:Stringイベントのタイプです。 The type of event.
 
listener:Function削除するリスナーオブジェクトです。 The listener object to remove.
 
useCapture:Boolean (default = false)リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階に対して登録されたかどうかを示します。リスナーがキャプチャ段階だけでなくターゲット段階とバブリング段階にも登録されている場合は、removeEventListener() を 2 回呼び出して両方のリスナーを削除する必要があります。1 回は useCapture() を true に設定し、もう 1 回は useCapture() を false に設定する必要があります。 Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener() are required to remove both, one call with useCapture() set to true, and another call with useCapture() set to false.

restoreRemovedListeners()method 
public function restoreRemovedListeners():void

removeEventListener() メソッド、または removeAllListeners() メソッド経由で削除された全てイベントリスナーを再登録します。 Re-register the whole event listener removed via removeEventListener() or removeAllListeners() method.

setProperties()method 
public function setProperties(props:Object):DisplayObject

インスタンスに対して、複数のプロパティを一括設定します。 Setup the several instance properties.

Parameters

props:Object設定したいプロパティを含んだオブジェクトです。 The object that contains the property to setup.

Returns
DisplayObject設定対象の DisplayObject インスタンスです。 The DisplayObject instance to setup.
toBitmapData()method 
public function toBitmapData(transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF):BitmapData

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

Parameters

transparent:Boolean (default = true)ビットマップイメージがピクセル単位の透明度をサポートするかどうかを指定します。デフォルト値は true です (透明)。完全に透明なビットマップを作成するには、transparent パラメータの値を true に、fillColor パラメータの値を 0x00000000 (または 0) に設定します。transparent プロパティを false に設定すると、レンダリングのパフォーマンスが若干向上することがあります。 Specifies whether the bitmap image supports per-pixel transparency. The default value is true (transparent). To create a fully transparent bitmap, set the value of the transparent parameter to true and the value of the fillColor parameter to 0x00000000 (or to 0). Setting the transparent property to false can result in minor improvements in rendering performance.
 
fillColor:uint (default = 0xFFFFFFFF)ビットマップイメージ領域を塗りつぶすのに使用する 32 ビット ARGB カラー値です。デフォルト値は 0xFFFFFFFF (白) です。 A 32-bit ARGB color value that you use to fill the bitmap image area.

Returns
BitmapDataオブジェクトの BitmapData 表現です。 A BitmapData representation of the object.
toString()method 
public function toString():String

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

Returns
Stringオブジェクトのストリング表現です。 A string representation of the object.
willTrigger()method 
public function willTrigger(type:String):Boolean

指定されたイベントタイプについて、この EventIntegrator インスタンスまたはその祖先にイベントリスナーが登録されているかどうかを確認します。 Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.

Parameters

type:Stringイベントのタイプです。 The type of event.

Returns
Boolean指定したタイプのリスナーがトリガされた場合は true に、それ以外の場合は false になります。 A value of true if a listener of the specified type will be triggered; false otherwise.
Examples