1 2 package org.apache.directory.ldapstudio.browser.common;3 4 import org.apache.directory.ldapstudio.browser.core.events.EventRunnable;5 import org.apache.directory.ldapstudio.browser.core.events.EventRunner;6 import org.eclipse.swt.widgets.Display;7 8 9 /**10 * Implementation of {@link EventRunner} that executes an {@link EventRunnable}11 * withing the SWT UI thread.12 *13 * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>14 * @version $Rev$, $Date$15 */16 public class UiThreadEventRunner implements EventRunner17 {18 19 /**20 * {@inheritDoc}21 *22 * This implementation executes the given {@link EventRunnable} within23 * the SWT UI thread.24 */25 public void execute( EventRunnable runnable )26 {27 Display.getDefault().asyncExec( runnable );28 }29 30 }31