クラス SetTimer

すべての実装されたインタフェース:
ActionListener, EventListener, ClientInterface, CommonInterface, jp.ne.mki.wedge.run.interfaces.RuleEngineInterface

public class SetTimer extends AbstractClient implements ActionListener

タイマー

一定時間ごとに定期的にイベントを発生させます。 基本的にonLoad時にこのロジッククラスを実行し、 パラメータにイベント発生間隔をミリ秒単位で指定します。 実行する処理内容が記述されたアイテムをInputRecordに指定してください。

このロジッククラスでは、アイテムにコンポーネントが割り当てられていてもフォーカスの 移動は行いません。つまり、テキストフィールドなどで入力中でタイマーイベントが 実行されても、テキストフィールドのAfterは実行しせずに(アイテム内で保持している値 は入力中の値ではない。前回Afterが実行されたときの値)動作することに注意してください。
このロジッククラスでの実装例としては、ラベルに「現在の日付・時刻」を1秒単位で表示する などに なります。


[I/O RECORD]

InputRecord OutputRecord
実行するITEM

[RULE PARAMETER]

Parameter タイマーの発生する時間間隔(ミリ秒)
バージョン:
1.0
  • フィールド詳細

    • timer

      Timer timer
    • executeTime

      int executeTime
  • コンストラクタの詳細

    • SetTimer

      public SetTimer()
  • メソッドの詳細

    • getIOParameter

      public int getIOParameter()
      IOパラメータ取得。execute の前に実行される。
      定義:
      getIOParameter インタフェース内 CommonInterface
      定義:
      getIOParameter インタフェース内 jp.ne.mki.wedge.run.interfaces.RuleEngineInterface
      戻り値:
      int OK=処理続行、ERROR=異常終了、CANCEL=処理を中断(正常終了)
    • execute

      public int execute()
      フレームにKeyListenerを追加します。
      定義:
      execute インタフェース内 CommonInterface
      定義:
      execute インタフェース内 jp.ne.mki.wedge.run.interfaces.RuleEngineInterface
      戻り値:
       int OK
    • loopInItemSub

      protected int loopInItemSub(jp.ne.mki.wedge.run.client.data.Item inItem, int index)
      クラスからコピーされた説明: AbstractClient
      loopInItem()から呼び出されるメソッドです。ユーザが任意に上書き記述をします。
      オーバーライド:
      loopInItemSub クラス内 AbstractClient
    • exit

      public void exit()
      終了処理。保持していた変数などを開放する処理を記述します。
      execute の後に実行されます。
      正常終了・異常終了などに関わらず必ず実行されます。
      定義:
      exit インタフェース内 CommonInterface
      定義:
      exit インタフェース内 jp.ne.mki.wedge.run.interfaces.RuleEngineInterface
    • dispose

      public void dispose() throws Throwable
      オブジェクト破棄処理
      定義:
      dispose インタフェース内 CommonInterface
      オーバーライド:
      dispose クラス内 AbstractBase
      例外:
      Throwable
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      InRecordに指定されたITEMのBefore,Afterイベントを実行します。戻り値がOKでない場合は中断します。
      定義:
      actionPerformed インタフェース内 ActionListener