aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorDmitri Trembovetski <[email protected]>2009-03-24 23:43:13 +0000
committerDmitri Trembovetski <[email protected]>2009-03-24 23:43:13 +0000
commitc46f7bf8271c6e97d6889dca146a815818c6af6e (patch)
tree0ab7dc6893d9d890067a5490f68088d66365b9fa /src/newt/classes
parent58d868d2bd9eb33a6c7e934db91d6fb0db4becab (diff)
Newt fixes for Windows implementation: implemented setPosition, setTitle; fixed mouse modifiers, hooked up window move notification
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1898 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/newt/classes')
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java
index 0d9015d66..d3f42d13e 100755
--- a/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java
+++ b/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java
@@ -102,11 +102,22 @@ public class WindowsWindow extends Window {
}
}
+ // @Override
public void setSize(int width, int height) {
- setSize0(windowHandle, width, height);
+ if (width != this.width || this.height != height) {
+ this.width = width;
+ this.height = height;
+ setSize0(windowHandle, width, height);
+ }
}
+ //@Override
public void setPosition(int x, int y) {
+ if (this.x != x || this.y != y) {
+ this.x = x;
+ this.y = y;
+ setPosition(windowHandle, x, y);
+ }
}
public boolean setFullscreen(boolean fullscreen) {
@@ -122,6 +133,17 @@ public class WindowsWindow extends Window {
return true;
}
+ // @Override
+ public void setTitle(String title) {
+ if (title == null) {
+ title = "";
+ }
+ if (!title.equals(getTitle())) {
+ super.setTitle(title);
+ setTitle(windowHandle, title);
+ }
+ }
+
protected void dispatchMessages(int eventMask) {
DispatchMessages(windowHandle, eventMask);
}
@@ -163,6 +185,8 @@ public class WindowsWindow extends Window {
private static native void DispatchMessages(long windowHandle, int eventMask);
private native void setSize0(long windowHandle, int width, int height);
private native boolean setFullScreen0(long windowHandle, boolean fullscreen);
+ private static native void setPosition(long windowHandle, int x, int y);
+ private static native void setTitle(long windowHandle, String title);
private void sizeChanged(int newWidth, int newHeight) {
width = newWidth;