|
@@ -75,8 +75,7 @@ import org.openide.util.NbPreferences;
|
|
import org.openide.util.lookup.Lookups;
|
|
import org.openide.util.lookup.Lookups;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * <p/> <p/> <p/> <p/>
|
|
|
|
- * <p/>
|
|
|
|
|
|
+ *
|
|
* @author normenhansen
|
|
* @author normenhansen
|
|
*/
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
@@ -115,6 +114,7 @@ public class SceneApplication extends Application implements LookupProvider {
|
|
private ViewPort overlayView;
|
|
private ViewPort overlayView;
|
|
boolean useCanvas = false;
|
|
boolean useCanvas = false;
|
|
private BulletAppState physicsState;
|
|
private BulletAppState physicsState;
|
|
|
|
+ private Thread thread;
|
|
|
|
|
|
public SceneApplication() {
|
|
public SceneApplication() {
|
|
progressHandle.start(7);
|
|
progressHandle.start(7);
|
|
@@ -200,6 +200,7 @@ public class SceneApplication extends Application implements LookupProvider {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void initialize() {
|
|
public void initialize() {
|
|
|
|
+ thread = Thread.currentThread();
|
|
try {
|
|
try {
|
|
super.initialize();
|
|
super.initialize();
|
|
{
|
|
{
|
|
@@ -600,4 +601,12 @@ public class SceneApplication extends Application implements LookupProvider {
|
|
public void setActiveCameraController(AbstractCameraController activeCamController) {
|
|
public void setActiveCameraController(AbstractCameraController activeCamController) {
|
|
this.activeCamController = activeCamController;
|
|
this.activeCamController = activeCamController;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean isOgl() {
|
|
|
|
+ return Thread.currentThread() == thread;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public boolean isAwt() {
|
|
|
|
+ return java.awt.EventQueue.isDispatchThread();
|
|
|
|
+ }
|
|
}
|
|
}
|