net.sourceforge.groboutils.uicapture.v1
Interface IScriptMaker

All Known Implementing Classes:
JavaMaker

public interface IScriptMaker

Implementors of this interface accept a collection of UI captured events as they relate to creating a play-back script. This interface dictates that the contract for all IScriptMaker instances, the start() method must be called before any other method, and no other method, besides toString(), may be called after invoking the end() method.

Since:
Jan 7, 2002
Version:
$Date: 2003/02/10 22:52:31 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Method Summary
 void end()
          Terminates the script generation.
 void generateDelay(long milliseconds)
          Cause the script to delay for the given number of milliseconds.
 void generateMoveMouse(int x, int y)
          Cause the script to move the mouse.
 void generateMoveMouseWheel(int rotate)
          Cause the script to rotate the mouse wheel.
 void generatePressKey(int keyCode)
          Cause the script to press a key.
 void generatePressMouse(int modifer)
          Cause the script to press a mouse button.
 void generateReleaseKey(int keyCode)
          Cause the script to release a key.
 void generateReleaseMouse(int modifier)
          Cause the script to release a mouse button.
 void generateScreenCapture(java.io.File originalImage, int x, int y, int width, int height)
          Cause the script to capture a screen shot.
 void start()
          Starts the script generation.
 

Method Detail

start

public void start()
Starts the script generation.

Throws:
java.lang.IllegalStateException - if start() has already been called.

end

public void end()
Terminates the script generation.

Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.

generateDelay

public void generateDelay(long milliseconds)
Cause the script to delay for the given number of milliseconds.

Parameters:
milliseconds - the number of milliseconds in the delay.
Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.

generateMoveMouseWheel

public void generateMoveMouseWheel(int rotate)
Cause the script to rotate the mouse wheel.

Parameters:
rotate - the number of rotations the mouse wheel generated.
Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.
See Also:
MouseWheelEvent

generateMoveMouse

public void generateMoveMouse(int x,
                              int y)
Cause the script to move the mouse.

Parameters:
x - the x-coordinate that the mouse moved to
y - the y-coordinate that the mouse moved to
Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.

generatePressMouse

public void generatePressMouse(int modifer)
Cause the script to press a mouse button.

Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.
See Also:
MouseEvent

generateReleaseMouse

public void generateReleaseMouse(int modifier)
Cause the script to release a mouse button.

Parameters:
modifier - the modifier code for the mouse button released.
Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.
See Also:
MouseEvent

generatePressKey

public void generatePressKey(int keyCode)
Cause the script to press a key.

Parameters:
keyCode - code for the pressed key.
Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.
See Also:
KeyEvent

generateReleaseKey

public void generateReleaseKey(int keyCode)
Cause the script to release a key.

Parameters:
keyCode - code for the released key.
Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.
See Also:
KeyEvent

generateScreenCapture

public void generateScreenCapture(java.io.File originalImage,
                                  int x,
                                  int y,
                                  int width,
                                  int height)
Cause the script to capture a screen shot. Probably, it should compare the captured image against the original saved image.

Parameters:
originalImage - file containing the original image for the screen capture that the generated script will compare against when the test is run.
x - screen image bounds.
y - screen image bounds.
width - screen image bounds.
height - screen image bounds.
Throws:
java.lang.IllegalStateException - if start() has not been called, or if end() has already been called.


Copyright © 2001-2003 by The GroboUtils Project