diff --git a/src/share/classes/java/awt/GraphicsDevice.java b/src/share/classes/java/awt/GraphicsDevice.java index 25c6eb5d41fb9650ada98f8739cd4997f56fd13b..f3b7cd390a66eb540fee829746e22fa384a71de5 100644 --- a/src/share/classes/java/awt/GraphicsDevice.java +++ b/src/share/classes/java/awt/GraphicsDevice.java @@ -243,8 +243,10 @@ public abstract class GraphicsDevice { * a non-client of the input method framework. * *

- * Simulated full-screen mode resizes - * the window to the size of the screen and positions it at (0,0). + * The simulated full-screen mode places and resizes the window to the maximum + * possible visible area of the screen. However, the native windowing system + * may modify the requested geometry-related data, so that the {@code Window} object + * is placed and sized in a way that corresponds closely to the desktop settings. *

* When entering full-screen mode, if the window to be used as a * full-screen window is not visible, this method will make it visible. diff --git a/src/share/classes/java/awt/Window.java b/src/share/classes/java/awt/Window.java index 5d8f1e6695d81e31e5f7fa37055ef87f7a5b240a..e5dbc67afce00d346d7655d7c87645d8c2f91122 100644 --- a/src/share/classes/java/awt/Window.java +++ b/src/share/classes/java/awt/Window.java @@ -870,6 +870,11 @@ public class Window extends Container implements Accessible { * are automatically enlarged if either is less than * the minimum size as specified by previous call to * {@code setMinimumSize}. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @see #getSize * @see #setBounds @@ -887,6 +892,11 @@ public class Window extends Container implements Accessible { * are automatically enlarged if either is less than * the minimum size as specified by previous call to * {@code setMinimumSize}. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @see #getSize * @see #setBounds @@ -897,6 +907,32 @@ public class Window extends Container implements Accessible { super.setSize(width, height); } + /** + * {@inheritDoc} + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. + */ + @Override + public void setLocation(int x, int y) { + super.setLocation(x, y); + } + + /** + * {@inheritDoc} + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. + */ + @Override + public void setLocation(Point p) { + super.setLocation(p); + } + /** * @deprecated As of JDK version 1.1, * replaced by setBounds(int, int, int, int). @@ -3147,6 +3183,11 @@ public class Window extends Container implements Accessible { * placed at the left side of the screen. The similar placement * will occur if both top and bottom edges are out of the screen. * In that case, the window is placed at the top side of the screen. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @param c the component in relation to which the window's location * is determined @@ -3395,6 +3436,11 @@ public class Window extends Container implements Accessible { * are automatically enlarged if either is less than * the minimum size as specified by previous call to * {@code setMinimumSize}. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @see #getBounds * @see #setLocation(int, int) @@ -3424,6 +3470,11 @@ public class Window extends Container implements Accessible { * will be automatically enlarged if either is less than * the minimum size as specified by previous call to * {@code setMinimumSize}. + *

+ * The method changes the geometry-related data. Therefore, + * the native windowing system may ignore such requests, or it may modify + * the requested data, so that the {@code Window} object is placed and sized + * in a way that corresponds closely to the desktop settings. * * @see #getBounds * @see #setLocation(int, int)