org.eclipse.actf.ui.util.timer
Class Yield

java.lang.Object
  extended by org.eclipse.actf.ui.util.timer.Yield

public class Yield
extends Object

Utility class for thread execution related to Display.


Constructor Summary
Yield()
           
 
Method Summary
static void forWhile(int duration)
          Call readAndDispatch method of the current Display while the specified duration
static void initialize()
          Initialize method of this utility.
static void once()
          Call readAndDispatch method of the current Display.
static Object syncInvoke(Method m, Object o, Object[] args)
          Invoke method (m.invoke(o, args)) by using syncExec method of current Display.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Yield

public Yield()
Method Detail

initialize

public static void initialize()
Initialize method of this utility.


syncInvoke

public static Object syncInvoke(Method m,
                                Object o,
                                Object[] args)
                         throws Exception
Invoke method (m.invoke(o, args)) by using syncExec method of current Display.

Parameters:
m - target Method
o - target Object
args - target arguments
Returns:
resulting Object of the target method
Throws:
{@link - Exception}
Exception
See Also:
Display

forWhile

public static void forWhile(int duration)
Call readAndDispatch method of the current Display while the specified duration

Parameters:
duration - target duration in msec

once

public static void once()
Call readAndDispatch method of the current Display.

See Also:
Display