jp.ne.mki.wedge.pub.vfunit.helper
クラス DefaultRobotTestHelper

java.lang.Object
  上位を拡張 RobotTestHelper
      上位を拡張 jp.ne.mki.wedge.pub.vfunit.helper.DefaultRobotTestHelper
すべての実装されたインタフェース:
ITestHelper

public class DefaultRobotTestHelper
extends RobotTestHelper
implements ITestHelper

デフォルト実装のRobotHelper。

作成者:
kanbayashi

コンストラクタの概要
DefaultRobotTestHelper()
          コンストラクタ
 
メソッドの概要
 void clearTextComp(JFCTestCase testCase, javax.swing.text.JTextComponent comp)
          TextComponentの内容をクリアする。
 void closeWindow(JFCTestCase testCase, java.awt.Window window)
          Mouseイベント 画面の × ボタンをクリックして画面を閉じる このメソッドを使うと WindowMonitor.getWindows() の 参照から 外れてしまう場合がある。
 void enterClickAndLeave(AbstractMouseEventData evtData)
          enterClickAndLeave junit.extensions.jfcunit.TestHelper を上書き。
 void enterClickAndLeave(JFCTestCase testCase, java.awt.Component comp, int numberOfClicks)
          Mouseイベント 汎用 MouseEventData を使用する
 void enterClickAndLeave(JFCTestCase testCase, javax.swing.JComboBox comp, int elementIndex, int numberOfClicks)
          Mouseイベント JComboBox用 JComboBoxMouseEventData を使用する
 void enterClickAndLeave(JFCTestCase testCase, javax.swing.JList comp, int elementIndex, int numberOfClicks)
          Mouseイベント JList用 JListMouseEventData を使用する
 void enterClickAndLeave(JFCTestCase testCase, javax.swing.JTabbedPane comp, int elementIndex, int numberOfClicks)
          Mouseイベント JTabbedPane用 JTabbedPaneMouseEventData を使用する
 void enterClickAndLeave(JFCTestCase testCase, javax.swing.JTable comp, int rowIndex, int columnIndex, int numberOfClicks)
          Mouseイベント JTable用 JTableMouseEventData を使用する
 void enterClickAndLeave(JFCTestCase testCase, javax.swing.text.JTextComponent comp, int numberOfClicks)
          Mouseイベント JTextComponent用 JTextComponentMouseEventData を使用する
 void enterClickAndLeaveMouseEventOnly(JFCTestCase testCase, java.awt.Window window, int x, int y)
          Mouseイベント 指定のX,Y座標にて MousePressed,MouseReleasedのイベント発行のみ行う
 void enterClickCoordinates(JFCTestCase testCase, java.awt.Window window, java.awt.Component comp, int compX, int compY, int clickCount)
          Mouseのクリックを行う。
 void enterDragForTableColumnMove(JFCTestCase testCase, javax.swing.JTable table, int columnIndex, int toIndex)
          テーブル列をドラッグして移動する
 void enterDragForTableColumnSizecChange(JFCTestCase testCase, javax.swing.JTable table, int columnIndex, int inclementSize, boolean cursorCheck)
          テーブルカラムサイズ変更
 void pressCtrlShiftTab(JFCTestCase testCase)
          SHIFT+TABにて遷移用。
 void pressCtrlTab(JFCTestCase testCase)
          CTRL+TAB をSEND (TABにて遷移用)
 void pressKey(JFCTestCase testCase, java.awt.Component comp, int keyCode)
          Key入力 (JFCUnitフレームワークを使用) フォーカス移動あり
 void pressKey(JFCTestCase testCase, java.awt.Component comp, int keyCode, int modifiers)
          Modifiers付きKey入力 (JFCUnitフレームワークを使用) フォーカス移動あり
 void pressKeyNofocus(JFCTestCase testCase, int keyCode)
          Key入力 JFCUnit標準でなくRobotにて単純にKeyPress.
 void pressKeyNofocus(JFCTestCase testCase, int keyCode, int modifiers)
          Key入力 JFCUnit標準でなくRobotにて単純にKeyPress.
 void pressMemonicKey(JFCTestCase testCase, int keyId)
          MemonicKey用に InputEvent.ALT_MASK をmodifiersに設定
 void pressShiftTab(JFCTestCase testCase)
          SHIFT+TABにて遷移用。
 void pressTab(JFCTestCase testCase)
          TAB をSEND (TABにて遷移用)
 void sendString(JFCTestCase testCase, java.awt.Component comp, java.lang.String value)
          文字入力 (JFCUnitフレームワークを使用) 日本語はひらがな、カタカナのみ可。
 void setString(JFCTestCase testCase, javax.swing.text.JTextComponent comp, java.lang.String value)
          文字入力 (コンポーネントへSetTextする拡張版) 引数の文字をそのまま設定。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

DefaultRobotTestHelper

public DefaultRobotTestHelper()
                       throws java.awt.AWTException
コンストラクタ

例外:
java.awt.AWTException
メソッドの詳細

sendString

public void sendString(JFCTestCase testCase,
                       java.awt.Component comp,
                       java.lang.String value)
                throws java.lang.Exception
文字入力 (JFCUnitフレームワークを使用) 日本語はひらがな、カタカナのみ可。漢字など不可。 但し、予めIMEの設定は行っておく事。

定義:
インタフェース ITestHelper 内の sendString
パラメータ:
JFCTestCase - テストケース
Component - 対象のコンポーネント
String - 入力値
例外:
java.lang.Exception

setString

public void setString(JFCTestCase testCase,
                      javax.swing.text.JTextComponent comp,
                      java.lang.String value)
               throws java.lang.Exception
文字入力 (コンポーネントへSetTextする拡張版) 引数の文字をそのまま設定。 日本語、漢字 などの文字を設定する場合で、sendString で実装するのは 難しいときに使用。

定義:
インタフェース ITestHelper 内の setString
パラメータ:
JFCTestCase - テストケース
Component - 対象のコンポーネント
String - 入力値
例外:
java.lang.Exception

pressKey

public void pressKey(JFCTestCase testCase,
                     java.awt.Component comp,
                     int keyCode)
              throws java.lang.Exception
Key入力 (JFCUnitフレームワークを使用) フォーカス移動あり

定義:
インタフェース ITestHelper 内の pressKey
パラメータ:
JFCTestCase - テストケース
Component - 対象のコンポーネント
int - keyCode
例外:
java.lang.Exception

pressKey

public void pressKey(JFCTestCase testCase,
                     java.awt.Component comp,
                     int keyCode,
                     int modifiers)
              throws java.lang.Exception
Modifiers付きKey入力 (JFCUnitフレームワークを使用) フォーカス移動あり

定義:
インタフェース ITestHelper 内の pressKey
パラメータ:
JFCTestCase - テストケース
Component - 対象のコンポーネント
int - keyCode
int - modifiers
例外:
java.lang.Exception

pressKeyNofocus

public void pressKeyNofocus(JFCTestCase testCase,
                            int keyCode)
                     throws java.lang.Exception
Key入力 JFCUnit標準でなくRobotにて単純にKeyPress. フォーカス移動を伴わない flushAWTあり

定義:
インタフェース ITestHelper 内の pressKeyNofocus
パラメータ:
JFCTestCase - テストケース
int - keyCode
例外:
java.lang.Exception

pressKeyNofocus

public void pressKeyNofocus(JFCTestCase testCase,
                            int keyCode,
                            int modifiers)
                     throws java.lang.Exception
Key入力 JFCUnit標準でなくRobotにて単純にKeyPress. フォーカス移動を伴わない flushAWTあり

定義:
インタフェース ITestHelper 内の pressKeyNofocus
パラメータ:
JFCTestCase - テストケース
int - keyCode
例外:
java.lang.Exception

pressCtrlTab

public void pressCtrlTab(JFCTestCase testCase)
                  throws java.lang.Exception
CTRL+TAB をSEND (TABにて遷移用)

定義:
インタフェース ITestHelper 内の pressCtrlTab
パラメータ:
JFCTestCase - テストケース
例外:
java.lang.Exception

pressTab

public void pressTab(JFCTestCase testCase)
              throws java.lang.Exception
TAB をSEND (TABにて遷移用)

定義:
インタフェース ITestHelper 内の pressTab
パラメータ:
JFCTestCase - テストケース
例外:
java.lang.Exception

pressCtrlShiftTab

public void pressCtrlShiftTab(JFCTestCase testCase)
                       throws java.lang.Exception
SHIFT+TABにて遷移用。 CTRL+SHIFT+TAB をSEND

定義:
インタフェース ITestHelper 内の pressCtrlShiftTab
パラメータ:
JFCTestCase - テストケース
Component - 対象のコンポーネント
例外:
java.lang.Exception

pressShiftTab

public void pressShiftTab(JFCTestCase testCase)
                   throws java.lang.Exception
SHIFT+TABにて遷移用。 SHIFT+TAB をSEND

定義:
インタフェース ITestHelper 内の pressShiftTab
パラメータ:
JFCTestCase - テストケース
例外:
java.lang.Exception

clearTextComp

public void clearTextComp(JFCTestCase testCase,
                          javax.swing.text.JTextComponent comp)
                   throws java.lang.Exception
TextComponentの内容をクリアする。 全選択してからDELETEを送る事により実装しています。

定義:
インタフェース ITestHelper 内の clearTextComp
パラメータ:
JFCTestCase - テストケース
Component - 対象のコンポーネント
例外:
java.lang.Exception

pressMemonicKey

public void pressMemonicKey(JFCTestCase testCase,
                            int keyId)
                     throws java.lang.Exception
MemonicKey用に InputEvent.ALT_MASK をmodifiersに設定

定義:
インタフェース ITestHelper 内の pressMemonicKey
パラメータ:
JFCTestCase - テストケース
int - KEYのID
例外:
java.lang.Exception

enterClickAndLeave

public void enterClickAndLeave(JFCTestCase testCase,
                               java.awt.Component comp,
                               int numberOfClicks)
                        throws java.lang.Exception
Mouseイベント 汎用 MouseEventData を使用する

定義:
インタフェース ITestHelper 内の enterClickAndLeave
パラメータ:
JFCTestCase - テストケース
JComponent - 対象のコンポーネント
int - クリック回数
例外:
java.lang.Exception

enterClickAndLeave

public void enterClickAndLeave(JFCTestCase testCase,
                               javax.swing.JComboBox comp,
                               int elementIndex,
                               int numberOfClicks)
                        throws java.lang.Exception
Mouseイベント JComboBox用 JComboBoxMouseEventData を使用する

定義:
インタフェース ITestHelper 内の enterClickAndLeave
パラメータ:
JFCTestCase - テストケース
JComboBox - 対象のコンポーネント
int - elementIndex
int - クリック回数
例外:
java.lang.Exception

enterClickAndLeave

public void enterClickAndLeave(JFCTestCase testCase,
                               javax.swing.JList comp,
                               int elementIndex,
                               int numberOfClicks)
                        throws java.lang.Exception
Mouseイベント JList用 JListMouseEventData を使用する

定義:
インタフェース ITestHelper 内の enterClickAndLeave
パラメータ:
JFCTestCase - テストケース
JList - 対象のコンポーネント
int - elementIndex
int - クリック回数
例外:
java.lang.Exception

enterClickAndLeave

public void enterClickAndLeave(JFCTestCase testCase,
                               javax.swing.JTabbedPane comp,
                               int elementIndex,
                               int numberOfClicks)
                        throws java.lang.Exception
Mouseイベント JTabbedPane用 JTabbedPaneMouseEventData を使用する

定義:
インタフェース ITestHelper 内の enterClickAndLeave
パラメータ:
JFCTestCase - テストケース
JTabbedPane - 対象のコンポーネント
int - elementIndex
int - クリック回数
例外:
java.lang.Exception

enterClickAndLeave

public void enterClickAndLeave(JFCTestCase testCase,
                               javax.swing.JTable comp,
                               int rowIndex,
                               int columnIndex,
                               int numberOfClicks)
                        throws java.lang.Exception
Mouseイベント JTable用 JTableMouseEventData を使用する

定義:
インタフェース ITestHelper 内の enterClickAndLeave
パラメータ:
JFCTestCase - テストケース
JTable - 対象のコンポーネント
int - elementIndex
int - クリック回数
例外:
java.lang.Exception

enterClickAndLeave

public void enterClickAndLeave(JFCTestCase testCase,
                               javax.swing.text.JTextComponent comp,
                               int numberOfClicks)
                        throws java.lang.Exception
Mouseイベント JTextComponent用 JTextComponentMouseEventData を使用する

定義:
インタフェース ITestHelper 内の enterClickAndLeave
パラメータ:
JFCTestCase - テストケース
JTextComponent - 対象のコンポーネント
int - elementIndex
int - クリック回数
例外:
java.lang.Exception

enterClickAndLeaveMouseEventOnly

public void enterClickAndLeaveMouseEventOnly(JFCTestCase testCase,
                                             java.awt.Window window,
                                             int x,
                                             int y)
                                      throws java.lang.Exception
Mouseイベント 指定のX,Y座標にて MousePressed,MouseReleasedのイベント発行のみ行う

定義:
インタフェース ITestHelper 内の enterClickAndLeaveMouseEventOnly
パラメータ:
testCase -
window -
x - 画面内の絶対座標X
y - 画面内の絶対座標Y
例外:
java.lang.Exception

enterClickCoordinates

public void enterClickCoordinates(JFCTestCase testCase,
                                  java.awt.Window window,
                                  java.awt.Component comp,
                                  int compX,
                                  int compY,
                                  int clickCount)
                           throws java.lang.Exception
Mouseのクリックを行う。 指定コンポーネントの X,Y座標にてMousePressed,MouseReleasedのイベント発行のみ行う

定義:
インタフェース ITestHelper 内の enterClickCoordinates
パラメータ:
testCase - テストケース
window - コンポーネントが配置されている画面
comp - 対象コンポーネント
compX - 指定コンポーネント内絶対座標X
compY - 指定コンポーネント内絶対座標Y
clickCount - クリック回数
例外:
java.lang.Exception

enterDragForTableColumnMove

public void enterDragForTableColumnMove(JFCTestCase testCase,
                                        javax.swing.JTable table,
                                        int columnIndex,
                                        int toIndex)
                                 throws java.lang.Exception
テーブル列をドラッグして移動する

定義:
インタフェース ITestHelper 内の enterDragForTableColumnMove
パラメータ:
table -
columnIndex -
toIndex -
例外:
java.lang.Exception

enterDragForTableColumnSizecChange

public void enterDragForTableColumnSizecChange(JFCTestCase testCase,
                                               javax.swing.JTable table,
                                               int columnIndex,
                                               int inclementSize,
                                               boolean cursorCheck)
                                        throws java.lang.Exception
テーブルカラムサイズ変更

定義:
インタフェース ITestHelper 内の enterDragForTableColumnSizecChange
パラメータ:
testCase -
table -
columnIndex -
toIndex -
例外:
java.lang.Exception

closeWindow

public void closeWindow(JFCTestCase testCase,
                        java.awt.Window window)
                 throws java.lang.Exception
Mouseイベント 画面の × ボタンをクリックして画面を閉じる このメソッドを使うと WindowMonitor.getWindows() の 参照から 外れてしまう場合がある。注意。

定義:
インタフェース ITestHelper 内の closeWindow
パラメータ:
JFCTestCase - テストケース
Window - 対象のウィンドウ
例外:
java.lang.Exception

enterClickAndLeave

public void enterClickAndLeave(AbstractMouseEventData evtData)
enterClickAndLeave junit.extensions.jfcunit.TestHelper を上書き。 修正点はMousePressとReleaseの間にSleep(100)を配置したのみ。