| java.lang.Object net.sourceforge.groboutils.uicapture.v1.VirtualWindowController
VirtualWindowController | public class VirtualWindowController (Code) | | A window which covers the whole screen, and does not paint in the background.
It captures keyboard and mouse events, and sends them to both all registered
listeners, and to the underlying GUI as well.
WARNING: if the screen size is to resize, then this will not work correctly.
author: Matt Albrecht groboclown@users.sourceforge.net version: Jan 4, 2002 |
Method Summary | |
protected void | assertActive() | protected void | assertInactive() | public void | begin() Begin the reinactment process. | public boolean | compareFiles(File one, File two) Compares the two files for identity. | public void | end() Complete the reinactment process. | public Rectangle | getBounds() Retrieves the size and position of the capture area of the screen. | public String | getImageExtension() | public void | moveMouse(int x, int y) Simulate a mouse movement. | public void | pressKey(int keyCode) Simulate a key press. | public void | pressMouse(int modifiers) Simulate a mouse button press. | public void | releaseKey(int keyCode) Simulate a key release. | public void | releaseMouse(int modifiers) Simulate a mouse button release. | public void | rotateMouseWheel(int rotation) Simulate a mouse wheel rotation. | public void | saveFocusedWindow(String filename) Saves a picture of the underlying UI's focused window to a file. | public void | saveScreen(String filename) Saves the entire screen to a file. | public void | saveScreenImage(String filename, int x, int y, int w, int h) Saves the selected screen part to a file. | public void | saveScreenImage(String filename, Rectangle bounds) Saves the selected screen part to a file. | public void | sleep(long milliseconds) Pause for a period of milliseconds. | public void | waitForIdle() Waits until all events currently on the event queue have been processed. |
VirtualWindowController | public VirtualWindowController()(Code) | | Uses the Default version for the IScreenScraper and IFocusedWindowFinder.
|
assertActive | protected void assertActive()(Code) | | |
assertInactive | protected void assertInactive()(Code) | | |
compareFiles | public boolean compareFiles(File one, File two) throws IOException(Code) | | Compares the two files for identity.
true if the files are identical, else false. |
end | public void end()(Code) | | Complete the reinactment process.
|
getBounds | public Rectangle getBounds()(Code) | | Retrieves the size and position of the capture area of the screen.
the screen size. |
moveMouse | public void moveMouse(int x, int y)(Code) | | Simulate a mouse movement.
Parameters: x - the x position (aboslute) to move the mouse to. Parameters: y - the y position (aboslute) to move the mouse to. |
pressKey | public void pressKey(int keyCode)(Code) | | Simulate a key press.
Parameters: keyCode - the key code of the key. |
pressMouse | public void pressMouse(int modifiers)(Code) | | Simulate a mouse button press.
Parameters: modifiers - the mouse button modifiers. |
releaseKey | public void releaseKey(int keyCode)(Code) | | Simulate a key release.
Parameters: keyCode - the key code of the key. |
releaseMouse | public void releaseMouse(int modifiers)(Code) | | Simulate a mouse button release.
Parameters: modifiers - the mouse button modifiers. |
rotateMouseWheel | public void rotateMouseWheel(int rotation)(Code) | | Simulate a mouse wheel rotation.
Parameters: rotation - the number of 'clicks' to rotate the mouse wheel. |
saveFocusedWindow | public void saveFocusedWindow(String filename) throws IOException(Code) | | Saves a picture of the underlying UI's focused window to a file.
Parameters: filename - the file to save the image as. exception: IOException - thrown if there was a problem writing the file. |
saveScreen | public void saveScreen(String filename) throws IOException(Code) | | Saves the entire screen to a file.
Parameters: filename - the file to save the image as. exception: IOException - thrown if there was a problem writing the file. |
saveScreenImage | public void saveScreenImage(String filename, int x, int y, int w, int h) throws IOException(Code) | | Saves the selected screen part to a file.
Parameters: filename - the file to save the image as. Parameters: x - the x position of the part of the screen to grab. Parameters: y - the y position of the part of the screen to grab. Parameters: w - the width of the part of the screen to grab. Parameters: h - the height of the part of the screen to grab. exception: IOException - thrown if there was a problem writing the file. |
saveScreenImage | public void saveScreenImage(String filename, Rectangle bounds) throws IOException(Code) | | Saves the selected screen part to a file.
Parameters: filename - the file to save the image as. Parameters: bounds - the part of the screen to grab. exception: IOException - thrown if there was a problem writing the file. |
sleep | public void sleep(long milliseconds)(Code) | | Pause for a period of milliseconds. Since Robot can only delay for
60 seconds at a time, this will first sleep using the Robot, then
will use Thread for the remainder of the time.
Parameters: milliseconds - Time in milliseconds to sleep. |
waitForIdle | public void waitForIdle()(Code) | | Waits until all events currently on the event queue have been processed.
|
|
|