diff options
author | Sven Gothel <[email protected]> | 2012-03-26 15:16:34 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-03-26 15:16:34 +0200 |
commit | e9e61421ef6009e6788998c471d1d3d30aaefea6 (patch) | |
tree | 4f27d46398b5c00f5d27985308f1e2b86dcf7fdb /src/java/com/jogamp/common/os/DynamicLibraryBundle.java | |
parent | e2abb9583faf4b3dac6094fcd311475777528b8e (diff) |
Platform: Add AWT_AVAILABLE 'knowledge'; RunnableExecutor: Add AWTEDT impl. / API doc cleanup; DynamicLibraryBundle: Add getDefaultRunnableExecutor()
Diffstat (limited to 'src/java/com/jogamp/common/os/DynamicLibraryBundle.java')
-rwxr-xr-x | src/java/com/jogamp/common/os/DynamicLibraryBundle.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java index efb6d89..b86a701 100755 --- a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java +++ b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java @@ -33,7 +33,10 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; +import jogamp.common.awt.AWTEDTExecutor; + import com.jogamp.common.jvm.JNILibLoaderBase; +import com.jogamp.common.util.RunnableExecutor; /** * Provides bundling of:<br> @@ -69,6 +72,15 @@ public class DynamicLibraryBundle implements DynamicLookupHelper { private HashSet<String> toolGetProcAddressFuncNameSet; private List<String> toolGetProcAddressFuncNameList; + /** Returns an AWT-EDT {@link RunnableExecutor} implementation if AWT is available, otherwise {@link RunnableExecutor#currentThreadExecutor}. */ + public static RunnableExecutor getDefaultRunnableExecutor() { + if(Platform.AWT_AVAILABLE) { + return AWTEDTExecutor.singleton; + } else { + return RunnableExecutor.currentThreadExecutor; + } + } + /** Instantiates and loads all {@link NativeLibrary}s incl. JNI libraries. */ public DynamicLibraryBundle(DynamicLibraryBundleInfo info) { if(null==info) { |