Java Doc for VirtualWindow.java in  » Test-Coverage » GroboUtils » net » sourceforge » groboutils » uicapture » v1 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Test Coverage » GroboUtils » net.sourceforge.groboutils.uicapture.v1 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sourceforge.groboutils.uicapture.v1.VirtualWindow

VirtualWindow
public class VirtualWindow implements KeyListener,MouseListener,MouseMotionListener,MouseWheelListener(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. This transparent window is similar to the "glass pane" concept in Swing JFrames.

For the moment, there is no way for listeners to prevent an event from being passed to the underlying UI. This needs to be changed.

WARNING: if the screen size is to resize, then this will not work correctly.
author:
   Matt Albrecht groboclown@users.sourceforge.net
since:
   Jan 4, 2002
version:
   Mar 13, 2002




Constructor Summary
public  VirtualWindow()
     Create a new VirtualWindow, with the glass enabled.
public  VirtualWindow(String title, boolean enable)
     Specify the initial enabled state of the window.

Method Summary
public  voidaddCaptureListener(ICaptureListener cl)
     Adds an ICaptureListener to the list of recipients of input events.
public  BufferedImagecreateScreenScrape()
     Scrapes the current screen into a BufferedImage the same size as the window.
public  BufferedImagecreateScreenScrape(Rectangle bounds)
     Scrapes the current screen into a BufferedImage from the given area on the screen.
public  voiddelay(int ms)
     Sleeps for the specified number of milliseconds.
public  voiddispose()
    
protected  IteratorgetCaptureListeners()
     Returns a list of all the current ICaptureListeners.
public  VirtualWindowUIgetWindow()
    
public  voidhide()
     Hides the glass pane, and stops all input event capturing.
public  booleanisGlassEnabled()
     Retrieves the current glass enabled state.
public  voidkeyPressed(KeyEvent ke)
    
public  voidkeyReleased(KeyEvent ke)
    
public  voidkeyTyped(KeyEvent me)
    
public  voidmouseClicked(MouseEvent me)
    
public  voidmouseDragged(MouseEvent me)
    
public  voidmouseEntered(MouseEvent me)
    
public  voidmouseExited(MouseEvent me)
    
public  voidmouseMoved(MouseEvent me)
    
public  voidmousePressed(MouseEvent me)
    
public  voidmouseReleased(MouseEvent me)
    
public  voidmouseWheelMoved(MouseWheelEvent me)
    
public  voidremoveCaptureListener(ICaptureListener cl)
     Removes the given ICaptureListener from the inner list of input events recipients.
public synchronized  voidsetGlassEnabled(boolean on)
     Sets the inner state for displaying the glass pane.
public  voidshow()
     Shows the glass pane, and continues all input event capturing.
public synchronized  voidsimulateEvent(CaptureEvent ce)
     Simulates the given captured event.
public  voidupdate()
     Updates the background image.
public  voidwaitForIdle()
     Waits until all events currently on the event queue have been processed.


Constructor Detail
VirtualWindow
public VirtualWindow() throws java.awt.AWTException(Code)
Create a new VirtualWindow, with the glass enabled.
exception:
  java.awt.AWTException - thrown if a Robot is not supportedin the current JDK implementation.



VirtualWindow
public VirtualWindow(String title, boolean enable) throws java.awt.AWTException(Code)
Specify the initial enabled state of the window.
Parameters:
  enable - set to the initial glass pane state.
exception:
  java.awt.AWTException - thrown if a Robot is not supportedin the current JDK implementation.




Method Detail
addCaptureListener
public void addCaptureListener(ICaptureListener cl)(Code)
Adds an ICaptureListener to the list of recipients of input events. If the given listener is null, then the request is ignored.
Parameters:
  cl - the listener to add.



createScreenScrape
public BufferedImage createScreenScrape()(Code)
Scrapes the current screen into a BufferedImage the same size as the window. the captured screen image.



createScreenScrape
public BufferedImage createScreenScrape(Rectangle bounds)(Code)
Scrapes the current screen into a BufferedImage from the given area on the screen. This is passed directly to the underlying Robot. the captured screen image.



delay
public void delay(int ms)(Code)
Sleeps for the specified number of milliseconds. This is passed directly through to the underlying Robot.
Parameters:
  ms - Time to sleep in milliseconds.
exception:
  IllegalArgumentException - thrown by Robot if ms isnot between 0 and 60,000, inclusive.



dispose
public void dispose()(Code)
Close out all inner instances and shut down the UI



getCaptureListeners
protected Iterator getCaptureListeners()(Code)
Returns a list of all the current ICaptureListeners. an iterator of the listeners.



getWindow
public VirtualWindowUI getWindow()(Code)
the inner Window reference.



hide
public void hide()(Code)
Hides the glass pane, and stops all input event capturing. This is only executed if the glass is enabled, and has no effect on the enabled state of the glass.



isGlassEnabled
public boolean isGlassEnabled()(Code)
Retrieves the current glass enabled state. true if the glass pane is enabled (active andintercepting events), or false if is disabled.



keyPressed
public void keyPressed(KeyEvent ke)(Code)

See Also:   java.awt.event.KeyListener



keyReleased
public void keyReleased(KeyEvent ke)(Code)

See Also:   java.awt.event.KeyListener



keyTyped
public void keyTyped(KeyEvent me)(Code)

See Also:   java.awt.event.KeyListener



mouseClicked
public void mouseClicked(MouseEvent me)(Code)

See Also:   java.awt.event.MouseListener



mouseDragged
public void mouseDragged(MouseEvent me)(Code)

See Also:   java.awt.event.MouseMotionListener



mouseEntered
public void mouseEntered(MouseEvent me)(Code)

See Also:   java.awt.event.MouseListener



mouseExited
public void mouseExited(MouseEvent me)(Code)

See Also:   java.awt.event.MouseListener



mouseMoved
public void mouseMoved(MouseEvent me)(Code)

See Also:   java.awt.event.MouseMotionListener



mousePressed
public void mousePressed(MouseEvent me)(Code)

See Also:   java.awt.event.MouseListener



mouseReleased
public void mouseReleased(MouseEvent me)(Code)

See Also:   java.awt.event.MouseListener



mouseWheelMoved
public void mouseWheelMoved(MouseWheelEvent me)(Code)

See Also:   java.awt.event.MouseWheelListener



removeCaptureListener
public void removeCaptureListener(ICaptureListener cl)(Code)
Removes the given ICaptureListener from the inner list of input events recipients. If the given listener is null or not registered, then the request is ignored.
Parameters:
  cl - the listener to remove.



setGlassEnabled
public synchronized void setGlassEnabled(boolean on)(Code)
Sets the inner state for displaying the glass pane. If the pane is enabled, then the glass pane will attempt to maximize itself and keep itself on the foreground at all costs.
Parameters:
  on - true if the glass pane is enabled (active andintercepting events), or false if is disabled.



show
public void show()(Code)
Shows the glass pane, and continues all input event capturing. This is only executed if the glass is enabled, and has no effect on the enabled state of the glass.



simulateEvent
public synchronized void simulateEvent(CaptureEvent ce)(Code)
Simulates the given captured event. This minimizes the glass window, performs the event with the Robot, and restores the glass window if the glass pane is enabled.
Parameters:
  ce - the event to simulate.



update
public void update()(Code)
Updates the background image.



waitForIdle
public void waitForIdle()(Code)
Waits until all events currently on the event queue have been processed. This is passed directly through to the underlying Robot.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.