summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-04 23:07:27 +0100
committerSven Gothel <[email protected]>2012-03-04 23:07:27 +0100
commitb2c309aab9be8c02d454c8e36cc3976f9c4b3584 (patch)
treed68cd69c280fc8ca9e3f9af03c005adb62207bd4 /src/newt/classes
parenta0177c8a1048683e5d43f4712f8f9e37091d4e85 (diff)
NewtFactory: Since the platform string references are unique, let's just compare the references instead of a string compare
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java2
-rw-r--r--src/newt/classes/jogamp/newt/DisplayImpl.java12
-rw-r--r--src/newt/classes/jogamp/newt/ScreenImpl.java12
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java12
4 files changed, 18 insertions, 20 deletions
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index 4e6fa1aa5..f551fcc83 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -46,8 +46,6 @@ import jogamp.newt.DisplayImpl;
import jogamp.newt.ScreenImpl;
import jogamp.newt.WindowImpl;
-import com.jogamp.common.os.Platform;
-
public class NewtFactory {
public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java
index 908a44ea2..f2f35135a 100644
--- a/src/newt/classes/jogamp/newt/DisplayImpl.java
+++ b/src/newt/classes/jogamp/newt/DisplayImpl.java
@@ -54,17 +54,17 @@ public abstract class DisplayImpl extends Display {
{
Class<?> displayClass = NewtFactory.getCustomClass(type, "Display");
if(null==displayClass) {
- if (NativeWindowFactory.TYPE_ANDROID.equals(type)) {
+ if (NativeWindowFactory.TYPE_ANDROID == type) {
displayClass = Class.forName("jogamp.newt.driver.android.AndroidDisplay");
- } else if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_EGL == type) {
displayClass = Class.forName("jogamp.newt.driver.kd.KDDisplay");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_WINDOWS == type) {
displayClass = Class.forName("jogamp.newt.driver.windows.WindowsDisplay");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_MACOSX == type) {
displayClass = Class.forName("jogamp.newt.driver.macosx.MacDisplay");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_X11 == type) {
displayClass = Class.forName("jogamp.newt.driver.x11.X11Display");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_AWT == type) {
displayClass = Class.forName("jogamp.newt.driver.awt.AWTDisplay");
} else {
throw new RuntimeException("Unknown display type \"" + type + "\"");
diff --git a/src/newt/classes/jogamp/newt/ScreenImpl.java b/src/newt/classes/jogamp/newt/ScreenImpl.java
index ea103025e..d4c6b6ee0 100644
--- a/src/newt/classes/jogamp/newt/ScreenImpl.java
+++ b/src/newt/classes/jogamp/newt/ScreenImpl.java
@@ -96,17 +96,17 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
{
Class<?> screenClass = NewtFactory.getCustomClass(type, "Screen");
if(null==screenClass) {
- if (NativeWindowFactory.TYPE_ANDROID.equals(type)) {
+ if (NativeWindowFactory.TYPE_ANDROID == type) {
screenClass = Class.forName("jogamp.newt.driver.android.AndroidScreen");
- } else if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_EGL == type) {
screenClass = Class.forName("jogamp.newt.driver.kd.KDScreen");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_WINDOWS == type) {
screenClass = Class.forName("jogamp.newt.driver.windows.WindowsScreen");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_MACOSX == type) {
screenClass = Class.forName("jogamp.newt.driver.macosx.MacScreen");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_X11 == type) {
screenClass = Class.forName("jogamp.newt.driver.x11.X11Screen");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_AWT == type) {
screenClass = Class.forName("jogamp.newt.driver.awt.AWTScreen");
} else {
throw new RuntimeException("Unknown window type \"" + type + "\"");
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 62e42c185..d7382e0ea 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -158,17 +158,17 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
{
Class<?> windowClass = NewtFactory.getCustomClass(type, "Window");
if(null==windowClass) {
- if (NativeWindowFactory.TYPE_ANDROID.equals(type)) {
+ if (NativeWindowFactory.TYPE_ANDROID == type) {
windowClass = Class.forName("jogamp.newt.driver.android.AndroidWindow");
- } else if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_EGL == type) {
windowClass = Class.forName("jogamp.newt.driver.kd.KDWindow");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_WINDOWS == type) {
windowClass = Class.forName("jogamp.newt.driver.windows.WindowsWindow");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_MACOSX == type) {
windowClass = Class.forName("jogamp.newt.driver.macosx.MacWindow");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_X11 == type) {
windowClass = Class.forName("jogamp.newt.driver.x11.X11Window");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
+ } else if (NativeWindowFactory.TYPE_AWT == type) {
windowClass = Class.forName("jogamp.newt.driver.awt.AWTWindow");
} else {
throw new NativeWindowException("Unknown window type \"" + type + "\"");