org.iids.aos.util
Class SwingUtil

java.lang.Object
  extended by org.iids.aos.util.SwingUtil

public class SwingUtil
extends java.lang.Object

Author:
rjtimmer

Constructor Summary
SwingUtil()
           
 
Method Summary
static boolean awtThreadInvokeLater(java.lang.Runnable r)
          Invoke runnable in the event dispatcher thread.
static boolean awtThreadInvokeNow(java.lang.Runnable r)
          Invoke & wait in the event dispatcher thread.
static void nonAwtThreadInvokeLater(java.lang.Runnable r)
          Invokes a Runnable in a different thread than the event dispatcher thread.
static void nonAwtThreadInvokeNow(java.lang.Runnable r)
          Deprecated. No sense in using this method, as it blocks the event dispatcher anyway (even though it uses a non-awt thread, it still waits for it..)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUtil

public SwingUtil()
Method Detail

awtThreadInvokeNow

public static boolean awtThreadInvokeNow(java.lang.Runnable r)
Invoke & wait in the event dispatcher thread. Returns only after the runnable was completed.

Parameters:
r - The Runnable to execute.

awtThreadInvokeLater

public static boolean awtThreadInvokeLater(java.lang.Runnable r)
Invoke runnable in the event dispatcher thread. Returns immediately. The Runnable is invoked sometime in the future.

Parameters:
r - The Runnable to execute.

nonAwtThreadInvokeNow

@Deprecated
public static void nonAwtThreadInvokeNow(java.lang.Runnable r)
Deprecated. No sense in using this method, as it blocks the event dispatcher anyway (even though it uses a non-awt thread, it still waits for it..)

Invoke a runnable in a non-AWT thread. Blocking, so this method will return only after the Runnable.run() method finished.

If the current thread is the event dispatcher thread then a new thread is created for the Runnable. Otherwise the current thread runs it.


nonAwtThreadInvokeLater

public static void nonAwtThreadInvokeLater(java.lang.Runnable r)
Invokes a Runnable in a different thread than the event dispatcher thread. Returns immediately, the runnable is executed sometime in the future.



Copyright © 2003, 2004 IIDS Group. All Rights Reserved.