summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-26 15:16:34 +0200
committerSven Gothel <[email protected]>2012-03-26 15:16:34 +0200
commite9e61421ef6009e6788998c471d1d3d30aaefea6 (patch)
tree4f27d46398b5c00f5d27985308f1e2b86dcf7fdb /src/java/com/jogamp/common/os/DynamicLibraryBundle.java
parente2abb9583faf4b3dac6094fcd311475777528b8e (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-xsrc/java/com/jogamp/common/os/DynamicLibraryBundle.java12
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) {