From d149c554b453c86a880a4f0595bb8e340c80d041 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 27 May 2014 00:05:17 +0200 Subject: Bug 741 HiDPI: [Core API Change] Bring back get[Width|Height]() in NativeWindow, i.e. getWindow[Width|Height]() -> get[Width|Height]() We have distinguished pixel- and window units in commit f9a00b91dcd146c72a50237b62270f33bd0da98e and introduced NativeWindow.getWindow[Width|Height]() and NativeSurface.getSurface[Width|Height](). To have a unique naming scheme, we could rename all method using 'Window', but for simplicity and since there will be no 'semantic override' just use the simple version. --- .../jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java | 4 ++-- .../classes/com/jogamp/nativewindow/awt/JAWTWindow.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/nativewindow/classes/com') diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java index 2e9a33801..5f9720a0e 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java @@ -40,10 +40,10 @@ public class UpstreamWindowHookMutableSizePos extends UpstreamSurfaceHookMutable public final int getY() { return winY; } - public final int getWindowWidth() { + public final int getWidth() { return winWidth; } - public final int getWindowHeight() { + public final int getHeight() { return winHeight; } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java index d4f058201..ea6ec893e 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java @@ -625,12 +625,12 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, @Override public final int getSurfaceWidth() { - return getWindowWidth() * getPixelScale(); + return getWidth() * getPixelScale(); } @Override public final int getSurfaceHeight() { - return getWindowHeight() * getPixelScale(); + return getHeight() * getPixelScale(); } // @@ -638,12 +638,12 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, // @Override - public final int getWindowWidth() { + public final int getWidth() { return component.getWidth(); } @Override - public final int getWindowHeight() { + public final int getHeight() { return component.getHeight(); } @@ -826,7 +826,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, ", surfaceHandle "+toHexString(getSurfaceHandle())+ ", bounds "+bounds+", insets "+insets ); - sb.append(", window ["+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+ + sb.append(", window ["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+ "], pixels[x"+getPixelScale()+" -> "+getSurfaceWidth()+"x"+getSurfaceHeight()+"]"+ ", visible "+component.isVisible()); sb.append(", lockedExt "+isSurfaceLockedByOtherThread()+ -- cgit v1.2.3