--- a/jdk/src/macosx/classes/sun/awt/CGraphicsDevice.java Thu Feb 28 17:04:19 2013 +0400
+++ b/jdk/src/macosx/classes/sun/awt/CGraphicsDevice.java Thu Feb 28 20:27:38 2013 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
import java.awt.DisplayMode;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
+import java.awt.Insets;
import java.awt.Window;
import java.util.Objects;
@@ -110,8 +111,9 @@
return nativeGetYResolution(displayID);
}
- private static native double nativeGetXResolution(int displayID);
- private static native double nativeGetYResolution(int displayID);
+ public Insets getScreenInsets() {
+ return nativeGetScreenInsets(displayID);
+ }
/**
* Enters full-screen mode, or returns to windowed mode.
@@ -217,9 +219,15 @@
return nativeGetDisplayModes(displayID);
}
- private native void nativeSetDisplayMode(int displayID, int w, int h, int bpp, int refrate);
+ private static native void nativeSetDisplayMode(int displayID, int w, int h, int bpp, int refrate);
+
+ private static native DisplayMode nativeGetDisplayMode(int displayID);
+
+ private static native DisplayMode[] nativeGetDisplayModes(int displayID);
- private native DisplayMode nativeGetDisplayMode(int displayID);
+ private static native double nativeGetXResolution(int displayID);
- private native DisplayMode[] nativeGetDisplayModes(int displayID);
+ private static native double nativeGetYResolution(int displayID);
+
+ private static native Insets nativeGetScreenInsets(int displayID);
}