Packagejp.progression.casts
Classpublic class CastTextField
InheritanceCastTextField Inheritance ExTextField Inheritance flash.text.TextField
Implements ICastObject

CastTextField クラスは、ExTextField クラスの基本機能を拡張し、イベントフローとの連携機能を実装した jp.progression パッケージで使用される基本的な表示オブジェクトクラスです。

View the examples



Public Properties
 PropertyDefined By
 InheritedclassName : String
[read-only] インスタンスのクラス名を取得します。 Indicates the instance className of the IExDisplayObject.
ExTextField
  eventHandlerEnabled : Boolean
オブジェクトのイベントハンドラメソッドを有効化するかどうかを指定します。
CastTextField
  executor : CommandExecutor
[read-only] コマンドを実行する CommandExecutor インスタンスを取得します。
CastTextField
 Inheritedgroup : String
インスタンスのグループ名を取得または設定します。 Indicates the instance group of the IExDisplayObject.
ExTextField
 Inheritedid : String
インスタンスの識別子を取得または設定します。 Indicates the instance id of the IExDisplayObject.
ExTextField
  onCastAdded : Function
キャストオブジェクトが CastEvent.CAST_ADDED イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。 このイベント処理の実行中には、addCommand() メソッド、及び insertCommand() メソッドによるコマンドの同期処理が行えます。
CastTextField
  onCastRemoved : Function
キャストオブジェクトが CastEvent.CAST_REMOVED イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。 このイベント処理の実行中には、addCommand() メソッド、及び insertCommand() メソッドによるコマンドの同期処理が行えます。
CastTextField
  parallelMode : Boolean
CommandExecutor の実行方法を並列処理にするかどうかを取得または設定します。
CastTextField
  toolTip : ToolTip
[read-only] このオブジェクトに関連付けられている ToolTip インスタンスを取得します。
CastTextField
Public Methods
 MethodDefined By
  
CastTextField(initObject:Object = null)
新しい CastTextField インスタンスを作成します。 Creates a new CastTextField object.
CastTextField
  
addCommand(... commands):void
特定のイベントが送出された際に、自動実行させたい Command インスタンスをリストの最後尾に追加します。 追加された Command インスタンスは、イベントが送出される直前に自動的に削除されます。
CastTextField
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[override] イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーを removeEventListener() メソッドで削除した場合には、restoreRemovedListeners() メソッドで再登録させることができます。 Register the event listener object into the EventIntegrator instance to get the event notification.
ExTextField
 Inherited
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.
ExTextField
 Inherited
appendTextAtCaretIndex(newText:String):void
newText パラメータで指定されたストリングを、テキストフィールドのキャレット位置に付加します。 Add the string specified as newText parameter to the caret position of the TextField.
ExTextField
  
clearCommand(completely:Boolean = false):void
登録されている Command インスタンスを削除します。
CastTextField
 Inherited
completelyRemoveEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができません。 Remove the listener from EventIntegrator instance.
ExTextField
 Inherited
dispatchEvent(event:Event):Boolean
[override] イベントをイベントフローに送出します。 Dispatches an event into the event flow.
ExTextField
 Inherited
getInstanceById(id:String):DisplayObject
指定された id と同じ値が設定されている IExDisplayObject インターフェイスを実装したインスタンスを返します。 Returns the instance implements the IExDisplayObject interface which is set the same value of the specified id.
ExTextField
 Inherited
getInstancesByGroup(group:String, sort:Boolean = false):Array
指定された group と同じ値を持つ IExDisplayObject インターフェイスを実装したインスタンスを含む配列を返します。 Returns the array contains the instance which implements the IExDisplayObject interface that has the same value of the specified group.
ExTextField
 Inherited
getInstancesByRegExp(fieldName:String, pattern:RegExp, sort:Boolean = false):Array
指定された fieldName が条件と一致する IExDisplayObject インターフェイスを実装したインスタンスを含む配列を返します。 Returns the array contains the instance which implements the IExDisplayObject interface that match the condition to the specified fieldName.
ExTextField
 Inherited
hasEventListener(type:String):Boolean
[override] EventIntegrator インスタンスに、特定のイベントタイプに対して登録されたリスナーがあるかどうかを確認します。 Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
ExTextField
  
insertCommand(... commands):void
特定のイベントが送出された際に、自動実行させたい Command インスタンスをすでにリストに登録され、実行中の Command インスタンスの次の位置に追加します。 追加された Command インスタンスは、イベントが送出される直前に自動的に削除されます。
CastTextField
 Inherited
removeAllListeners(completely:Boolean = false):void
addEventListener() メソッド経由で登録された全てのイベントリスナー登録を削除します。 完全に登録を削除しなかった場合には、削除されたイベントリスナーを restoreRemovedListeners() メソッドで復帰させることができます。 Remove the whole event listener registered via addEventListener() method.
ExTextField
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override] EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができます。 Remove the listener from EventIntegrator instance.
ExTextField
 Inherited
removeEventListener() メソッド、または removeAllListeners() メソッド経由で削除された全てイベントリスナーを再登録します。 Re-register the whole event listener removed via removeEventListener() or removeAllListeners() method.
ExTextField
 Inherited
setProperties(props:Object):DisplayObject
インスタンスに対して、複数のプロパティを一括設定します。 Setup the several instance properties.
ExTextField
 Inherited
toBitmapData(transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF):BitmapData
指定されたオブジェクトの BitmapData 表現を返します。 Returns the BitmapData representation of the specified object.
ExTextField
 Inherited
toString():String
[override] 指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
ExTextField
 Inherited
willTrigger(type:String):Boolean
[override] 指定されたイベントタイプについて、この EventIntegrator インスタンスまたはその祖先にイベントリスナーが登録されているかどうかを確認します。 Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
ExTextField
Protected Methods
 MethodDefined By
  
サブクラスで onCastAdded イベントハンドラメソッドの処理を override で実装したい場合に上書きします。 onCastAdded プロパティに、別のメソッドを設定された場合は無効化されます。
CastTextField
  
サブクラスで onCastRemoved イベントハンドラメソッドの処理を override で実装したい場合に上書きします。 onCastRemoved プロパティに、別のメソッドを設定された場合は無効化されます。
CastTextField
Events
 Event Summary Defined By
  ICastObject オブジェクトが AddChild コマンド、または AddChildAt コマンド経由でディスプレイリストに追加された場合に送出されます。 このイベント処理の実行中には、addCommand() メソッド、及び insertCommand() メソッドによるコマンドの同期処理が行えます。CastTextField
  ICastObject オブジェクトが RemoveChild コマンド、または RemoveAllChild コマンド経由でディスプレイリストから削除された場合に送出されます。 このイベント処理の実行中には、addCommand() メソッド、及び insertCommand() メソッドによるコマンドの同期処理が行えます。CastTextField
Property Detail
eventHandlerEnabledproperty
eventHandlerEnabled:Boolean

オブジェクトのイベントハンドラメソッドを有効化するかどうかを指定します。


Implementation
    public function get eventHandlerEnabled():Boolean
    public function set eventHandlerEnabled(value:Boolean):void
executorproperty 
executor:CommandExecutor  [read-only]

コマンドを実行する CommandExecutor インスタンスを取得します。


Implementation
    public function get executor():CommandExecutor
onCastAddedproperty 
onCastAdded:Function

キャストオブジェクトが CastEvent.CAST_ADDED イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。 このイベント処理の実行中には、addCommand() メソッド、及び insertCommand() メソッドによるコマンドの同期処理が行えます。


Implementation
    public function get onCastAdded():Function
    public function set onCastAdded(value:Function):void
onCastRemovedproperty 
onCastRemoved:Function

キャストオブジェクトが CastEvent.CAST_REMOVED イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。 このイベント処理の実行中には、addCommand() メソッド、及び insertCommand() メソッドによるコマンドの同期処理が行えます。


Implementation
    public function get onCastRemoved():Function
    public function set onCastRemoved(value:Function):void
parallelModeproperty 
parallelMode:Boolean

CommandExecutor の実行方法を並列処理にするかどうかを取得または設定します。


Implementation
    public function get parallelMode():Boolean
    public function set parallelMode(value:Boolean):void
toolTipproperty 
toolTip:ToolTip  [read-only]

このオブジェクトに関連付けられている ToolTip インスタンスを取得します。


Implementation
    public function get toolTip():ToolTip
Constructor Detail
CastTextField()Constructor
public function CastTextField(initObject:Object = null)

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

Parameters
initObject:Object (default = null)設定したいプロパティを含んだオブジェクトです。
Method Detail
_onCastAdded()method
protected function _onCastAdded():void

サブクラスで onCastAdded イベントハンドラメソッドの処理を override で実装したい場合に上書きします。 onCastAdded プロパティに、別のメソッドを設定された場合は無効化されます。

_onCastRemoved()method 
protected function _onCastRemoved():void

サブクラスで onCastRemoved イベントハンドラメソッドの処理を override で実装したい場合に上書きします。 onCastRemoved プロパティに、別のメソッドを設定された場合は無効化されます。

addCommand()method 
public function addCommand(... commands):void

特定のイベントが送出された際に、自動実行させたい Command インスタンスをリストの最後尾に追加します。 追加された Command インスタンスは、イベントが送出される直前に自動的に削除されます。

Parameters

... commands登録したいコマンドを含む配列です。

clearCommand()method 
public function clearCommand(completely:Boolean = false):void

登録されている Command インスタンスを削除します。

Parameters

completely:Boolean (default = false)true が設定されている場合は登録されている全てのコマンド登録を解除し、false の場合には現在処理中のコマンド以降の登録を解除します。

insertCommand()method 
public function insertCommand(... commands):void

特定のイベントが送出された際に、自動実行させたい Command インスタンスをすでにリストに登録され、実行中の Command インスタンスの次の位置に追加します。 追加された Command インスタンスは、イベントが送出される直前に自動的に削除されます。

Parameters

... commands登録したいコマンドを含む配列です。

Event Detail
castAdded Event
Event Object Type: jp.progression.events.CastEvent
CastEvent.type property = jp.progression.events.CastEvent.CAST_ADDED

ICastObject オブジェクトが AddChild コマンド、または AddChildAt コマンド経由でディスプレイリストに追加された場合に送出されます。 このイベント処理の実行中には、addCommand() メソッド、及び insertCommand() メソッドによるコマンドの同期処理が行えます。

castAdded イベントオブジェクトの type プロパティ値を定義します。 The CastEvent.CAST_ADDED constant defines the value of the type property of an castAdded event object.
castRemoved Event  
Event Object Type: jp.progression.events.CastEvent
CastEvent.type property = jp.progression.events.CastEvent.CAST_REMOVED

ICastObject オブジェクトが RemoveChild コマンド、または RemoveAllChild コマンド経由でディスプレイリストから削除された場合に送出されます。 このイベント処理の実行中には、addCommand() メソッド、及び insertCommand() メソッドによるコマンドの同期処理が行えます。

castRemoved イベントオブジェクトの type プロパティ値を定義します。 The CastEvent.CAST_REMOVED constant defines the value of the type property of an castRemoved event object.
Examples
     // CastTextField を作成する
     var cast:CastTextField = new CastTextField();
     cast.text = "Progression 3";
     cast.onCastAdded = function():void {
         trace( "CastTextField で CastEvent.CAST_ADDED イベントが送出されました。" );
     };
     cast.onCastRemoved = function():void {
         trace( "CastTextField で CastEvent.CAST_REMOVED イベントが送出されました。" );
     };
     
     // Progression インスタンスを作成する
     var prog:Progression = new Progression( "index", stage );
     
     // ルートシーンのイベントハンドラメソッドを設定します。
     prog.root.onLoad = function():void {
         // コマンドを実行する
         this.addCommand(
             // CastTextField を画面に表示する
             new AddChild( prog.container, cast )
         );
     };
     prog.root.onInit = function():void {
         // コマンドを実行する
         this.addCommand(
             // CastTextField を画面から削除する
             new RemoveChild( prog.container, cast )
         );
     };
     
     // ルートシーンに移動します。
     prog.goto( new SceneId( "/index" ) );