Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.swt.widgets
Class Synchronizer

java.lang.Object
  extended by 
org.eclipse.swt.widgets.Synchronizer

public class Synchronizer
extends Object

Instances of this class provide synchronization support for displays. A default instance is created automatically for each display, and this instance is sufficient for almost all applications.

IMPORTANT: Typical application code never needs to deal with this class. It is provided only to allow applications which require non-standard synchronization behavior to plug in the support they require. Subclasses which override the methods in this class must ensure that the superclass methods are invoked in their implementations

See Also:
Display.setSynchronizer(org.eclipse.swt.widgets.Synchronizer), Sample code and further information

Constructor Summary
Synchronizer ( Display display)
          Constructs a new instance of this class.
 
Method Summary
protected  void asyncExec ( Runnable runnable)
          Causes the run() method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity.
protected  void syncExec ( Runnable runnable)
          Causes the run() method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Synchronizer

public Synchronizer(
Display display)
Constructs a new instance of this class.

Parameters:
display - the display to create the synchronizer on
Method Detail

asyncExec

protected void asyncExec(
Runnable runnable)
Causes the run() method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity. The caller of this method continues to run in parallel, and is not notified when the runnable has completed.

Parameters:
runnable - code to run on the user-interface thread.
See Also:
syncExec(java.lang.Runnable)

syncExec

protected void syncExec(
Runnable runnable)
Causes the run() method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity. The thread which calls this method is suspended until the runnable completes.

Parameters:
runnable - code to run on the user-interface thread.
Throws:
SWTException -
  • ERROR_FAILED_EXEC - if an exception occurred when executing the runnable
See Also:
asyncExec(java.lang.Runnable)

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire