UIThreadSupportWrapper.java
/*
* Copyright © 2011 Nokia Corporation. All rights reserved.
* Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation.
* Oracle and Java are trademarks or registered trademarks of Oracle and/or its
* affiliates. Other product and company names mentioned herein may be trademarks
* or trade names of their respective owners.
* See LICENSE.TXT for license information.
*/
package com.nokia.example.moviebooking;
import org.eclipse.ercp.swt.midp.UIThreadSupport;
/**
* <p>
* A wrapper for org.eclipse.ercp.swt.midp.UIThreadSupport.
* </p><p>
* This class can be compiled using an SDK where UIThreadSupport is available
* and then distributed as a class file with a MIDlet. This enables the same
* MIDlet to run on platforms that require the use of UIThreadSupport and on
* those that don't have it. This can be achieved by checking at runtime if
* the UIThreadSupport class is available then using through this wrapper to
* avoid compilation time dependency to it.
* </p>
*/
public class UIThreadSupportWrapper {
public static void startInUIThread(Runnable r) {
UIThreadSupport.startInUIThread(r);
}
}