summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-09-17 03:17:23 +0200
committerSven Gothel <[email protected]>2015-09-17 03:17:23 +0200
commitf2e1e9bb13679716148f45a66e99da0de114f4a1 (patch)
tree0d39a93af89067e7c98e04d7c9534c7a22666574 /src/newt/classes/com/jogamp
parent852faf012d8c6a93f65e0ebce87b3f70d8e2b6bf (diff)
Unit Tests: NEWTDemoListener: Less verbose; GraphUI-Demos: Show DPI and Pixel-Scale in GLEventListener.init(...)
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java
index 2444067d2..58484ca57 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java
@@ -31,7 +31,6 @@ import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;
-import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.IOUtil;
import com.jogamp.nativewindow.CapabilitiesImmutable;
import com.jogamp.nativewindow.ScalableSurface;
@@ -439,7 +438,7 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous
pointerIcons.add(_pointerIcon);
System.err.printf("Create PointerIcon #%02d: %s%n", pointerIcons.size(), _pointerIcon.toString());
} catch (final Exception e) {
- ExceptionUtils.dumpThrowable("", e);
+ System.err.println(e.getMessage());
}
}
{
@@ -450,7 +449,7 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous
pointerIcons.add(_pointerIcon);
System.err.printf("Create PointerIcon #%02d: %s%n", pointerIcons.size(), _pointerIcon.toString());
} catch (final Exception e) {
- ExceptionUtils.dumpThrowable("", e);
+ System.err.println(e.getMessage());
}
}
{
@@ -461,7 +460,7 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous
pointerIcons.add(_pointerIcon);
System.err.printf("Create PointerIcon #%02d: %s%n", pointerIcons.size(), _pointerIcon.toString());
} catch (final Exception e) {
- ExceptionUtils.dumpThrowable("", e);
+ System.err.println(e.getMessage());
}
}
{
@@ -472,7 +471,7 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous
pointerIcons.add(_pointerIcon);
System.err.printf("Create PointerIcon #%02d: %s%n", pointerIcons.size(), _pointerIcon.toString());
} catch (final Exception e) {
- ExceptionUtils.dumpThrowable("", e);
+ System.err.println(e.getMessage());
}
}
if( PNGIcon.isAvailable() ) {
@@ -480,13 +479,15 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous
final IOUtil.ClassResources res = new IOUtil.ClassResources(disp.getClass(), new String[] { "jogamp-pointer-64x64.png" } );
try {
final URLConnection urlConn = res.resolve(0);
- final PNGPixelRect image = PNGPixelRect.read(urlConn.getInputStream(), null, false /* directBuffer */, 0 /* destMinStrideInBytes */, false /* destIsGLOriented */);
- System.err.printf("Create PointerIcon #%02d: %s%n", pointerIcons.size()+1, image.toString());
- _pointerIcon = disp.createPointerIcon(image, 32, 0);
- pointerIcons.add(_pointerIcon);
- System.err.printf("Create PointerIcon #%02d: %s%n", pointerIcons.size(), _pointerIcon.toString());
+ if( null != urlConn ) {
+ final PNGPixelRect image = PNGPixelRect.read(urlConn.getInputStream(), null, false /* directBuffer */, 0 /* destMinStrideInBytes */, false /* destIsGLOriented */);
+ System.err.printf("Create PointerIcon #%02d: %s%n", pointerIcons.size()+1, image.toString());
+ _pointerIcon = disp.createPointerIcon(image, 32, 0);
+ pointerIcons.add(_pointerIcon);
+ System.err.printf("Create PointerIcon #%02d: %s%n", pointerIcons.size(), _pointerIcon.toString());
+ }
} catch (final Exception e) {
- ExceptionUtils.dumpThrowable("", e);
+ System.err.println(e.getMessage());
}
}
}