ilog.mt
Class IlSwingThreadSyncStrategy

java.lang.Object
  extended by ilog.mt.IlSynchronizationStrategy
      extended by 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

Field Summary
 
Fields inherited from class ilog.mt.IlSynchronizationStrategy
DEFAULT_PROPERTY
 
Constructor Summary
IlSwingThreadSyncStrategy()
           
 
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 ilog.mt.IlSynchronizationStrategy
GetDefault, readLock, SetDefault, writeLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlSwingThreadSyncStrategy

public IlSwingThreadSyncStrategy()
Method Detail

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 called
lock - 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.