public class SwingGUISynchronizer extends Object implements GUISynchronizer
The Swing specific implementation of the GUISynchronizer
interface.
This implementation makes uses of java.awt.EventQueue
to
properly deal with the event dispatch thread.
Constructor and Description |
---|
SwingGUISynchronizer() |
Modifier and Type | Method and Description |
---|---|
void |
asyncInvoke(Runnable runnable)
Invokes the given runnable asynchronously on the event dispatch thread.
|
boolean |
isEventDispatchThread()
Tests if the current thread is the event dispatch thread.
|
void |
syncInvoke(Runnable runnable)
Invokes the given runnable synchronously on the event dispatch thread.
|
public void asyncInvoke(Runnable runnable)
java.awt.EventQueue
class.asyncInvoke
in interface GUISynchronizer
runnable
- the runnable to be executedpublic void syncInvoke(Runnable runnable)
java.awt.EventQueue
class. It will
cause no harm if this method is invoked from the event dispatch thread;
then the runnable will be directly called.syncInvoke
in interface GUISynchronizer
runnable
- the runnable to be executedpublic boolean isEventDispatchThread()
isEventDispatchThread
in interface GUISynchronizer
Copyright © 2016 The JGUIraffe Team. All rights reserved.