Java Doc for WindowWaiter.java in  » IDE-Netbeans » jemmy » org » netbeans » jemmy » 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 » IDE Netbeans » jemmy » org.netbeans.jemmy 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.jemmy.Waiter
      org.netbeans.jemmy.WindowWaiter

All known Subclasses:   org.netbeans.jemmy.FrameWaiter,  org.netbeans.jemmy.DialogWaiter,
WindowWaiter
public class WindowWaiter extends Waiter implements Timeoutable(Code)
A WindowWaiter is a utility class used to look or wait for Windows. It contains methods to search for a Window among the currently showing Windows as well as methods that wait for a Window to show within an allotted time period. Searches and waits always involve search criteria applied by a ComponentChooser instance. Searches and waits can both be restricted to windows owned by a given window.
Timeouts used:
WindowWaiter.WaitWindowTimeout - time to wait window displayed
WindowWaiter.AfterWindowTimeout - time to sleep after window has been dispayed

See Also:   org.netbeans.jemmy.Timeouts
author:
   Alexandre Iline (alexandre.iline@sun.com)



Constructor Summary
public  WindowWaiter()
     Constructor.

Method Summary
public  ObjectactionProduced(Object obj)
     Action producer--get a window. Get a window.
protected  StringgetActionProducedMessage(long timeSpent, Object result)
     Overrides Waiter.getActionProducedMessage.
See Also:   org.netbeans.jemmy.Waiter.getActionProducedMessage(longObject)
Parameters:
  timeSpent - time from waiting start (milliseconds)
Parameters:
  result - result of Waitable.actionproduced method.
protected  ComponentChoosergetComponentChooser()
     Method can be used by a subclass to define chooser.
public  StringgetDescription()
    
protected  StringgetGoldenActionProducedMessage()
    
protected  StringgetGoldenTimeoutExpiredMessage()
    
protected  StringgetGoldenWaitingStartedMessage()
    
protected  WindowgetOwner()
     Method can be used by a subclass to define window owner.
protected  StringgetTimeoutExpiredMessage(long timeSpent)
     Overrides Waiter.getTimeoutExpiredMessage.
public  TimeoutsgetTimeouts()
     Return current timeouts.
protected  StringgetWaitingStartedMessage()
    
public static  WindowgetWindow(Window owner, ComponentChooser cc, int index)
     Searches for a window. The search proceeds among the currently showing windows for the index+1'th window that is both owned by the java.awt.Window owner and that meets the criteria defined and applied by the ComponentChooser parameter.
Parameters:
  owner - The owner window of all the windows to be searched.
Parameters:
  cc - A component chooser used to define and apply the search criteria.
Parameters:
  index - The ordinal index of the window in the set of currently displayedwindows with the proper window ownership and a suitable title.
public static  WindowgetWindow(Window owner, ComponentChooser cc)
     Searches for a window. Search among the currently showing windows for the first that is both owned by the java.awt.Window owner and that meets the search criteria applied by the ComponentChooser parameter.
Parameters:
  owner - The owner window of the windows to be searched.
Parameters:
  cc - A component chooser used to define and apply the search criteria.
public static  WindowgetWindow(ComponentChooser cc, int index)
     Searches for a window. The search proceeds among the currently showing windows for the index+1'th window that meets the criteria defined and applied by the ComonentChooser parameter.
Parameters:
  cc - A component chooser used to define and apply the search criteria.
Parameters:
  index - The ordinal index of the window in the set of currently displayedwindows.
public static  WindowgetWindow(ComponentChooser cc)
     Searches for a window. Search among the currently showing windows for one that meets the search criteria applied by the ComponentChooser parameter.
Parameters:
  cc - A component chooser used to define and apply the search criteria.
protected  voidsetComponentChooser(ComponentChooser ch)
     Method can be used by a subclass to define chooser.
protected  voidsetOwner(Window owner)
     Method can be used by a subclass to define window owner.
public  voidsetTimeouts(Timeouts timeouts)
     Defines current timeouts.
public  WindowwaitWindow(ComponentChooser ch, int index)
     Waits for a window to show. Wait for the index+1'th window that meets the criteria defined and applied by the ComonentChooser parameter to show up.
Parameters:
  ch - A component chooser used to define and apply the search criteria.
Parameters:
  index - The ordinal index of the window in the set of currently displayedwindows.
public  WindowwaitWindow(ComponentChooser ch)
     Waits for a window to show. Wait for a window that meets the search criteria applied by the ComponentChooser parameter to show up.
Parameters:
  ch - A component chooser used to define and apply the search criteria. a reference to the first window that shows and thatmeets the search criteria.
public  WindowwaitWindow(Window o, ComponentChooser ch, int index)
     Waits for a window to show. Wait for the index+1'th window to show that is both owned by the java.awt.Window o and that meets the criteria defined and applied by the ComponentChooser parameter.
Parameters:
  o - The owner window of all the windows to be searched.
Parameters:
  ch - A component chooser used to define and apply the search criteria.
Parameters:
  index - The ordinal index of the window in the set of currently displayedwindows with the proper window ownership and a suitable title.
public  WindowwaitWindow(Window o, ComponentChooser ch)
     Waits for a window to show.


Constructor Detail
WindowWaiter
public WindowWaiter()(Code)
Constructor.




Method Detail
actionProduced
public Object actionProduced(Object obj)(Code)
Action producer--get a window. Get a window. The search uses constraints on window ownership, ordinal index, and search criteria defined by an instance of org.netbeans.jemmy.ComponentChooser.
Parameters:
  obj - Not used. the window waited upon. If a window cannot be foundthen a null reference is returned.
See Also:   org.netbeans.jemmy.Action



getActionProducedMessage
protected String getActionProducedMessage(long timeSpent, Object result)(Code)
Overrides Waiter.getActionProducedMessage.
See Also:   org.netbeans.jemmy.Waiter.getActionProducedMessage(longObject)
Parameters:
  timeSpent - time from waiting start (milliseconds)
Parameters:
  result - result of Waitable.actionproduced method. a message.



getComponentChooser
protected ComponentChooser getComponentChooser()(Code)
Method can be used by a subclass to define chooser. a chooser specifying searching criteria.
See Also:   WindowWaiter.setComponentChooser



getDescription
public String getDescription()(Code)



getGoldenActionProducedMessage
protected String getGoldenActionProducedMessage()(Code)
a message.
See Also:   org.netbeans.jemmy.Waiter.getGoldenActionProducedMessage



getGoldenTimeoutExpiredMessage
protected String getGoldenTimeoutExpiredMessage()(Code)
a message.
See Also:   org.netbeans.jemmy.Waiter.getGoldenTimeoutExpiredMessage



getGoldenWaitingStartedMessage
protected String getGoldenWaitingStartedMessage()(Code)
a message.
See Also:   org.netbeans.jemmy.Waiter.getGoldenWaitingStartedMessage



getOwner
protected Window getOwner()(Code)
Method can be used by a subclass to define window owner. Window-owner of the set of windows.
See Also:   WindowWaiter.setOwner



getTimeoutExpiredMessage
protected String getTimeoutExpiredMessage(long timeSpent)(Code)
Overrides Waiter.getTimeoutExpiredMessage.
See Also:   org.netbeans.jemmy.Waiter.getTimeoutExpiredMessage(long)
Parameters:
  timeSpent - time from waiting start (milliseconds) a message.



getTimeouts
public Timeouts getTimeouts()(Code)
Return current timeouts. the collection of current timeout assignments.
See Also:   org.netbeans.jemmy.Timeoutable
See Also:   org.netbeans.jemmy.Timeouts
See Also:   WindowWaiter.setTimeouts



getWaitingStartedMessage
protected String getWaitingStartedMessage()(Code)

See Also:   org.netbeans.jemmy.Waiter.getWaitingStartedMessage



getWindow
public static Window getWindow(Window owner, ComponentChooser cc, int index)(Code)
Searches for a window. The search proceeds among the currently showing windows for the index+1'th window that is both owned by the java.awt.Window owner and that meets the criteria defined and applied by the ComponentChooser parameter.
Parameters:
  owner - The owner window of all the windows to be searched.
Parameters:
  cc - A component chooser used to define and apply the search criteria.
Parameters:
  index - The ordinal index of the window in the set of currently displayedwindows with the proper window ownership and a suitable title. The firstindex is 0. a reference to the index+1'th window that is showing,has the proper window ownership, and that meets the search criteria.If there are fewer than index+1 windows, a nullreference is returned.



getWindow
public static Window getWindow(Window owner, ComponentChooser cc)(Code)
Searches for a window. Search among the currently showing windows for the first that is both owned by the java.awt.Window owner and that meets the search criteria applied by the ComponentChooser parameter.
Parameters:
  owner - The owner window of the windows to be searched.
Parameters:
  cc - A component chooser used to define and apply the search criteria. a reference to the first window that is showing, has a properowner window, and that meets the search criteria. If no such windowcan be found, a null reference is returned.



getWindow
public static Window getWindow(ComponentChooser cc, int index)(Code)
Searches for a window. The search proceeds among the currently showing windows for the index+1'th window that meets the criteria defined and applied by the ComonentChooser parameter.
Parameters:
  cc - A component chooser used to define and apply the search criteria.
Parameters:
  index - The ordinal index of the window in the set of currently displayedwindows. The first index is 0. a reference to the index+1'th window that is showingand that meets the search criteria. If there are fewer thanindex+1 windows, a null reference is returned.



getWindow
public static Window getWindow(ComponentChooser cc)(Code)
Searches for a window. Search among the currently showing windows for one that meets the search criteria applied by the ComponentChooser parameter.
Parameters:
  cc - A component chooser used to define and apply the search criteria. a reference to the first window that is showing and thatmeets the search criteria. If no such window can be found, anull reference is returned.



setComponentChooser
protected void setComponentChooser(ComponentChooser ch)(Code)
Method can be used by a subclass to define chooser.
Parameters:
  ch - a chooser specifying searching criteria.
See Also:   WindowWaiter.getComponentChooser



setOwner
protected void setOwner(Window owner)(Code)
Method can be used by a subclass to define window owner.
Parameters:
  owner - Window-owner of the set of windows.
See Also:   WindowWaiter.getOwner



setTimeouts
public void setTimeouts(Timeouts timeouts)(Code)
Defines current timeouts.
Parameters:
  timeouts - A collection of timeout assignments.
See Also:   org.netbeans.jemmy.Timeoutable
See Also:   org.netbeans.jemmy.Timeouts
See Also:   WindowWaiter.getTimeouts



waitWindow
public Window waitWindow(ComponentChooser ch, int index) throws InterruptedException(Code)
Waits for a window to show. Wait for the index+1'th window that meets the criteria defined and applied by the ComonentChooser parameter to show up.
Parameters:
  ch - A component chooser used to define and apply the search criteria.
Parameters:
  index - The ordinal index of the window in the set of currently displayedwindows. The first index is 0. a reference to the index+1'th window that showsand that meets the search criteria. If fewer thanindex+1 windows show up in the allotted time period thena null reference is returned.
throws:
  TimeoutExpiredException -
See Also:   WindowWaiter.actionProduced(Object)
exception:
  InterruptedException -



waitWindow
public Window waitWindow(ComponentChooser ch) throws InterruptedException(Code)
Waits for a window to show. Wait for a window that meets the search criteria applied by the ComponentChooser parameter to show up.
Parameters:
  ch - A component chooser used to define and apply the search criteria. a reference to the first window that shows and thatmeets the search criteria. If no such window can be found within thetime period allotted, a null reference is returned.
throws:
  TimeoutExpiredException -
See Also:   WindowWaiter.actionProduced(Object)
exception:
  InterruptedException -



waitWindow
public Window waitWindow(Window o, ComponentChooser ch, int index) throws InterruptedException(Code)
Waits for a window to show. Wait for the index+1'th window to show that is both owned by the java.awt.Window o and that meets the criteria defined and applied by the ComponentChooser parameter.
Parameters:
  o - The owner window of all the windows to be searched.
Parameters:
  ch - A component chooser used to define and apply the search criteria.
Parameters:
  index - The ordinal index of the window in the set of currently displayedwindows with the proper window ownership and a suitable title. The firstindex is 0. a reference to the index+1'th window to show thathas the proper window ownership, and that meets the search criteria.If there are fewer than index+1 windows, a nullreference is returned.
throws:
  TimeoutExpiredException -
See Also:   WindowWaiter.actionProduced(Object)
exception:
  InterruptedException -



waitWindow
public Window waitWindow(Window o, ComponentChooser ch) throws InterruptedException(Code)
Waits for a window to show. Wait for the first window to show that is both owned by the java.awt.Window o and that meets the criteria defined and applied by the ComponentChooser parameter.
Parameters:
  o - The owner window of all the windows to be searched.
Parameters:
  ch - A component chooser used to define and apply the search criteria. a reference to the first window to show thathas the proper window ownership, and that meets the search criteria.If there is no such window, a null reference is returned.
throws:
  TimeoutExpiredException -
See Also:   WindowWaiter.actionProduced(Object)
exception:
  InterruptedException -



Methods inherited from org.netbeans.jemmy.Waiter
public Object actionProduced(Object obj)(Code)(Java Doc)
protected String getActionProducedMessage(long timeSpent, Object result)(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
protected String getGoldenActionProducedMessage()(Code)(Java Doc)
protected String getGoldenTimeoutExpiredMessage()(Code)(Java Doc)
protected String getGoldenWaitingStartedMessage()(Code)(Java Doc)
public TestOut getOutput()(Code)(Java Doc)
protected String getTimeoutExpiredMessage(long timeSpent)(Code)(Java Doc)
public Timeouts getTimeouts()(Code)(Java Doc)
protected String getWaitingStartedMessage()(Code)(Java Doc)
public void setOutput(TestOut out)(Code)(Java Doc)
public void setTimeouts(Timeouts timeouts)(Code)(Java Doc)
protected long timeFromStart()(Code)(Java Doc)
public Object waitAction(Object waitableObject) throws InterruptedException(Code)(Java Doc)

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.