From 5e9c02bce7b241a0bf95c8abca9a91cd25e51ed3 Mon Sep 17 00:00:00 2001
From: Harvey Harrison
Date: Thu, 17 Oct 2013 22:27:27 -0700
Subject: jogl: remove all trailing whitespace
Signed-off-by: Harvey Harrison
---
.../DelegatedUpstreamSurfaceHookMutableSize.java | 6 +-
...elegatedUpstreamSurfaceHookWithSurfaceSize.java | 8 +-
.../nativewindow/MutableGraphicsConfiguration.java | 4 +-
.../jogamp/nativewindow/NativeWindowVersion.java | 10 +-
.../UpstreamSurfaceHookMutableSize.java | 10 +-
.../nativewindow/awt/AWTGraphicsConfiguration.java | 26 ++--
.../jogamp/nativewindow/awt/AWTGraphicsDevice.java | 14 +-
.../jogamp/nativewindow/awt/AWTGraphicsScreen.java | 14 +-
.../jogamp/nativewindow/awt/AWTPrintLifecycle.java | 26 ++--
.../nativewindow/awt/AWTWindowClosingProtocol.java | 2 +-
.../nativewindow/awt/DirectDataBufferInt.java | 62 ++++----
.../com/jogamp/nativewindow/awt/JAWTWindow.java | 52 +++----
.../jogamp/nativewindow/egl/EGLGraphicsDevice.java | 30 ++--
.../nativewindow/macosx/MacOSXGraphicsDevice.java | 10 +-
.../com/jogamp/nativewindow/swt/SWTAccessor.java | 164 ++++++++++-----------
.../windows/WindowsGraphicsDevice.java | 12 +-
.../nativewindow/x11/X11GraphicsConfiguration.java | 16 +-
.../jogamp/nativewindow/x11/X11GraphicsDevice.java | 30 ++--
.../jogamp/nativewindow/x11/X11GraphicsScreen.java | 12 +-
19 files changed, 254 insertions(+), 254 deletions(-)
(limited to 'src/nativewindow/classes/com')
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java b/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java
index 22c95f3dd..c98bf5436 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookMutableSize.java
@@ -29,11 +29,11 @@ public class DelegatedUpstreamSurfaceHookMutableSize extends UpstreamSurfaceHook
upstream.destroy(s);
}
}
-
+
@Override
public String toString() {
- return getClass().getSimpleName()+"[ "+ width + "x" + height + ", " + upstream + "]";
+ return getClass().getSimpleName()+"[ "+ width + "x" + height + ", " + upstream + "]";
}
-
+
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java b/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java
index 85e24582c..1557f4e51 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/DelegatedUpstreamSurfaceHookWithSurfaceSize.java
@@ -42,13 +42,13 @@ public class DelegatedUpstreamSurfaceHookWithSurfaceSize implements UpstreamSurf
@Override
public final int getHeight(ProxySurface s) {
return surface.getHeight();
- }
-
+ }
+
@Override
public String toString() {
- final String us_s = null != surface ? ( surface.getClass().getName() + ": 0x" + Long.toHexString(surface.getSurfaceHandle()) + " " +surface.getWidth() + "x" + surface.getHeight() ) : "nil";
+ final String us_s = null != surface ? ( surface.getClass().getName() + ": 0x" + Long.toHexString(surface.getSurfaceHandle()) + " " +surface.getWidth() + "x" + surface.getHeight() ) : "nil";
return getClass().getSimpleName()+"["+upstream+", "+us_s+"]";
}
-
+
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java b/src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java
index eaad513aa..8b8ccb191 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/MutableGraphicsConfiguration.java
@@ -41,10 +41,10 @@ public class MutableGraphicsConfiguration extends DefaultGraphicsConfiguration {
public void setChosenCapabilities(CapabilitiesImmutable caps) {
super.setChosenCapabilities(caps);
}
-
+
@Override
public void setScreen(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 29f4964c0..a8dd9165c 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,12 +20,12 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
*/
-
+
package com.jogamp.nativewindow;
import com.jogamp.common.GlueGenVersion;
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java
index 29c540ac4..5838c7a56 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamSurfaceHookMutableSize.java
@@ -18,9 +18,9 @@ public class UpstreamSurfaceHookMutableSize implements UpstreamSurfaceHook.Mutab
@Override
public final void setSize(int width, int height) {
this.width = width;
- this.height = height;
+ this.height = height;
}
-
+
@Override
public final int getWidth(ProxySurface s) {
return width;
@@ -35,11 +35,11 @@ public class UpstreamSurfaceHookMutableSize implements UpstreamSurfaceHook.Mutab
@Override
public void destroy(ProxySurface s) { /* nop */ }
-
+
@Override
public String toString() {
- return getClass().getSimpleName()+"[ "+ width + "x" + height + "]";
+ return getClass().getSimpleName()+"[ "+ width + "x" + height + "]";
}
-
+
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
index 7e3d30a47..15f3355d0 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
@@ -1,22 +1,22 @@
/*
* Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright (c) 2010 JogAmp Community. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* - Redistribution of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* - Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* Neither the name of Sun Microsystems, Inc. or the names of
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
* DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
* ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
* SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
+ *
* You acknowledge that this software is not designed or intended for use
* in the design, construction, operation or maintenance of any nuclear
* facility.
- *
+ *
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
@@ -57,7 +57,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
private GraphicsConfiguration config;
AbstractGraphicsConfiguration encapsulated;
- public AWTGraphicsConfiguration(AWTGraphicsScreen screen,
+ public AWTGraphicsConfiguration(AWTGraphicsScreen screen,
CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
GraphicsConfiguration config, AbstractGraphicsConfiguration encapsulated) {
super(screen, capsChosen, capsRequested);
@@ -71,9 +71,9 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
this.config = config;
this.encapsulated=null;
}
-
+
/**
- * @param capsChosen if null, capsRequested is copied and aligned
+ * @param capsChosen if null, capsRequested is copied and aligned
* with the graphics {@link Capabilities} of the AWT Component to produce the chosen {@link Capabilities}.
* Otherwise the capsChosen is used.
* @param capsRequested if null, default {@link Capabilities} are used, otherwise the given values.
@@ -81,7 +81,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
public static AWTGraphicsConfiguration create(Component awtComp, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) {
final GraphicsConfiguration awtGfxConfig = awtComp.getGraphicsConfiguration();
if(null==awtGfxConfig) {
- throw new NativeWindowException("AWTGraphicsConfiguration.create: Null AWT GraphicsConfiguration @ "+awtComp);
+ throw new NativeWindowException("AWTGraphicsConfiguration.create: Null AWT GraphicsConfiguration @ "+awtComp);
}
final GraphicsDevice awtGraphicsDevice = awtGfxConfig.getDevice();
if(null==awtGraphicsDevice) {
@@ -112,7 +112,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
public void setChosenCapabilities(CapabilitiesImmutable capsChosen) {
super.setChosenCapabilities(capsChosen);
}
-
+
@Override
public Object clone() {
return super.clone();
@@ -171,7 +171,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
public String toString() {
return getClass().getSimpleName()+"[" + getScreen() +
",\n\tchosen " + capabilitiesChosen+
- ",\n\trequested " + capabilitiesRequested+
+ ",\n\trequested " + capabilitiesRequested+
",\n\t" + config +
",\n\tencapsulated "+encapsulated+"]";
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
index 635e6d263..a7fa53577 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsDevice.java
@@ -1,22 +1,22 @@
/*
* Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright (c) 2010 JogAmp Community. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* - Redistribution of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* - Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* Neither the name of Sun Microsystems, Inc. or the names of
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
* DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
* ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
* SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
+ *
* You acknowledge that this software is not designed or intended for use
* in the design, construction, operation or maintenance of any nuclear
* facility.
- *
+ *
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
index f4ee06e28..d3cf5bff6 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java
@@ -1,22 +1,22 @@
/*
* Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright (c) 2010 JogAmp Community. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* - Redistribution of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* - Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* Neither the name of Sun Microsystems, Inc. or the names of
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
* DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
* ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
* SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
+ *
* You acknowledge that this software is not designed or intended for use
* in the design, construction, operation or maintenance of any nuclear
* facility.
- *
+ *
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java
index e5290aee1..44163fc73 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -69,15 +69,15 @@ import jogamp.nativewindow.awt.AWTMisc;
} finally {
ctx.releasePrint();
}
- *
+ *
*
*
*/
public interface AWTPrintLifecycle {
public static final int DEFAULT_PRINT_TILE_SIZE = 1024;
-
-
+
+
/**
* Shall be called before {@link PrinterJob#print()}.
*
@@ -85,12 +85,12 @@ public interface AWTPrintLifecycle {
*
* @param scaleMatX {@link Graphics2D} {@link Graphics2D#scale(double, double) scaling factor}, i.e. rendering 1/scaleMatX * width pixels
* @param scaleMatY {@link Graphics2D} {@link Graphics2D#scale(double, double) scaling factor}, i.e. rendering 1/scaleMatY * height pixels
- * @param numSamples multisampling value: < 0 turns off, == 0 leaves as-is, > 0 enables using given num samples
+ * @param numSamples multisampling value: < 0 turns off, == 0 leaves as-is, > 0 enables using given num samples
* @param tileWidth custom tile width for {@link com.jogamp.opengl.util.TileRenderer#setTileSize(int, int, int) tile renderer}, pass -1 for default.
* @param tileHeight custom tile height for {@link com.jogamp.opengl.util.TileRenderer#setTileSize(int, int, int) tile renderer}, pass -1 for default.
*/
void setupPrint(double scaleMatX, double scaleMatY, int numSamples, int tileWidth, int tileHeight);
-
+
/**
* Shall be called after {@link PrinterJob#print()}.
*
@@ -111,11 +111,11 @@ public interface AWTPrintLifecycle {
*
- *
+ *
* @param c container to be traversed through to perform {@link AWTPrintLifecycle#setupPrint(double, double, int, int, int) setupPrint(..)} on all {@link AWTPrintLifecycle} elements.
* @param scaleMatX {@link Graphics2D} {@link Graphics2D#scale(double, double) scaling factor}, i.e. rendering 1/scaleMatX * width pixels
* @param scaleMatY {@link Graphics2D} {@link Graphics2D#scale(double, double) scaling factor}, i.e. rendering 1/scaleMatY * height pixels
- * @param numSamples multisampling value: < 0 turns off, == 0 leaves as-is, > 0 enables using given num samples
+ * @param numSamples multisampling value: < 0 turns off, == 0 leaves as-is, > 0 enables using given num samples
* @param tileWidth custom tile width for {@link TileRenderer#setTileSize(int, int, int) tile renderer}, pass -1 for default.
* @param tileHeight custom tile height for {@link TileRenderer#setTileSize(int, int, int) tile renderer}, pass -1 for default.
* @return the context
@@ -139,7 +139,7 @@ public interface AWTPrintLifecycle {
* @return count of performed actions of last {@link #setupPrint(Container, double, double, int, int, int) setupPrint(..)} or {@link #releasePrint()}.
*/
public int getCount() { return count; }
-
+
private final Container cont;
private final double scaleMatX;
private final double scaleMatY;
@@ -147,7 +147,7 @@ public interface AWTPrintLifecycle {
private final int tileWidth;
private final int tileHeight;
private int count;
-
+
private final AWTMisc.ComponentAction setupAction = new AWTMisc.ComponentAction() {
@Override
public void run(Component c) {
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
index e499ff705..e350aaff4 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java
@@ -78,7 +78,7 @@ public class AWTWindowClosingProtocol implements WindowClosingProtocol {
/**
* Adds this closing listener to the components Window if exist and only one time.
*
- * If the closing listener is already added, and {@link IllegalStateException} is thrown.
+ * If the closing listener is already added, and {@link IllegalStateException} is thrown.
*
*
* @return true if added, otherwise false.
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
index 7a7a771d6..e4d3884a7 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -45,29 +45,29 @@ import com.jogamp.common.nio.Buffers;
* {@link DataBuffer} specialization using NIO direct buffer of type {@link DataBuffer#TYPE_INT} as storage.
*/
public final class DirectDataBufferInt extends DataBuffer {
-
+
public static class DirectWritableRaster extends WritableRaster {
protected DirectWritableRaster(SampleModel sampleModel, DirectDataBufferInt dataBuffer, 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) {
super(cm, raster, false /* isRasterPremultiplied */, properties);
- this.customImageType = customImageType;
+ this.customImageType = customImageType;
}
-
+
/**
- * @return one of the custom image-type values {@link BufferedImage#TYPE_INT_ARGB TYPE_INT_ARGB},
- * {@link BufferedImage#TYPE_INT_ARGB_PRE TYPE_INT_ARGB_PRE},
+ * @return one of the custom image-type values {@link BufferedImage#TYPE_INT_ARGB TYPE_INT_ARGB},
+ * {@link BufferedImage#TYPE_INT_ARGB_PRE TYPE_INT_ARGB_PRE},
* {@link BufferedImage#TYPE_INT_RGB TYPE_INT_RGB} or {@link BufferedImage#TYPE_INT_BGR TYPE_INT_BGR}.
*/
public int getCustomType() {
return customImageType;
}
-
+
@Override
public String toString() {
return new String("BufferedImageInt@"+Integer.toHexString(hashCode())
@@ -75,26 +75,26 @@ public final class DirectDataBufferInt extends DataBuffer {
+" "+getColorModel()+" "+getRaster());
}
}
-
+
/**
- * Creates a {@link BufferedImageInt} using a {@link DirectColorModel direct color model} in {@link ColorSpace#CS_sRGB sRGB color space}.
+ * Creates a {@link BufferedImageInt} using a {@link DirectColorModel direct color model} in {@link ColorSpace#CS_sRGB sRGB color space}.
* It uses a {@link DirectWritableRaster} utilizing {@link DirectDataBufferInt} storage.
*
- * Note that due to using the custom storage type {@link DirectDataBufferInt}, the resulting
+ * Note that due to using the custom storage type {@link DirectDataBufferInt}, the resulting
* {@link BufferedImage}'s {@link BufferedImage#getType() image-type} is of {@link BufferedImage#TYPE_CUSTOM TYPE_CUSTOM}.
* We are not able to change this detail, since the AWT image implementation associates the {@link BufferedImage#getType() image-type}
* with a build-in storage-type.
* Use {@link BufferedImageInt#getCustomType()} to retrieve the custom image-type, which will return the imageType
- * value passed here.
+ * value passed here.
*
- *
+ *
* @param width
* @param height
- * @param imageType one of {@link BufferedImage#TYPE_INT_ARGB TYPE_INT_ARGB}, {@link BufferedImage#TYPE_INT_ARGB_PRE TYPE_INT_ARGB_PRE},
+ * @param imageType one of {@link BufferedImage#TYPE_INT_ARGB TYPE_INT_ARGB}, {@link BufferedImage#TYPE_INT_ARGB_PRE TYPE_INT_ARGB_PRE},
* {@link BufferedImage#TYPE_INT_RGB TYPE_INT_RGB} or {@link BufferedImage#TYPE_INT_BGR TYPE_INT_BGR}.
* @param location origin, if null 0/0 is assumed.
* @param properties Hashtable of
- * String/Object pairs. Used for {@link BufferedImage#getProperty(String)} etc.
+ * String/Object pairs. Used for {@link BufferedImage#getProperty(String)} etc.
* @return
*/
public static BufferedImageInt createBufferedImage(int width, int height, int imageType, Point location, Hashtable,?> properties) {
@@ -150,30 +150,30 @@ public final class DirectDataBufferInt extends DataBuffer {
bandMasks[0] = rmask;
bandMasks[1] = gmask;
bandMasks[2] = bmask;
-
+
final DirectDataBufferInt dataBuffer = new DirectDataBufferInt(width*height);
if( null == location ) {
location = new Point(0,0);
}
- final SinglePixelPackedSampleModel sppsm = new SinglePixelPackedSampleModel(dataBuffer.getDataType(),
+ final SinglePixelPackedSampleModel sppsm = new SinglePixelPackedSampleModel(dataBuffer.getDataType(),
width, height, width /* scanLineStride */, bandMasks);
// IntegerComponentRasters must haveinteger DataBuffers:
// final WritableRaster raster = new IntegerInterleavedRaster(sppsm, dataBuffer, location);
// Not public:
// final WritableRaster raster = new SunWritableRaster(sppsm, dataBuffer, location);
final WritableRaster raster = new DirectWritableRaster(sppsm, dataBuffer, location);
-
+
return new BufferedImageInt(imageType, colorModel, raster, properties);
}
-
+
/** Default data bank. */
private IntBuffer data;
/** All data banks */
private IntBuffer bankdata[];
-
+
/**
- * Constructs an nio integer-based {@link DataBuffer} with a single bank
+ * Constructs an nio integer-based {@link DataBuffer} with a single bank
* and the specified size.
*
* @param size The size of the {@link DataBuffer}.
@@ -222,17 +222,17 @@ public final class DirectDataBufferInt extends DataBuffer {
/**
* Returns the default (first) int data array in {@link DataBuffer}.
- *
+ *
* @return The first integer data array.
*/
public IntBuffer getData() {
return data;
}
- /**
- * Returns the data array for the specified bank.
- *
- * @param bank The bank whose data array you want to get.
+ /**
+ * Returns the data array for the specified bank.
+ *
+ * @param bank The bank whose data array you want to get.
* @return The data array for the specified bank.
*/
public IntBuffer getData(int bank) {
@@ -241,7 +241,7 @@ public final class DirectDataBufferInt extends DataBuffer {
/**
* Returns the requested data array element from the first (default) bank.
- *
+ *
* @param i The data array element you want to get.
* @return The requested data array element as an integer.
* @see #setElem(int, int)
@@ -253,7 +253,7 @@ public final class DirectDataBufferInt extends DataBuffer {
/**
* Returns the requested data array element from the specified bank.
- *
+ *
* @param bank The bank from which you want to get a data array element.
* @param i The data array element you want to get.
* @return The requested data array element as an integer.
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
index 38a46f214..49b2daeae 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
@@ -123,7 +123,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
private boolean localVisibility = component.isVisible();
private boolean globalVisibility = localVisibility;
private boolean visibilityPropagation = false;
-
+
private String s(ComponentEvent e) {
return "visible[local "+localVisibility+", global "+globalVisibility+", propag. "+visibilityPropagation+"],"+Platform.getNewline()+
" ** COMP "+e.getComponent()+Platform.getNewline()+
@@ -164,7 +164,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
@Override
- public void componentHidden(ComponentEvent e) {
+ public void componentHidden(ComponentEvent e) {
if(DEBUG) {
System.err.println("JAWTWindow.componentHidden: "+s(e));
}
@@ -174,7 +174,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
@Override
public void hierarchyChanged(HierarchyEvent e) {
final long bits = e.getChangeFlags();
- final java.awt.Component changed = e.getChanged();
+ final java.awt.Component changed = e.getChanged();
if( 0 != ( java.awt.event.HierarchyEvent.DISPLAYABILITY_CHANGED & bits ) ) {
final boolean displayable = changed.isDisplayable();
final boolean resetLocalVisibility = changed == component && !displayable && localVisibility != component.isVisible();
@@ -220,7 +220,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
if(DEBUG) {
System.err.println("JAWTWindow.invalidate() - "+Thread.currentThread().getName());
if( isSurfaceLayerAttached() ) {
- System.err.println("OffscreenSurfaceLayer still attached: 0x"+Long.toHexString(offscreenSurfaceLayer));
+ System.err.println("OffscreenSurfaceLayer still attached: 0x"+Long.toHexString(offscreenSurfaceLayer));
}
// Thread.dumpStack();
}
@@ -237,14 +237,14 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
protected final boolean updateBounds(JAWT_Rectangle jawtBounds) {
final Rectangle jb = new Rectangle(jawtBounds.getX(), jawtBounds.getY(), jawtBounds.getWidth(), jawtBounds.getHeight());
final boolean changed = !bounds.equals(jb);
-
+
if(changed) {
if(DEBUG) {
System.err.println("JAWTWindow.updateBounds: "+bounds+" -> "+jb);
// Thread.dumpStack();
}
bounds.set(jawtBounds.getX(), jawtBounds.getY(), jawtBounds.getWidth(), jawtBounds.getHeight());
-
+
if(component instanceof Container) {
final java.awt.Insets contInsets = ((Container)component).getInsets();
insets.set(contInsets.left, contInsets.right, contInsets.top, contInsets.bottom);
@@ -279,7 +279,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
//
// OffscreenLayerOption
//
-
+
@Override
public void setShallUseOffscreenLayer(boolean v) {
shallUseOffscreenLayer = v;
@@ -316,9 +316,9 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
* Layout the offscreen layer according to the implementing class's constraints.
*
* This method allows triggering a re-layout of the offscreen surface
- * in case the implementation requires it.
+ * in case the implementation requires it.
*
- *
+ *
* Call this method if any parent or ancestor's layout has been changed,
* which could affects the layout of this surface.
*
@@ -326,14 +326,14 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
* @throws NativeWindowException if {@link #isOffscreenLayerSurfaceEnabled()} == false
*/
protected void layoutSurfaceLayerImpl(long layerHandle, boolean visible) {}
-
+
private final void layoutSurfaceLayerIfEnabled(boolean visible) throws NativeWindowException {
if( isOffscreenLayerSurfaceEnabled() && 0 != offscreenSurfaceLayer ) {
layoutSurfaceLayerImpl(offscreenSurfaceLayer, visible);
}
}
-
-
+
+
@Override
public final void detachSurfaceLayer() throws NativeWindowException {
if( 0 == offscreenSurfaceLayer) {
@@ -351,35 +351,35 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
};
- /**
+ /**
* @param detachNotify Runnable to be called before native detachment
*/
protected void detachSurfaceLayerImpl(final long layerHandle, final Runnable detachNotify) {
throw new UnsupportedOperationException("offscreen layer not supported");
}
-
+
@Override
public final long getAttachedSurfaceLayer() {
return offscreenSurfaceLayer;
}
-
+
@Override
public final boolean isSurfaceLayerAttached() {
return 0 != offscreenSurfaceLayer;
}
-
+
@Override
public final void setChosenCapabilities(CapabilitiesImmutable caps) {
((MutableGraphicsConfiguration)getGraphicsConfiguration()).setChosenCapabilities(caps);
- getPrivateGraphicsConfiguration().setChosenCapabilities(caps);
+ getPrivateGraphicsConfiguration().setChosenCapabilities(caps);
}
-
+
@Override
public final RecursiveLock getLock() {
return surfaceLock;
}
-
+
//
// SurfaceUpdateListener
//
@@ -527,7 +527,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
public final AbstractGraphicsConfiguration getGraphicsConfiguration() {
return config.getNativeGraphicsConfiguration();
}
-
+
@Override
public final long getDisplayHandle() {
return getGraphicsConfiguration().getScreen().getDevice().getHandle();
@@ -545,7 +545,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
@Override
public final int getHeight() {
- return component.getHeight();
+ return component.getHeight();
}
//
@@ -647,10 +647,10 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
protected abstract Point getLocationOnScreenNativeImpl(int x, int y);
protected static Component getLocationOnScreenNonBlocking(Point storage, Component comp) {
- final java.awt.Insets insets = new java.awt.Insets(0, 0, 0, 0); // DEBUG
+ final java.awt.Insets insets = new java.awt.Insets(0, 0, 0, 0); // DEBUG
Component last = null;
while(null != comp) {
- final int dx = comp.getX();
+ final int dx = comp.getX();
final int dy = comp.getY();
if( DEBUG ) {
final java.awt.Insets ins = AWTMisc.getInsets(comp, false);
@@ -674,7 +674,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
return last;
}
-
+
@Override
public boolean hasFocus() {
return component.hasFocus();
@@ -693,7 +693,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
}
return sb;
}
-
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -715,7 +715,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
return sb.toString();
}
-
+
protected final String toHexString(long l) {
return "0x"+Long.toHexString(l);
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
index fb6d39b2f..c83814907 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
@@ -1,21 +1,21 @@
/*
* Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* - Redistribution of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* - Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* Neither the name of Sun Microsystems, Inc. or the names of
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -45,7 +45,7 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
*
* FIXME: This shall be removed when relocated EGL to the nativewindow package,
* since then it can be utilized directly.
- *
+ *
*/
public interface EGLDisplayLifecycleCallback {
/**
@@ -55,14 +55,14 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
* @return the initialized EGL display ID, or 0 if not successful
*/
public long eglGetAndInitDisplay(long[] nativeDisplayID);
-
+
/**
* Implementation should issue an EGL.eglTerminate(eglDisplayHandle) call.
* @param eglDisplayHandle
*/
void eglTerminate(long eglDisplayHandle);
}
-
+
/**
* Note that this is not an open connection, ie no native display handle exist.
* This constructor exist to setup a default device connection/unit.
@@ -78,9 +78,9 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
this.nativeDisplayID[0] = nativeDisplayID;
this.eglLifecycleCallback = eglLifecycleCallback;
}
-
+
public long getNativeDisplayID() { return nativeDisplayID[0]; }
-
+
@Override
public Object clone() {
return super.clone();
@@ -100,7 +100,7 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
}
return false;
}
-
+
@Override
public boolean close() {
if(null != eglLifecycleCallback && 0 != handle) {
@@ -111,11 +111,11 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
}
return super.close();
}
-
+
@Override
public boolean isHandleOwner() {
return null != eglLifecycleCallback;
- }
+ }
@Override
public void clearHandleOwner() {
eglLifecycleCallback = null;
@@ -126,9 +126,9 @@ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
}
@Override
protected Object setHandleOwnership(Object newOwnership) {
- final EGLDisplayLifecycleCallback oldOwnership = eglLifecycleCallback;
+ final EGLDisplayLifecycleCallback oldOwnership = eglLifecycleCallback;
eglLifecycleCallback = (EGLDisplayLifecycleCallback) newOwnership;
return oldOwnership;
- }
+ }
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
index 0dc788c17..89df7f853 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java
@@ -1,21 +1,21 @@
/*
* Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* - Redistribution of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* - Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* Neither the name of Sun Microsystems, Inc. or the names of
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
index 5c4fd82d2..6057f6700 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
@@ -54,28 +54,28 @@ import jogamp.nativewindow.x11.X11Lib;
public class SWTAccessor {
private static final boolean DEBUG = true;
-
+
private static final Field swt_control_handle;
private static final boolean swt_uses_long_handles;
-
- private static Object swt_osx_init = new Object();
+
+ private static Object swt_osx_init = new Object();
private static Field swt_osx_control_view = null;
private static Field swt_osx_view_id = null;
-
+
private static final String nwt;
private static final boolean isOSX;
private static final boolean isWindows;
private static final boolean isX11;
private static final boolean isX11GTK;
-
+
// X11/GTK, Windows/GDI, ..
private static final String str_handle = "handle";
-
+
// OSX/Cocoa
private static final String str_osx_view = "view"; // OSX
private static final String str_osx_id = "id"; // OSX
// static final String str_NSView = "org.eclipse.swt.internal.cocoa.NSView";
-
+
private static final Method swt_control_internal_new_GC;
private static final Method swt_control_internal_dispose_GC;
private static final String str_internal_new_GC = "internal_new_GC";
@@ -85,18 +85,18 @@ public class SWTAccessor {
public static final Class> OS_gtk_class;
private static final String str_OS_gtk_version = "GTK_VERSION";
public static final VersionNumber OS_gtk_version;
-
+
private static final Method OS_gtk_widget_realize;
private static final Method OS_gtk_widget_unrealize; // optional (removed in SWT 4.3)
private static final Method OS_GTK_WIDGET_WINDOW;
private static final Method OS_gtk_widget_get_window;
private static final Method OS_gdk_x11_drawable_get_xdisplay;
private static final Method OS_gdk_x11_display_get_xdisplay;
- private static final Method OS_gdk_window_get_display;
- private static final Method OS_gdk_x11_drawable_get_xid;
+ private static final Method OS_gdk_window_get_display;
+ private static final Method OS_gdk_x11_drawable_get_xid;
private static final Method OS_gdk_x11_window_get_xid;
private static final Method OS_gdk_window_set_back_pixmap;
-
+
private static final String str_gtk_widget_realize = "gtk_widget_realize";
private static final String str_gtk_widget_unrealize = "gtk_widget_unrealize";
private static final String str_GTK_WIDGET_WINDOW = "GTK_WIDGET_WINDOW";
@@ -107,11 +107,11 @@ public class SWTAccessor {
private static final String str_gdk_x11_drawable_get_xid = "gdk_x11_drawable_get_xid";
private static final String str_gdk_x11_window_get_xid = "gdk_x11_window_get_xid";
private static final String str_gdk_window_set_back_pixmap = "gdk_window_set_back_pixmap";
-
+
private static final VersionNumber GTK_VERSION_2_14_0 = new VersionNumber(2, 14, 0);
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) {
// return (major << 16) + (minor << 8) + micro;
final int micro = ( version ) & 0x0f;
@@ -119,20 +119,20 @@ public class SWTAccessor {
final int major = ( version >> 16 ) & 0x0f;
return new VersionNumber(major, minor, micro);
}
-
+
static {
AccessController.doPrivileged(new PrivilegedAction