aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
committerSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
commit556d92b63555a085b25e32b1cd55afce24edd07a (patch)
tree6be2b02c62a77d5aba81ffbe34c46960608be163 /src/nativewindow/classes/com
parenta90f4a51dffec3247278e3c683ed4462b1dd9ab5 (diff)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
Diffstat (limited to 'src/nativewindow/classes/com')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java6
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java10
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java8
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java12
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java6
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java28
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java2
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java18
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java10
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java6
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java26
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java53
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java2
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java68
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsConfiguration.java8
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java4
19 files changed, 140 insertions, 139 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java b/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java
index 7ae614158..e785af788 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java
@@ -11,20 +11,20 @@ public class DelegatedUpstreamSurfaceHookMutableSize extends UpstreamSurfaceHook
* @param width initial width
* @param height initial height
*/
- public DelegatedUpstreamSurfaceHookMutableSize(UpstreamSurfaceHook upstream, int width, int height) {
+ public DelegatedUpstreamSurfaceHookMutableSize(final UpstreamSurfaceHook upstream, final int width, final int height) {
super(width, height);
this.upstream = upstream;
}
@Override
- public final void create(ProxySurface s) {
+ public final void create(final ProxySurface s) {
if(null != upstream) {
upstream.create(s);
}
}
@Override
- public final void destroy(ProxySurface s) {
+ public final void destroy(final ProxySurface s) {
if(null != upstream) {
upstream.destroy(s);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java b/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java
index 568ac20fa..abcc166cb 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java
@@ -12,7 +12,7 @@ public class DelegatedUpstreamSurfaceHookWithSurfaceSize implements UpstreamSurf
* @param upstream optional upstream UpstreamSurfaceHook used for {@link #create(ProxySurface)} and {@link #destroy(ProxySurface)}.
* @param surface mandatory {@link NativeSurface} used for {@link #getSurfaceWidth(ProxySurface)} and {@link #getSurfaceHeight(ProxySurface)}, not used for {@link #getUpstreamSurface()}.
*/
- public DelegatedUpstreamSurfaceHookWithSurfaceSize(UpstreamSurfaceHook upstream, NativeSurface surface) {
+ public DelegatedUpstreamSurfaceHookWithSurfaceSize(final UpstreamSurfaceHook upstream, final NativeSurface surface) {
this.upstream = upstream;
this.surface = surface;
if(null == surface) {
@@ -32,26 +32,26 @@ public class DelegatedUpstreamSurfaceHookWithSurfaceSize implements UpstreamSurf
}
@Override
- public final void create(ProxySurface s) {
+ public final void create(final ProxySurface s) {
if(null != upstream) {
upstream.create(s);
}
}
@Override
- public final void destroy(ProxySurface s) {
+ public final void destroy(final ProxySurface s) {
if(null != upstream) {
upstream.destroy(s);
}
}
@Override
- public final int getSurfaceWidth(ProxySurface s) {
+ public final int getSurfaceWidth(final ProxySurface s) {
return surface.getSurfaceWidth();
}
@Override
- public final int getSurfaceHeight(ProxySurface s) {
+ public final int getSurfaceHeight(final ProxySurface s) {
return surface.getSurfaceHeight();
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java b/src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java
index 8b8ccb191..a137d46c3 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java
@@ -32,18 +32,18 @@ import javax.media.nativewindow.CapabilitiesImmutable;
import javax.media.nativewindow.DefaultGraphicsConfiguration;
public class MutableGraphicsConfiguration extends DefaultGraphicsConfiguration {
- public MutableGraphicsConfiguration(AbstractGraphicsScreen screen,
- CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) {
+ public MutableGraphicsConfiguration(final AbstractGraphicsScreen screen,
+ final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested) {
super(screen, capsChosen, capsRequested);
}
@Override
- public void setChosenCapabilities(CapabilitiesImmutable caps) {
+ public void setChosenCapabilities(final CapabilitiesImmutable caps) {
super.setChosenCapabilities(caps);
}
@Override
- public void setScreen(AbstractGraphicsScreen screen) {
+ public void setScreen(final AbstractGraphicsScreen screen) {
super.setScreen(screen);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java
index a8dd9165c..7c1a88e6a 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java
@@ -38,7 +38,7 @@ public class NativeWindowVersion extends JogampVersion {
protected static volatile NativeWindowVersion jogampCommonVersionInfo;
- protected NativeWindowVersion(String packageName, Manifest mf) {
+ protected NativeWindowVersion(final String packageName, final Manifest mf) {
super(packageName, mf);
}
@@ -56,7 +56,7 @@ public class NativeWindowVersion extends JogampVersion {
return jogampCommonVersionInfo;
}
- public static void main(String args[]) {
+ public static void main(final String args[]) {
System.err.println(VersionUtil.getPlatformInfo());
System.err.println(GlueGenVersion.getInstance());
System.err.println(NativeWindowVersion.getInstance());
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java
index eca64db37..45d12be5e 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java
@@ -11,31 +11,31 @@ public class UpstreamSurfaceHookMutableSize implements UpstreamSurfaceHook.Mutab
* @param width initial width
* @param height initial height
*/
- public UpstreamSurfaceHookMutableSize(int width, int height) {
+ public UpstreamSurfaceHookMutableSize(final int width, final int height) {
this.pixWidth = width;
this.pixHeight = height;
}
@Override
- public final void setSurfaceSize(int width, int height) {
+ public final void setSurfaceSize(final int width, final int height) {
this.pixWidth = width;
this.pixHeight = height;
}
@Override
- public final int getSurfaceWidth(ProxySurface s) {
+ public final int getSurfaceWidth(final ProxySurface s) {
return pixWidth;
}
@Override
- public final int getSurfaceHeight(ProxySurface s) {
+ public final int getSurfaceHeight(final ProxySurface s) {
return pixHeight;
}
@Override
- public void create(ProxySurface s) { /* nop */ }
+ public void create(final ProxySurface s) { /* nop */ }
@Override
- public void destroy(ProxySurface s) { /* nop */ }
+ public void destroy(final ProxySurface s) { /* nop */ }
@Override
public String toString() {
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java
index 5f9720a0e..b509f118a 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java
@@ -11,7 +11,7 @@ public class UpstreamWindowHookMutableSizePos extends UpstreamSurfaceHookMutable
* @param pixWidth initial surface pixel width, FIXME: pixel-dim == window-dim 'for now' ?
* @param pixHeight initial surface pixel height, FIXME: pixel-dim == window-dim 'for now' ?
*/
- public UpstreamWindowHookMutableSizePos(int winX, int winY, int winWidth, int winHeight, int pixWidth, int pixHeight) {
+ public UpstreamWindowHookMutableSizePos(final int winX, final int winY, final int winWidth, final int winHeight, final int pixWidth, final int pixHeight) {
super(pixWidth, pixHeight);
this.winX= winX;
this.winY= winY;
@@ -20,12 +20,12 @@ public class UpstreamWindowHookMutableSizePos extends UpstreamSurfaceHookMutable
}
// @Override
- public final void setWinPos(int winX, int winY) {
+ public final void setWinPos(final int winX, final int winY) {
this.winX= winX;
this.winY= winY;
}
// @Override
- public final void setWinSize(int winWidth, int winHeight) {
+ public final void setWinSize(final int winWidth, final int winHeight) {
this.winWidth= winWidth;
this.winHeight= winHeight;
// FIXME HiDPI: Use pixelScale ?!
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
index aa9b876dd..3a62825a2 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
@@ -54,19 +54,19 @@ import jogamp.nativewindow.Debug;
handled in a toolkit-independent manner. */
public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration implements Cloneable {
- private GraphicsConfiguration config;
+ private final GraphicsConfiguration config;
AbstractGraphicsConfiguration encapsulated;
- public AWTGraphicsConfiguration(AWTGraphicsScreen screen,
- CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
- GraphicsConfiguration config, AbstractGraphicsConfiguration encapsulated) {
+ public AWTGraphicsConfiguration(final AWTGraphicsScreen screen,
+ final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested,
+ final GraphicsConfiguration config, final AbstractGraphicsConfiguration encapsulated) {
super(screen, capsChosen, capsRequested);
this.config = config;
this.encapsulated=encapsulated;
}
- private AWTGraphicsConfiguration(AWTGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
- GraphicsConfiguration config) {
+ private AWTGraphicsConfiguration(final AWTGraphicsScreen screen, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested,
+ final GraphicsConfiguration config) {
super(screen, capsChosen, capsRequested);
this.config = config;
this.encapsulated=null;
@@ -78,7 +78,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
* Otherwise the <code>capsChosen</code> is used.
* @param capsRequested if null, default {@link Capabilities} are used, otherwise the given values.
*/
- public static AWTGraphicsConfiguration create(Component awtComp, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) {
+ public static AWTGraphicsConfiguration create(final Component awtComp, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) {
final GraphicsConfiguration awtGfxConfig = awtComp.getGraphicsConfiguration();
if(null==awtGfxConfig) {
throw new NativeWindowException("AWTGraphicsConfiguration.create: Null AWT GraphicsConfiguration @ "+awtComp);
@@ -96,7 +96,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
capsRequested = new Capabilities();
}
if(null==capsChosen) {
- GraphicsConfiguration gc = awtGraphicsDevice.getDefaultConfiguration();
+ final GraphicsConfiguration gc = awtGraphicsDevice.getDefaultConfiguration();
capsChosen = AWTGraphicsConfiguration.setupCapabilitiesRGBABits(capsRequested, gc);
}
final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(awtDevice, capsChosen);
@@ -110,7 +110,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
// open access to superclass method
@Override
- public void setChosenCapabilities(CapabilitiesImmutable capsChosen) {
+ public void setChosenCapabilities(final CapabilitiesImmutable capsChosen) {
super.setChosenCapabilities(capsChosen);
}
@@ -136,16 +136,16 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
* @param gc the GraphicsConfiguration from which to derive the RGBA bit depths
* @return the passed Capabilities
*/
- public static CapabilitiesImmutable setupCapabilitiesRGBABits(CapabilitiesImmutable capabilitiesIn, GraphicsConfiguration gc) {
- Capabilities capabilities = (Capabilities) capabilitiesIn.cloneMutable();
+ public static CapabilitiesImmutable setupCapabilitiesRGBABits(final CapabilitiesImmutable capabilitiesIn, final GraphicsConfiguration gc) {
+ final Capabilities capabilities = (Capabilities) capabilitiesIn.cloneMutable();
- ColorModel cm = gc.getColorModel();
+ final ColorModel cm = gc.getColorModel();
if(null==cm) {
throw new NativeWindowException("Could not determine AWT ColorModel");
}
- int cmBitsPerPixel = cm.getPixelSize();
+ final int cmBitsPerPixel = cm.getPixelSize();
int bitsPerPixel = 0;
- int[] bitesPerComponent = cm.getComponentSize();
+ final int[] bitesPerComponent = cm.getComponentSize();
if(bitesPerComponent.length>=3) {
capabilities.setRedBits(bitesPerComponent[0]);
bitsPerPixel += bitesPerComponent[0];
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
index d72eabb02..219f4bb92 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
@@ -56,7 +56,7 @@ public class AWTGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
}
public static AWTGraphicsDevice createDefault() {
- GraphicsDevice awtDevice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
+ final GraphicsDevice awtDevice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
return new AWTGraphicsDevice(awtDevice, AbstractGraphicsDevice.DEFAULT_UNIT);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
index 83d6efa75..6fc35f719 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
@@ -51,35 +51,35 @@ import javax.media.nativewindow.*;
public class AWTGraphicsScreen extends DefaultGraphicsScreen implements Cloneable {
- public AWTGraphicsScreen(AWTGraphicsDevice device) {
+ public AWTGraphicsScreen(final AWTGraphicsDevice device) {
super(device, findScreenIndex(device.getGraphicsDevice()));
}
- public static GraphicsDevice getScreenDevice(int index) {
+ public static GraphicsDevice getScreenDevice(final int index) {
if(index<0) return null;
- GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
- GraphicsDevice[] gs = ge.getScreenDevices();
+ final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+ final GraphicsDevice[] gs = ge.getScreenDevices();
if(index<gs.length) {
return gs[index];
}
return null;
}
- public static int findScreenIndex(GraphicsDevice awtDevice) {
+ public static int findScreenIndex(final GraphicsDevice awtDevice) {
if(null==awtDevice) return -1;
- GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
- GraphicsDevice[] gs = ge.getScreenDevices();
+ final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+ final GraphicsDevice[] gs = ge.getScreenDevices();
for (int j = 0; j < gs.length; j++) {
if(gs[j] == awtDevice) return j;
}
return -1;
}
- public static AbstractGraphicsScreen createScreenDevice(GraphicsDevice awtDevice, int unitID) {
+ public static AbstractGraphicsScreen createScreenDevice(final GraphicsDevice awtDevice, final int unitID) {
return new AWTGraphicsScreen(new AWTGraphicsDevice(awtDevice, unitID));
}
- public static AbstractGraphicsScreen createScreenDevice(int index, int unitID) {
+ public static AbstractGraphicsScreen createScreenDevice(final int index, final int unitID) {
return createScreenDevice(getScreenDevice(index), unitID);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java
index 44163fc73..b0a7fbc76 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java
@@ -120,7 +120,7 @@ public interface AWTPrintLifecycle {
* @param tileHeight custom tile height for {@link TileRenderer#setTileSize(int, int, int) tile renderer}, pass -1 for default.
* @return the context
*/
- public static Context setupPrint(Container c, double scaleMatX, double scaleMatY, int numSamples, int tileWidth, int tileHeight) {
+ public static Context setupPrint(final Container c, final double scaleMatX, final double scaleMatY, final int numSamples, final int tileWidth, final int tileHeight) {
final Context t = new Context(c, scaleMatX, scaleMatY, numSamples, tileWidth, tileHeight);
t.setupPrint(c);
return t;
@@ -150,16 +150,16 @@ public interface AWTPrintLifecycle {
private final AWTMisc.ComponentAction setupAction = new AWTMisc.ComponentAction() {
@Override
- public void run(Component c) {
+ public void run(final Component c) {
((AWTPrintLifecycle)c).setupPrint(scaleMatX, scaleMatY, numSamples, tileWidth, tileHeight);
} };
private final AWTMisc.ComponentAction releaseAction = new AWTMisc.ComponentAction() {
@Override
- public void run(Component c) {
+ public void run(final Component c) {
((AWTPrintLifecycle)c).releasePrint();
} };
- private Context(Container c, double scaleMatX, double scaleMatY, int numSamples, int tileWidth, int tileHeight) {
+ private Context(final Container c, final double scaleMatX, final double scaleMatY, final int numSamples, final int tileWidth, final int tileHeight) {
this.cont = c;
this.scaleMatX = scaleMatX;
this.scaleMatY = scaleMatY;
@@ -168,7 +168,7 @@ public interface AWTPrintLifecycle {
this.tileHeight = tileHeight;
this.count = 0;
}
- private void setupPrint(Container c) {
+ private void setupPrint(final Container c) {
count = AWTMisc.performAction(c, AWTPrintLifecycle.class, setupAction);
}
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
index aadecb455..496e6e07b 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
@@ -53,7 +53,7 @@ public class AWTWindowClosingProtocol implements WindowClosingProtocol {
* @param closingOperationClose mandatory closing operation, triggered if windowClosing and {@link WindowClosingMode#DISPOSE_ON_CLOSE}
* @param closingOperationNOP optional closing operation, triggered if windowClosing and {@link WindowClosingMode#DO_NOTHING_ON_CLOSE}
*/
- public AWTWindowClosingProtocol(Component comp, Runnable closingOperationClose, Runnable closingOperationNOP) {
+ public AWTWindowClosingProtocol(final Component comp, final Runnable closingOperationClose, final Runnable closingOperationNOP) {
this.comp = comp;
this.listenTo = null;
this.closingOperationClose = closingOperationClose;
@@ -62,7 +62,7 @@ public class AWTWindowClosingProtocol implements WindowClosingProtocol {
class WindowClosingAdapter extends WindowAdapter {
@Override
- public void windowClosing(WindowEvent e) {
+ public void windowClosing(final WindowEvent e) {
final WindowClosingMode op = AWTWindowClosingProtocol.this.getDefaultCloseOperation();
if( WindowClosingMode.DISPOSE_ON_CLOSE == op ) {
@@ -128,7 +128,7 @@ public class AWTWindowClosingProtocol implements WindowClosingProtocol {
}
@Override
- public final WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
+ public final WindowClosingMode setDefaultCloseOperation(final WindowClosingMode op) {
synchronized(closingListenerLock) {
final WindowClosingMode _op = defaultCloseOperation;
defaultCloseOperation = op;
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java
index c4f16e046..c637ec59e 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java
@@ -32,7 +32,7 @@ public class AppContextInfo {
try {
final Class<?> appContextClass = Class.forName("sun.awt.AppContext");
_getAppContextMethod[0] = appContextClass.getMethod("getAppContext");
- } catch(Throwable ex) {
+ } catch(final Throwable ex) {
System.err.println("Bug 1004: Caught @ static: "+ex.getMessage());
ex.printStackTrace();
}
@@ -185,7 +185,7 @@ public class AppContextInfo {
private static Object fetchAppContext() {
try {
return getAppContextMethod.invoke(null);
- } catch(Exception ex) {
+ } catch(final Exception ex) {
System.err.println("Bug 1004: Caught: "+ex.getMessage());
ex.printStackTrace();
return null;
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
index eeec66376..c7055099f 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
@@ -47,14 +47,14 @@ import com.jogamp.common.nio.Buffers;
public final class DirectDataBufferInt extends DataBuffer {
public static class DirectWritableRaster extends WritableRaster {
- protected DirectWritableRaster(SampleModel sampleModel, DirectDataBufferInt dataBuffer, Point origin) {
+ protected DirectWritableRaster(final SampleModel sampleModel, final DirectDataBufferInt dataBuffer, final Point origin) {
super(sampleModel, dataBuffer, origin);
}
}
public static class BufferedImageInt extends BufferedImage {
final int customImageType;
- public BufferedImageInt (int customImageType, ColorModel cm, WritableRaster raster, Hashtable<?,?> properties) {
+ public BufferedImageInt (final int customImageType, final ColorModel cm, final WritableRaster raster, final Hashtable<?,?> properties) {
super(cm, raster, false /* isRasterPremultiplied */, properties);
this.customImageType = customImageType;
}
@@ -97,7 +97,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* <code>String</code>/<code>Object</code> pairs. Used for {@link BufferedImage#getProperty(String)} etc.
* @return
*/
- public static BufferedImageInt createBufferedImage(int width, int height, int imageType, Point location, Hashtable<?,?> properties) {
+ public static BufferedImageInt createBufferedImage(final int width, final int height, final int imageType, Point location, final Hashtable<?,?> properties) {
final ColorSpace colorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
final int transferType = DataBuffer.TYPE_INT;
final int bpp, rmask, gmask, bmask, amask;
@@ -167,10 +167,10 @@ public final class DirectDataBufferInt extends DataBuffer {
}
/** Default data bank. */
- private IntBuffer data;
+ private final IntBuffer data;
/** All data banks */
- private IntBuffer bankdata[];
+ private final IntBuffer bankdata[];
/**
* Constructs an nio integer-based {@link DataBuffer} with a single bank
@@ -178,7 +178,7 @@ public final class DirectDataBufferInt extends DataBuffer {
*
* @param size The size of the {@link DataBuffer}.
*/
- public DirectDataBufferInt(int size) {
+ public DirectDataBufferInt(final int size) {
super(TYPE_INT, size);
data = Buffers.newDirectIntBuffer(size);
bankdata = new IntBuffer[1];
@@ -192,7 +192,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @param size The size of the banks in the {@link DataBuffer}.
* @param numBanks The number of banks in the a{@link DataBuffer}.
*/
- public DirectDataBufferInt(int size, int numBanks) {
+ public DirectDataBufferInt(final int size, final int numBanks) {
super(TYPE_INT,size,numBanks);
bankdata = new IntBuffer[numBanks];
for (int i= 0; i < numBanks; i++) {
@@ -213,7 +213,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @param dataArray The integer array for the {@link DataBuffer}.
* @param size The size of the {@link DataBuffer} bank.
*/
- public DirectDataBufferInt(IntBuffer dataArray, int size) {
+ public DirectDataBufferInt(final IntBuffer dataArray, final int size) {
super(TYPE_INT,size);
data = dataArray;
bankdata = new IntBuffer[1];
@@ -235,7 +235,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @param bank The bank whose data array you want to get.
* @return The data array for the specified bank.
*/
- public IntBuffer getData(int bank) {
+ public IntBuffer getData(final int bank) {
return bankdata[bank];
}
@@ -248,7 +248,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @see #setElem(int, int, int)
*/
@Override
- public int getElem(int i) {
+ public int getElem(final int i) {
return data.get(i+offset);
}
@@ -262,7 +262,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @see #setElem(int, int, int)
*/
@Override
- public int getElem(int bank, int i) {
+ public int getElem(final int bank, final int i) {
return bankdata[bank].get(i+offsets[bank]);
}
@@ -276,7 +276,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @see #getElem(int, int)
*/
@Override
- public void setElem(int i, int val) {
+ public void setElem(final int i, final int val) {
data.put(i+offset, val);
}
@@ -290,7 +290,7 @@ public final class DirectDataBufferInt extends DataBuffer {
* @see #getElem(int, int)
*/
@Override
- public void setElem(int bank, int i, int val) {
+ public void setElem(final int bank, final int i, final int val) {
bankdata[bank].put(i+offsets[bank], val);
}
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
index 62710830f..6498ebd1e 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
@@ -71,6 +71,7 @@ import javax.media.nativewindow.util.PointImmutable;
import javax.media.nativewindow.util.Rectangle;
import javax.media.nativewindow.util.RectangleImmutable;
+import jogamp.common.os.PlatformPropsImpl;
import jogamp.nativewindow.SurfaceScaleUtils;
import jogamp.nativewindow.SurfaceUpdatedHelper;
import jogamp.nativewindow.awt.AWTMisc;
@@ -114,7 +115,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
* @param comp
* @param config
*/
- protected JAWTWindow(Object comp, AbstractGraphicsConfiguration config) {
+ protected JAWTWindow(final Object comp, final AbstractGraphicsConfiguration config) {
if (config == null) {
throw new NativeWindowException("Error: AbstractGraphicsConfiguration is null");
}
@@ -129,7 +130,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
this.isApplet = false;
this.offscreenSurfaceLayer = 0;
}
- private static String id(Object obj) { return ( null!=obj ? toHexString(obj.hashCode()) : "nil" ); }
+ private static String id(final Object obj) { return ( null!=obj ? toHexString(obj.hashCode()) : "nil" ); }
private String jawtStr() { return "JAWTWindow["+id(JAWTWindow.this)+"]"; }
private class JAWTComponentListener implements ComponentListener, HierarchyListener {
@@ -195,7 +196,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
@Override
- public final void componentResized(ComponentEvent e) {
+ public final void componentResized(final ComponentEvent e) {
if(DEBUG) {
System.err.println(jawtStr()+".componentResized: "+s(e));
}
@@ -203,7 +204,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
@Override
- public final void componentMoved(ComponentEvent e) {
+ public final void componentMoved(final ComponentEvent e) {
if(DEBUG) {
System.err.println(jawtStr()+".componentMoved: "+s(e));
}
@@ -211,7 +212,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
@Override
- public final void componentShown(ComponentEvent e) {
+ public final void componentShown(final ComponentEvent e) {
if(DEBUG) {
System.err.println(jawtStr()+".componentShown: "+s(e));
}
@@ -219,7 +220,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
@Override
- public final void componentHidden(ComponentEvent e) {
+ public final void componentHidden(final ComponentEvent e) {
if(DEBUG) {
System.err.println(jawtStr()+".componentHidden: "+s(e));
}
@@ -227,7 +228,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
@Override
- public final void hierarchyChanged(HierarchyEvent e) {
+ public final void hierarchyChanged(final HierarchyEvent e) {
final boolean wasShowing = isShowing;
isShowing = component.isShowing();
int action = 0;
@@ -306,7 +307,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
* Updates bounds and pixelScale
* @return true if bounds or pixelScale has changed, otherwise false
*/
- protected final boolean updateLockedData(JAWT_Rectangle jawtBounds) {
+ protected final boolean updateLockedData(final JAWT_Rectangle jawtBounds) {
final Rectangle jb = new Rectangle(jawtBounds.getX(), jawtBounds.getY(), jawtBounds.getWidth(), jawtBounds.getHeight());
final boolean changedBounds = !bounds.equals(jb);
@@ -372,7 +373,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
//
@Override
- public void setShallUseOffscreenLayer(boolean v) {
+ public void setShallUseOffscreenLayer(final boolean v) {
shallUseOffscreenLayer = v;
}
@@ -428,9 +429,9 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
* @see #isOffscreenLayerSurfaceEnabled()
* @throws NativeWindowException if {@link #isOffscreenLayerSurfaceEnabled()} == false
*/
- protected void layoutSurfaceLayerImpl(long layerHandle, boolean visible) {}
+ protected void layoutSurfaceLayerImpl(final long layerHandle, final boolean visible) {}
- private final void layoutSurfaceLayerIfEnabled(boolean visible) throws NativeWindowException {
+ private final void layoutSurfaceLayerIfEnabled(final boolean visible) throws NativeWindowException {
if( isOffscreenLayerSurfaceEnabled() && 0 != offscreenSurfaceLayer ) {
layoutSurfaceLayerImpl(offscreenSurfaceLayer, visible);
}
@@ -473,7 +474,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
@Override
- public final void setChosenCapabilities(CapabilitiesImmutable caps) {
+ public final void setChosenCapabilities(final CapabilitiesImmutable caps) {
((MutableGraphicsConfiguration)getGraphicsConfiguration()).setChosenCapabilities(caps);
config.setChosenCapabilities(caps);
}
@@ -494,7 +495,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
final java.awt.Point awtHotspot = new java.awt.Point(hotSpot.getX(), hotSpot.getY());
try {
c = AWTMisc.getCursor(pixelrect, awtHotspot);
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
}
}
@@ -628,22 +629,22 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
@Override
- public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ public void addSurfaceUpdatedListener(final SurfaceUpdatedListener l) {
surfaceUpdatedHelper.addSurfaceUpdatedListener(l);
}
@Override
- public void addSurfaceUpdatedListener(int index, SurfaceUpdatedListener l) throws IndexOutOfBoundsException {
+ public void addSurfaceUpdatedListener(final int index, final SurfaceUpdatedListener l) throws IndexOutOfBoundsException {
surfaceUpdatedHelper.addSurfaceUpdatedListener(index, l);
}
@Override
- public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ public void removeSurfaceUpdatedListener(final SurfaceUpdatedListener l) {
surfaceUpdatedHelper.removeSurfaceUpdatedListener(l);
}
@Override
- public void surfaceUpdated(Object updater, NativeSurface ns, long when) {
+ public void surfaceUpdated(final Object updater, final NativeSurface ns, final long when) {
surfaceUpdatedHelper.surfaceUpdated(updater, ns, when);
}
@@ -772,7 +773,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
getLocationOnScreenNonBlocking(storage, component);
return storage;
}
- java.awt.Point awtLOS = component.getLocationOnScreen();
+ final java.awt.Point awtLOS = component.getLocationOnScreen();
if(null!=storage) {
los = storage.translate(awtLOS.x, awtLOS.y);
} else {
@@ -782,8 +783,8 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
return los;
}
- protected Point getLocationOnScreenNative(Point storage) {
- int lockRes = lockSurface();
+ protected Point getLocationOnScreenNative(final Point storage) {
+ final int lockRes = lockSurface();
if(LOCK_SURFACE_NOT_READY == lockRes) {
if(DEBUG) {
System.err.println("Warning: JAWT Lock couldn't be acquired: "+this);
@@ -792,7 +793,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
return null;
}
try {
- Point d = getLocationOnScreenNativeImpl(0, 0);
+ final Point d = getLocationOnScreenNativeImpl(0, 0);
if(null!=d) {
if(null!=storage) {
storage.translate(d.getX(),d.getY());
@@ -806,7 +807,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
protected abstract Point getLocationOnScreenNativeImpl(int x, int y);
- protected static Component getLocationOnScreenNonBlocking(Point storage, Component comp) {
+ protected static Component getLocationOnScreenNonBlocking(final Point storage, Component comp) {
final java.awt.Insets insets = new java.awt.Insets(0, 0, 0, 0); // DEBUG
Component last = null;
while(null != comp) {
@@ -844,9 +845,9 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
if( null == sb ) {
sb = new StringBuilder();
}
- sb.append("JVM version: ").append(Platform.JAVA_VERSION).append(" (").
- append(Platform.JAVA_VERSION_NUMBER).
- append(" update ").append(Platform.JAVA_VERSION_UPDATE).append(")").append(Platform.getNewline());
+ sb.append("JVM version: ").append(PlatformPropsImpl.JAVA_VERSION).append(" (").
+ append(PlatformPropsImpl.JAVA_VERSION_NUMBER).
+ append(" update ").append(PlatformPropsImpl.JAVA_VERSION_UPDATE).append(")").append(Platform.getNewline());
if(null != jawt) {
sb.append("JAWT version: ").append(toHexString(jawt.getCachedVersion())).
append(", CA_LAYER: ").append(JAWTUtil.isJAWTUsingOffscreenLayer(jawt)).
@@ -861,7 +862,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
+ final StringBuilder sb = new StringBuilder();
sb.append(jawtStr()+"[");
jawt2String(sb);
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
index ffcbb8626..d21994ea5 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
@@ -137,7 +137,7 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
return eglLifecycleCallback;
}
@Override
- protected Object setHandleOwnership(Object newOwnership) {
+ protected Object setHandleOwnership(final Object newOwnership) {
final EGLDisplayLifecycleCallback oldOwnership = eglLifecycleCallback;
eglLifecycleCallback = (EGLDisplayLifecycleCallback) newOwnership;
return oldOwnership;
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
index 02cec5bbf..6c63fc08d 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
@@ -112,7 +112,7 @@ public class SWTAccessor {
private static final VersionNumber GTK_VERSION_2_24_0 = new VersionNumber(2, 24, 0);
private static final VersionNumber GTK_VERSION_3_0_0 = new VersionNumber(3, 0, 0);
- private static VersionNumber GTK_VERSION(int version) {
+ private static VersionNumber GTK_VERSION(final int version) {
// return (major << 16) + (minor << 8) + micro;
final int micro = ( version ) & 0x0f;
final int minor = ( version >> 8 ) & 0x0f;
@@ -137,7 +137,7 @@ public class SWTAccessor {
if( !isOSX ) {
try {
f = Control.class.getField(str_handle);
- } catch (Exception ex) {
+ } catch (final Exception ex) {
throw new NativeWindowException(ex);
}
}
@@ -156,7 +156,7 @@ public class SWTAccessor {
Method m=null;
try {
m = ReflectionUtil.getMethod(Control.class, str_internal_new_GC, new Class[] { GCData.class });
- } catch (Exception ex) {
+ } catch (final Exception ex) {
throw new NativeWindowException(ex);
}
swt_control_internal_new_GC = m;
@@ -167,7 +167,7 @@ public class SWTAccessor {
} else {
m = Control.class.getDeclaredMethod(str_internal_dispose_GC, new Class[] { int.class, GCData.class });
}
- } catch (NoSuchMethodException ex) {
+ } catch (final NoSuchMethodException ex) {
throw new NativeWindowException(ex);
}
swt_control_internal_dispose_GC = m;
@@ -180,7 +180,7 @@ public class SWTAccessor {
// mandatory
try {
c = ReflectionUtil.getClass(str_OS_gtk_class, false, SWTAccessor.class.getClassLoader());
- Field field_OS_gtk_version = c.getField(str_OS_gtk_version);
+ final Field field_OS_gtk_version = c.getField(str_OS_gtk_version);
_gtk_version = GTK_VERSION(field_OS_gtk_version.getInt(null));
m1 = c.getDeclaredMethod(str_gtk_widget_realize, handleType);
if (_gtk_version.compareTo(GTK_VERSION_2_14_0) >= 0) {
@@ -200,11 +200,11 @@ public class SWTAccessor {
m8 = c.getDeclaredMethod(str_gdk_x11_drawable_get_xid, handleType);
}
ma = c.getDeclaredMethod(str_gdk_window_set_back_pixmap, handleType, handleType, boolean.class);
- } catch (Exception ex) { throw new NativeWindowException(ex); }
+ } catch (final Exception ex) { throw new NativeWindowException(ex); }
// optional
try {
m2 = c.getDeclaredMethod(str_gtk_widget_unrealize, handleType);
- } catch (Exception ex) { }
+ } catch (final Exception ex) { }
}
OS_gtk_class = c;
OS_gtk_version = _gtk_version;
@@ -226,23 +226,23 @@ public class SWTAccessor {
}
}
- private static Number getIntOrLong(long arg) {
+ private static Number getIntOrLong(final long arg) {
if(swt_uses_long_handles) {
return new Long(arg);
}
return new Integer((int) arg);
}
- private static void callStaticMethodL2V(Method m, long arg) {
+ private static void callStaticMethodL2V(final Method m, final long arg) {
ReflectionUtil.callMethod(null, m, new Object[] { getIntOrLong(arg) });
}
- private static void callStaticMethodLLZ2V(Method m, long arg0, long arg1, boolean arg3) {
+ private static void callStaticMethodLLZ2V(final Method m, final long arg0, final long arg1, final boolean arg3) {
ReflectionUtil.callMethod(null, m, new Object[] { getIntOrLong(arg0), getIntOrLong(arg1), Boolean.valueOf(arg3) });
}
- private static long callStaticMethodL2L(Method m, long arg) {
- Object o = ReflectionUtil.callMethod(null, m, new Object[] { getIntOrLong(arg) });
+ private static long callStaticMethodL2L(final Method m, final long arg) {
+ final Object o = ReflectionUtil.callMethod(null, m, new Object[] { getIntOrLong(arg) });
if(o instanceof Number) {
return ((Number)o).longValue();
} else {
@@ -265,7 +265,7 @@ public class SWTAccessor {
// Common GTK
//
- public static long gdk_widget_get_window(long handle) {
+ public static long gdk_widget_get_window(final long handle) {
final long window;
if (OS_gtk_version.compareTo(GTK_VERSION_2_14_0) >= 0) {
window = callStaticMethodL2L(OS_gtk_widget_get_window, handle);
@@ -278,7 +278,7 @@ public class SWTAccessor {
return window;
}
- public static long gdk_window_get_xdisplay(long window) {
+ public static long gdk_window_get_xdisplay(final long window) {
final long xdisplay;
if (OS_gtk_version.compareTo(GTK_VERSION_2_24_0) >= 0) {
final long display = callStaticMethodL2L(OS_gdk_window_get_display, window);
@@ -295,7 +295,7 @@ public class SWTAccessor {
return xdisplay;
}
- public static long gdk_window_get_xwindow(long window) {
+ public static long gdk_window_get_xwindow(final long window) {
final long xWindow;
if (OS_gtk_version.compareTo(GTK_VERSION_3_0_0) >= 0) {
xWindow = callStaticMethodL2L(OS_gdk_x11_window_get_xid, window);
@@ -308,7 +308,7 @@ public class SWTAccessor {
return xWindow;
}
- public static void gdk_window_set_back_pixmap(long window, long pixmap, boolean parent_relative) {
+ public static void gdk_window_set_back_pixmap(final long window, final long pixmap, final boolean parent_relative) {
callStaticMethodLLZ2V(OS_gdk_window_set_back_pixmap, window, pixmap, parent_relative);
}
@@ -321,27 +321,27 @@ public class SWTAccessor {
* @return the native widget-handle
* @throws NativeWindowException if the widget handle is null
*/
- public static long getHandle(Control swtControl) throws NativeWindowException {
+ public static long getHandle(final Control swtControl) throws NativeWindowException {
long h = 0;
if( isOSX ) {
synchronized(swt_osx_init) {
try {
if(null == swt_osx_view_id) {
swt_osx_control_view = Control.class.getField(str_osx_view);
- Object view = swt_osx_control_view.get(swtControl);
+ final Object view = swt_osx_control_view.get(swtControl);
swt_osx_view_id = view.getClass().getField(str_osx_id);
h = swt_osx_view_id.getLong(view);
} else {
h = swt_osx_view_id.getLong( swt_osx_control_view.get(swtControl) );
}
- } catch (Exception ex) {
+ } catch (final Exception ex) {
throw new NativeWindowException(ex);
}
}
} else {
try {
h = swt_control_handle.getLong(swtControl);
- } catch (Exception ex) {
+ } catch (final Exception ex) {
throw new NativeWindowException(ex);
}
}
@@ -379,7 +379,7 @@ public class SWTAccessor {
* @throws NativeWindowException if the widget handle is null
* @throws UnsupportedOperationException if the windowing system is not supported
*/
- public static AbstractGraphicsDevice getDevice(Control swtControl) throws NativeWindowException, UnsupportedOperationException {
+ public static AbstractGraphicsDevice getDevice(final Control swtControl) throws NativeWindowException, UnsupportedOperationException {
final long handle = getHandle(swtControl);
if( isX11GTK ) {
final long xdisplay0 = gdk_window_get_xdisplay( gdk_widget_get_window( handle ) );
@@ -399,11 +399,11 @@ public class SWTAccessor {
* @param screen -1 is default screen of the given device, e.g. maybe 0 or determined by native API. >= 0 is specific screen
* @return
*/
- public static AbstractGraphicsScreen getScreen(AbstractGraphicsDevice device, int screen) {
+ public static AbstractGraphicsScreen getScreen(final AbstractGraphicsDevice device, final int screen) {
return NativeWindowFactory.createScreen(device, screen);
}
- public static int getNativeVisualID(AbstractGraphicsDevice device, long windowHandle) {
+ public static int getNativeVisualID(final AbstractGraphicsDevice device, final long windowHandle) {
if( isX11 ) {
return X11Lib.GetVisualIDFromWindow(device.getHandle(), windowHandle);
}
@@ -419,7 +419,7 @@ public class SWTAccessor {
* @throws NativeWindowException if the widget handle is null
* @throws UnsupportedOperationException if the windowing system is not supported
*/
- public static long getWindowHandle(Control swtControl) throws NativeWindowException, UnsupportedOperationException {
+ public static long getWindowHandle(final Control swtControl) throws NativeWindowException, UnsupportedOperationException {
final long handle = getHandle(swtControl);
if(0 == handle) {
throw new NativeWindowException("Null SWT handle of SWT control "+swtControl);
@@ -477,7 +477,7 @@ public class SWTAccessor {
* @see Platform#AWT_AVAILABLE
* @see Platform#getOSType()
*/
- public static void invoke(boolean wait, Runnable runnable) {
+ public static void invoke(final boolean wait, final Runnable runnable) {
if( isOSX ) {
// Use SWT main thread! Only reliable config w/ -XStartOnMainThread !?
OSXUtil.RunOnMainThread(wait, false, runnable);
@@ -493,7 +493,7 @@ public class SWTAccessor {
* {@link #invoke(boolean, Runnable)} is being used.
* @see #invoke(boolean, Runnable)
*/
- public static void invoke(org.eclipse.swt.widgets.Display display, boolean wait, Runnable runnable) {
+ public static void invoke(final org.eclipse.swt.widgets.Display display, final boolean wait, final Runnable runnable) {
if( display.isDisposed() || Thread.currentThread() == display.getThread() ) {
invoke(wait, runnable);
} else if( wait ) {
@@ -507,7 +507,7 @@ public class SWTAccessor {
// Specific X11 GTK ChildWindow - Using plain X11 native parenting (works well)
//
- public static long createCompatibleX11ChildWindow(AbstractGraphicsScreen screen, Control swtControl, int visualID, int width, int height) {
+ public static long createCompatibleX11ChildWindow(final AbstractGraphicsScreen screen, final Control swtControl, final int visualID, final int width, final int height) {
final long handle = getHandle(swtControl);
final long parentWindow = gdk_widget_get_window( handle );
gdk_window_set_back_pixmap (parentWindow, 0, false);
@@ -518,10 +518,10 @@ public class SWTAccessor {
return x11WindowHandle;
}
- public static void resizeX11Window(AbstractGraphicsDevice device, Rectangle clientArea, long x11Window) {
+ public static void resizeX11Window(final AbstractGraphicsDevice device, final Rectangle clientArea, final long x11Window) {
X11Lib.SetWindowPosSize(device.getHandle(), x11Window, clientArea.x, clientArea.y, clientArea.width, clientArea.height);
}
- public static void destroyX11Window(AbstractGraphicsDevice device, long x11Window) {
+ public static void destroyX11Window(final AbstractGraphicsDevice device, final long x11Window) {
X11Lib.DestroyWindow(device.getHandle(), x11Window);
}
@@ -534,7 +534,7 @@ public class SWTAccessor {
// public static final int GDK_WA_TYPE_HINT = 1 << 9;
// public static final int GDK_WA_VISUAL = 1 << 6;
- public static long createCompatibleGDKChildWindow(Control swtControl, int visualID, int width, int height) {
+ public static long createCompatibleGDKChildWindow(final Control swtControl, final int visualID, final int width, final int height) {
return 0;
/**
final long handle = SWTAccessor.getHandle(swtControl);
@@ -564,24 +564,24 @@ public class SWTAccessor {
return childWindow; */
}
- public static void showGDKWindow(long gdkWindow) {
+ public static void showGDKWindow(final long gdkWindow) {
/* OS.gdk_window_show (gdkWindow);
OS.gdk_flush(); */
}
- public static void focusGDKWindow(long gdkWindow) {
+ public static void focusGDKWindow(final long gdkWindow) {
/*
OS.gdk_window_show (gdkWindow);
OS.gdk_window_focus(gdkWindow, 0);
OS.gdk_flush(); */
}
- public static void resizeGDKWindow(Rectangle clientArea, long gdkWindow) {
+ public static void resizeGDKWindow(final Rectangle clientArea, final long gdkWindow) {
/**
OS.gdk_window_move (gdkWindow, clientArea.x, clientArea.y);
OS.gdk_window_resize (gdkWindow, clientArea.width, clientArea.height);
OS.gdk_flush(); */
}
- public static void destroyGDKWindow(long gdkWindow) {
+ public static void destroyGDKWindow(final long gdkWindow) {
// OS.gdk_window_destroy (gdkWindow);
}
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsConfiguration.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsConfiguration.java
index 120c86584..223cb5194 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsConfiguration.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsConfiguration.java
@@ -48,9 +48,9 @@ import jogamp.nativewindow.x11.XVisualInfo;
public class X11GraphicsConfiguration extends MutableGraphicsConfiguration implements Cloneable {
private XVisualInfo info;
- public X11GraphicsConfiguration(X11GraphicsScreen screen,
- CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
- XVisualInfo info) {
+ public X11GraphicsConfiguration(final X11GraphicsScreen screen,
+ final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested,
+ final XVisualInfo info) {
super(screen, capsChosen, capsRequested);
this.info = info;
}
@@ -64,7 +64,7 @@ public class X11GraphicsConfiguration extends MutableGraphicsConfiguration imple
return info;
}
- final protected void setXVisualInfo(XVisualInfo info) {
+ final protected void setXVisualInfo(final XVisualInfo info) {
this.info = info;
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
index 633b9eaf0..fea4e7019 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
@@ -98,7 +98,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
isXineramaEnabled = X11Util.XineramaIsEnabled(this);
}
- private static int getDefaultScreenImpl(long dpy) {
+ private static int getDefaultScreenImpl(final long dpy) {
return X11Lib.DefaultScreen(dpy);
}
@@ -176,7 +176,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
return Boolean.valueOf(handleOwner);
}
@Override
- protected Object setHandleOwnership(Object newOwnership) {
+ protected Object setHandleOwnership(final Object newOwnership) {
final Boolean oldOwnership = Boolean.valueOf(handleOwner);
handleOwner = ((Boolean) newOwnership).booleanValue();
return oldOwnership;
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
index 700937829..8ebf3c379 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
@@ -49,11 +49,11 @@ import jogamp.nativewindow.x11.X11Lib;
public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneable {
/** Constructs a new X11GraphicsScreen corresponding to the given native screen index. */
- public X11GraphicsScreen(X11GraphicsDevice device, int screen) {
+ public X11GraphicsScreen(final X11GraphicsDevice device, final int screen) {
super(device, device.isXineramaEnabled() ? 0 : screen);
}
- public static AbstractGraphicsScreen createScreenDevice(long display, int screenIdx, boolean owner) {
+ public static AbstractGraphicsScreen createScreenDevice(final long display, final int screenIdx, final boolean owner) {
if(0==display) throw new NativeWindowException("display is null");
return new X11GraphicsScreen(new X11GraphicsDevice(display, AbstractGraphicsDevice.DEFAULT_UNIT, owner), screenIdx);
}