org.eclipse.actf.model.ui.editor.browser
Class WaitForBrowserReadyHandler

java.lang.Object
  extended by org.eclipse.actf.model.ui.editor.browser.WaitForBrowserReadyHandler
All Implemented Interfaces:
Runnable, WaitExecSyncEventHandler

public class WaitForBrowserReadyHandler
extends Object
implements WaitExecSyncEventHandler

Utility class to register Runnable to IWebBrowserACTF. The Runnable will be invoked when the IWebBrowserACTF becomes ready.

See Also:
WaitExecSyncEventListener

Field Summary
static double INTERVAL
           
 
Constructor Summary
WaitForBrowserReadyHandler(IWebBrowserACTF browser, double timeout, boolean waitActive, Runnable runnable)
          Constructor of the class
 
Method Summary
 boolean canRun(double elapsed)
          Check if action can be executed right now
 double getInterval()
          Get scheduling interval in second
 void run()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERVAL

public static double INTERVAL
Constructor Detail

WaitForBrowserReadyHandler

public WaitForBrowserReadyHandler(IWebBrowserACTF browser,
                                  double timeout,
                                  boolean waitActive,
                                  Runnable runnable)
Constructor of the class

Parameters:
browser - target IWebBrowserACTF
timeout - timeout value
waitActive - if true, wait Shell becomes active
runnable - target Runnable to invoke
Method Detail

getInterval

public double getInterval()
Description copied from interface: WaitExecSyncEventHandler
Get scheduling interval in second

Specified by:
getInterval in interface WaitExecSyncEventHandler
Returns:
scheduling interval in second

canRun

public boolean canRun(double elapsed)
Description copied from interface: WaitExecSyncEventHandler
Check if action can be executed right now

Specified by:
canRun in interface WaitExecSyncEventHandler
Parameters:
elapsed - elapsed time
Returns:
true if run method can be executed

run

public void run()
Specified by:
run in interface Runnable