diff options
author | Sven Gothel <[email protected]> | 2013-03-13 07:15:41 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-03-13 07:15:41 +0100 |
commit | 74019520e8d82d03f5cf95729456717b34060f5d (patch) | |
tree | 6d93c6b3d41ffdff778d0b0c406d4f93c37f50a3 /src/nativewindow | |
parent | e2506d7663b752f00f0a98f793ebad52e65bd1e3 (diff) |
Minor Changes: EGLDisplayUtil: Add stack trace in DEBUG mode for opened DPYs; JAWTWindow: Add JAWT info in toString()
Diffstat (limited to 'src/nativewindow')
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java index d65f8c231..99b629d1a 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java @@ -315,13 +315,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, protected abstract int lockSurfaceImpl() throws NativeWindowException; protected void dumpJAWTInfo() { - if(null != jawt) { - System.err.println("JAWT version: 0x"+Integer.toHexString(jawt.getCachedVersion())+ - ", CA_LAYER: "+ JAWTUtil.isJAWTUsingOffscreenLayer(jawt)+ - ", isLayeredSurface "+isOffscreenLayerSurfaceEnabled()+", bounds "+bounds+", insets "+insets); - } else { - System.err.println("JAWT n/a, bounds "+bounds+", insets "+insets); - } + System.err.println(jawt2String(null).toString()); // Thread.dumpStack(); } @@ -555,15 +549,32 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, return component.hasFocus(); } + protected StringBuilder jawt2String(StringBuilder sb) { + if( null == sb ) { + sb = new StringBuilder(); + } + if(null != jawt) { + sb.append("JAWT version: 0x").append(Integer.toHexString(jawt.getCachedVersion())). + append(", CA_LAYER: ").append(JAWTUtil.isJAWTUsingOffscreenLayer(jawt)). + append(", isLayeredSurface ").append(isOffscreenLayerSurfaceEnabled()).append(", bounds ").append(bounds).append(", insets ").append(insets); + } else { + sb.append("JAWT n/a, bounds ").append(bounds).append(", insets ").append(insets); + } + return sb; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("JAWT-Window["+ - "windowHandle "+toHexString(getWindowHandle())+ + sb.append("JAWT-Window["); + jawt2String(sb); + sb.append( ", shallUseOffscreenLayer "+shallUseOffscreenLayer+", isOffscreenLayerSurface "+isOffscreenLayerSurface+ + ", attachedSurfaceLayer "+toHexString(getAttachedSurfaceLayer())+ + ", windowHandle "+toHexString(getWindowHandle())+ ", surfaceHandle "+toHexString(getSurfaceHandle())+ - ", bounds "+bounds+", insets "+insets+ - ", shallUseOffscreenLayer "+shallUseOffscreenLayer+", isOffscreenLayerSurface "+isOffscreenLayerSurface); + ", bounds "+bounds+", insets "+insets + ); if(null!=component) { sb.append(", pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+ ", visible "+component.isVisible()); |