Packagejp.naggg.ui
Classpublic class TextInputEnd
InheritanceTextInputEnd Inheritance flash.events.EventDispatcher

TextField や TextInput・TextArea コンポーネントのインスタンスへの テキスト入力に対して、連続した入力の終了を監視するクラスです. このクラスにより、少しリッチなUIを作ることができるかもしれません. 監視レベル(遅延時間)は制御することができます.

View the examples



Public Properties
 PropertyDefined By
  delay : uint
[read-only] 遅延時間、ミリ秒で指定します.
TextInputEnd
  target : DisplayObject
[read-only] 対象となる、TextField TextInput TextArea インスタンス.
TextInputEnd
Public Methods
 MethodDefined By
  
TextInputEnd(target:DisplayObject, delay:uint)
コンストラクタ.
TextInputEnd
  
init(target:DisplayObject, delay:uint):void
初期化を行います.
TextInputEnd
  
reset():void
リセットを行います. プロパティの開放やリスナーの削除などを行います. TextInputEnd インスタンスを破棄する場合、事前に必ず呼び出してください.
TextInputEnd
  
toString():String
[override] 文字列表現を返します.
TextInputEnd
Events
 Event Summary Defined By
  連続したテキスト入力を終えさらにテキスト変更があったときに配信されるイベントです.TextInputEnd
Property Detail
delayproperty
delay:uint  [read-only]

遅延時間、ミリ秒で指定します.


Implementation
    public function get delay():uint
targetproperty 
target:DisplayObject  [read-only]

対象となる、TextField TextInput TextArea インスタンス.


Implementation
    public function get target():DisplayObject
Constructor Detail
TextInputEnd()Constructor
public function TextInputEnd(target:DisplayObject, delay:uint)

コンストラクタ.

Parameters
target:DisplayObject — 対象の TextField TextInput TextArea のインスタンスです.
 
delay:uint — テキスト入力を終えたとみなすタイミングです.
Method Detail
init()method
public function init(target:DisplayObject, delay:uint):void

初期化を行います.

Parameters

target:DisplayObject — 対象の TextField TextInput TextArea のインスタンスです.
 
delay:uint — テキスト入力を終えたとみなすタイミングです.

reset()method 
public function reset():void

リセットを行います. プロパティの開放やリスナーの削除などを行います. TextInputEnd インスタンスを破棄する場合、事前に必ず呼び出してください.

toString()method 
override public function toString():String

文字列表現を返します.

Returns
String
Event Detail
complete Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.COMPLETE

連続したテキスト入力を終えさらにテキスト変更があったときに配信されるイベントです.

Examples
     import jp.naggg.ui.TextInputEnd;
     var tf:TextField = new TextField();
     var tie:TextInputEnd = new TextInputEnd(tf, 500);
     tie.addEventListener(Event.COMPLETE, textInputEndCompleteHandler);
     // 特定の単語を含むかを確認
     function textInputEndCompleteHandler(evt:Event):void{
        if(tf.text.indexOf("someword") > -1){
            trace("OK");
        }else{
            trace("NG");
        }
     }