ilog.mt
Class IlSwingThreadSyncStrategy
java.lang.Object
ilog.mt.IlSynchronizationStrategy
ilog.mt.IlSwingThreadSyncStrategy
public class IlSwingThreadSyncStrategy
- extends IlSynchronizationStrategy
This class is an implementation of the IlSynchronizationStrategy
abstract class.
It uses the Swing event thread to provide synchronization.
- Since:
- JTGO 3.0
|
Method Summary |
boolean |
isInTargetThread()
Returns true if currently executing in the Swing/AWT thread. |
boolean |
synchronizeRun(Runnable runnable,
Object lock)
The runnable parameter is passed to SwingUtilities.invokeLater
if the current thread is not the Swing event thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IlSwingThreadSyncStrategy
public IlSwingThreadSyncStrategy()
synchronizeRun
public boolean synchronizeRun(Runnable runnable,
Object lock)
- The runnable parameter is passed to SwingUtilities.invokeLater
if the current thread is not the Swing event thread.
The lock parameter is ignored.
- Specified by:
synchronizeRun in class IlSynchronizationStrategy
- Parameters:
runnable - The Runnable object on which the run method will be calledlock - This object may be used as the object to synchronize on
- Returns:
false if the operation fails for any reason.- See Also:
SwingUtilities.invokeLater(Runnable)
isInTargetThread
public boolean isInTargetThread()
- Returns
true if currently executing in the Swing/AWT thread.
- Overrides:
isInTargetThread in class IlSynchronizationStrategy
Copyright © 1996-2007 ILOG S.A. All rights reserved. Documentation homepage. . All Rights Reserved.