< prev index next >

src/java.desktop/share/classes/java/awt/Frame.java

Print this page
rev 55470 : 8225372: accessibility errors in tables in java.desktop files
Reviewed-by: aivanov
   1 /*
   2  * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  66  * and {@code Titlebar}) turned off
  67  * with {@code setUndecorated}. This can only be done while the frame
  68  * is not {@link Component#isDisplayable() displayable}.
  69  * <p>
  70  * In a multi-screen environment, you can create a {@code Frame}
  71  * on a different screen device by constructing the {@code Frame}
  72  * with {@link #Frame(GraphicsConfiguration)} or
  73  * {@link #Frame(String title, GraphicsConfiguration)}.  The
  74  * {@code GraphicsConfiguration} object is one of the
  75  * {@code GraphicsConfiguration} objects of the target screen
  76  * device.
  77  * <p>
  78  * In a virtual device multi-screen environment in which the desktop
  79  * area could span multiple physical screen devices, the bounds of all
  80  * configurations are relative to the virtual-coordinate system.  The
  81  * origin of the virtual-coordinate system is at the upper left-hand
  82  * corner of the primary physical screen.  Depending on the location
  83  * of the primary screen in the virtual device, negative coordinates
  84  * are possible, as shown in the following figure.
  85  * <p>
  86  * <img src="doc-files/MultiScreen.gif"
  87  * alt="Diagram of virtual device encompassing three physical screens and one primary physical screen. The primary physical screen
  88  * shows (0,0) coords while a different physical screen shows (-80,-100) coords."
  89  * style="float:center; margin: 7px 10px;">
  90  * <p>
  91  * In such an environment, when calling {@code setLocation},
  92  * you must pass a virtual coordinate to this method.  Similarly,
  93  * calling {@code getLocationOnScreen} on a {@code Frame}
  94  * returns virtual device coordinates.  Call the {@code getBounds}
  95  * method of a {@code GraphicsConfiguration} to find its origin in
  96  * the virtual coordinate system.
  97  * <p>
  98  * The following code sets the
  99  * location of the {@code Frame} at (10, 10) relative
 100  * to the origin of the physical screen of the corresponding
 101  * {@code GraphicsConfiguration}.  If the bounds of the
 102  * {@code GraphicsConfiguration} is not taken into account, the
 103  * {@code Frame} location would be set at (10, 10) relative to the
 104  * virtual-coordinate system and would appear on the primary physical
 105  * screen, which might be different from the physical screen of the
 106  * specified {@code GraphicsConfiguration}.
 107  *
 108  * <pre>
 109  *      Frame f = new Frame(GraphicsConfiguration gc);


   1 /*
   2  * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  66  * and {@code Titlebar}) turned off
  67  * with {@code setUndecorated}. This can only be done while the frame
  68  * is not {@link Component#isDisplayable() displayable}.
  69  * <p>
  70  * In a multi-screen environment, you can create a {@code Frame}
  71  * on a different screen device by constructing the {@code Frame}
  72  * with {@link #Frame(GraphicsConfiguration)} or
  73  * {@link #Frame(String title, GraphicsConfiguration)}.  The
  74  * {@code GraphicsConfiguration} object is one of the
  75  * {@code GraphicsConfiguration} objects of the target screen
  76  * device.
  77  * <p>
  78  * In a virtual device multi-screen environment in which the desktop
  79  * area could span multiple physical screen devices, the bounds of all
  80  * configurations are relative to the virtual-coordinate system.  The
  81  * origin of the virtual-coordinate system is at the upper left-hand
  82  * corner of the primary physical screen.  Depending on the location
  83  * of the primary screen in the virtual device, negative coordinates
  84  * are possible, as shown in the following figure.
  85  * <p>
  86  * <img src="doc-files/MultiScreen.gif" alt="Diagram of virtual device
  87  * encompassing three physical screens and one primary physical screen. The
  88  * primary physical screen shows (0,0) coords while a different physical screen
  89  * shows (-80,-100) coords." style="margin: 7px 10px;">
  90  * <p>
  91  * In such an environment, when calling {@code setLocation},
  92  * you must pass a virtual coordinate to this method.  Similarly,
  93  * calling {@code getLocationOnScreen} on a {@code Frame}
  94  * returns virtual device coordinates.  Call the {@code getBounds}
  95  * method of a {@code GraphicsConfiguration} to find its origin in
  96  * the virtual coordinate system.
  97  * <p>
  98  * The following code sets the
  99  * location of the {@code Frame} at (10, 10) relative
 100  * to the origin of the physical screen of the corresponding
 101  * {@code GraphicsConfiguration}.  If the bounds of the
 102  * {@code GraphicsConfiguration} is not taken into account, the
 103  * {@code Frame} location would be set at (10, 10) relative to the
 104  * virtual-coordinate system and would appear on the primary physical
 105  * screen, which might be different from the physical screen of the
 106  * specified {@code GraphicsConfiguration}.
 107  *
 108  * <pre>
 109  *      Frame f = new Frame(GraphicsConfiguration gc);


< prev index next >