diff options
author | Sven Gothel <[email protected]> | 2014-04-01 16:46:29 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-04-01 16:46:29 +0200 |
commit | 6f5686696b1e9085a759774056c7be9887a9e34f (patch) | |
tree | 273eb4f75ebdcd8acc091945fb2a0ab825bb71e0 /src/nativewindow | |
parent | b935d5248aef79e2386a284b32f5888348a382d6 (diff) | |
parent | d6d9db6334193ec1cf3c1f00b2a9e154a15d779f (diff) |
Merge branch 'master' into graph-wip
Diffstat (limited to 'src/nativewindow')
6 files changed, 15 insertions, 16 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java index a7fa53577..d72eabb02 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java @@ -48,9 +48,9 @@ import javax.media.nativewindow.AbstractGraphicsDevice; /** A wrapper for an AWT GraphicsDevice allowing it to be handled in a toolkit-independent manner. */ public class AWTGraphicsDevice extends DefaultGraphicsDevice implements Cloneable { - private GraphicsDevice device; + private final GraphicsDevice device; - public AWTGraphicsDevice(GraphicsDevice device, int unitID) { + public AWTGraphicsDevice(final GraphicsDevice device, final int unitID) { super(NativeWindowFactory.TYPE_AWT, device.getIDstring(), unitID); this.device = device; } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java index 6dc52a702..ffcbb8626 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java @@ -73,7 +73,7 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl this.eglLifecycleCallback = null; } - public EGLGraphicsDevice(long nativeDisplayID, long eglDisplay, String connection, int unitID, EGLDisplayLifecycleCallback eglLifecycleCallback) { + public EGLGraphicsDevice(final long nativeDisplayID, final long eglDisplay, final String connection, final int unitID, final EGLDisplayLifecycleCallback eglLifecycleCallback) { super(NativeWindowFactory.TYPE_EGL, connection, unitID, eglDisplay); this.nativeDisplayID[0] = nativeDisplayID; this.eglLifecycleCallback = eglLifecycleCallback; diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java index 99ca006fa..ff149447e 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java @@ -39,7 +39,7 @@ import javax.media.nativewindow.*; public class MacOSXGraphicsDevice extends DefaultGraphicsDevice implements Cloneable { /** Constructs a new MacOSXGraphicsDevice */ - public MacOSXGraphicsDevice(int unitID) { + public MacOSXGraphicsDevice(final int unitID) { super(NativeWindowFactory.TYPE_MACOSX, AbstractGraphicsDevice.DEFAULT_CONNECTION, unitID); } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java index 643982715..ef0cbddd7 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java @@ -39,11 +39,11 @@ import javax.media.nativewindow.*; */ public class WindowsGraphicsDevice extends DefaultGraphicsDevice implements Cloneable { /** Constructs a new WindowsGraphicsDevice */ - public WindowsGraphicsDevice(int unitID) { + public WindowsGraphicsDevice(final int unitID) { this(AbstractGraphicsDevice.DEFAULT_CONNECTION, unitID); } - public WindowsGraphicsDevice(String connection, int unitID) { + public WindowsGraphicsDevice(final String connection, final int unitID) { super(NativeWindowFactory.TYPE_WINDOWS, connection, unitID); } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java index 863e53bde..633b9eaf0 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java @@ -54,7 +54,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl * This constructor exist to setup a default device connection. * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int) */ - public X11GraphicsDevice(String connection, int unitID) { + public X11GraphicsDevice(final String connection, final int unitID) { super(NativeWindowFactory.TYPE_X11, connection, unitID); handleOwner = false; isXineramaEnabled = false; @@ -64,7 +64,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl * {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#getDefaultToolkitLock(String, long)}. * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long) */ - public X11GraphicsDevice(long display, int unitID, boolean owner) { + public X11GraphicsDevice(final long display, final int unitID, final boolean owner) { this(display, unitID, NativeWindowFactory.getDefaultToolkitLock(NativeWindowFactory.TYPE_X11, display), owner); } @@ -73,7 +73,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl * @param locker custom {@link javax.media.nativewindow.ToolkitLock}, eg to force null locking w/ private connection * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long, ToolkitLock) */ - public X11GraphicsDevice(long display, int unitID, ToolkitLock locker, boolean owner) { + public X11GraphicsDevice(final long display, final int unitID, final ToolkitLock locker, final boolean owner) { super(NativeWindowFactory.TYPE_X11, X11Lib.XDisplayString(display), unitID, display, locker); if(0==display) { throw new NativeWindowException("null display"); @@ -91,7 +91,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl * @param locker custom {@link javax.media.nativewindow.ToolkitLock}, eg to force null locking w/ private connection * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long, ToolkitLock) */ - public X11GraphicsDevice(String displayConnection, int unitID, ToolkitLock locker) { + public X11GraphicsDevice(final String displayConnection, final int unitID, final ToolkitLock locker) { super(NativeWindowFactory.TYPE_X11, displayConnection, unitID, 0, locker); handleOwner = true; open(); diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java index 15ff2b1ac..f733f91de 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java @@ -49,7 +49,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice * gathered via {@link NativeWindowFactory#getDefaultToolkitLock(String)}. * @param type */ - public DefaultGraphicsDevice(String type, String connection, int unitID) { + public DefaultGraphicsDevice(final String type, final String connection, final int unitID) { this(type, connection, unitID, 0, NativeWindowFactory.getDefaultToolkitLock(type)); } @@ -59,7 +59,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice * @param type * @param handle */ - public DefaultGraphicsDevice(String type, String connection, int unitID, long handle) { + public DefaultGraphicsDevice(final String type, final String connection, final int unitID, final long handle) { this(type, connection, unitID, handle, NativeWindowFactory.getDefaultToolkitLock(type, handle)); } @@ -69,7 +69,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice * @param handle * @param locker if null, a non blocking <i>null</i> lock is used. */ - public DefaultGraphicsDevice(String type, String connection, int unitID, long handle, ToolkitLock locker) { + public DefaultGraphicsDevice(final String type, final String connection, final int unitID, final long handle, final ToolkitLock locker) { this.type = type; this.connection = connection; this.unitID = unitID; @@ -247,8 +247,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice * Returns a unique String object using {@link String#intern()} for the given arguments, * which object reference itself can be used as a key. */ - private static String getUniqueID(String type, String connection, int unitID) { - final String r = (type + separator + connection + separator + unitID).intern(); - return r.intern(); + private static String getUniqueID(final String type, final String connection, final int unitID) { + return (type + separator + connection + separator + unitID).intern(); } } |