src/share/classes/java/awt/Window.java

Print this page




2152      * If some other window is already always-on-top then the
2153      * relative order between these windows is unspecified (depends on
2154      * platform).  No window can be brought to be over the always-on-top
2155      * window except maybe another always-on-top window.
2156      * <p>
2157      * All windows owned by an always-on-top window inherit this state and
2158      * automatically become always-on-top.  If a window ceases to be
2159      * always-on-top, the windows that it owns will no longer be
2160      * always-on-top.  When an always-on-top window is sent {@link #toBack
2161      * toBack}, its always-on-top state is set to {@code false}.
2162      *
2163      * <p> When this method is called on a window with a value of
2164      * {@code true}, and the window is visible and the platform
2165      * supports always-on-top for this window, the window is immediately
2166      * brought forward, "sticking" it in the top-most position. If the
2167      * window isn`t currently visible, this method sets the always-on-top
2168      * state to {@code true} but does not bring the window forward.
2169      * When the window is later shown, it will be always-on-top.
2170      *
2171      * <p> When this method is called on a window with a value of
2172      * {@code false} the always-on-top state is set to normal. The
2173      * window remains in the top-most position but it`s z-order can be
2174      * changed as for any other window.  Calling this method with a value
2175      * of {@code false} on a window that has a normal state has no
2176      * effect.  Setting the always-on-top state to false has no effect on
2177      * the relative z-order of the windows if there are no other
2178      * always-on-top windows.
2179      *
2180      * <p><b>Note</b>: some platforms might not support always-on-top
2181      * windows.  To detect if always-on-top windows are supported by the
2182      * current platform, use {@link Toolkit#isAlwaysOnTopSupported()} and
2183      * {@link Window#isAlwaysOnTopSupported()}.  If always-on-top mode
2184      * isn't supported by the toolkit or for this window, calling this
2185      * method has no effect.
2186      * <p>
2187      * If a SecurityManager is installed, the calling thread must be
2188      * granted the AWTPermission "setWindowAlwaysOnTop" in
2189      * order to set the value of this property. If this
2190      * permission is not granted, this method will throw a
2191      * SecurityException, and the current value of the property will
2192      * be left unchanged.
2193      *
2194      * @param alwaysOnTop true if the window should always be above other
2195      *        windows
2196      * @throws SecurityException if the calling thread does not have
2197      *         permission to set the value of always-on-top property
2198      * @see #isAlwaysOnTop




2152      * If some other window is already always-on-top then the
2153      * relative order between these windows is unspecified (depends on
2154      * platform).  No window can be brought to be over the always-on-top
2155      * window except maybe another always-on-top window.
2156      * <p>
2157      * All windows owned by an always-on-top window inherit this state and
2158      * automatically become always-on-top.  If a window ceases to be
2159      * always-on-top, the windows that it owns will no longer be
2160      * always-on-top.  When an always-on-top window is sent {@link #toBack
2161      * toBack}, its always-on-top state is set to {@code false}.
2162      *
2163      * <p> When this method is called on a window with a value of
2164      * {@code true}, and the window is visible and the platform
2165      * supports always-on-top for this window, the window is immediately
2166      * brought forward, "sticking" it in the top-most position. If the
2167      * window isn`t currently visible, this method sets the always-on-top
2168      * state to {@code true} but does not bring the window forward.
2169      * When the window is later shown, it will be always-on-top.
2170      *
2171      * <p> When this method is called on a window with a value of
2172      * {@code false} the always-on-top state is set to normal. Calling
2173      * this method with a value of {@code false} on a window that has
2174      * a normal state has no effect.




2175      *
2176      * <p><b>Note</b>: some platforms might not support always-on-top
2177      * windows.  To detect if always-on-top windows are supported by the
2178      * current platform, use {@link Toolkit#isAlwaysOnTopSupported()} and
2179      * {@link Window#isAlwaysOnTopSupported()}.  If always-on-top mode
2180      * isn't supported by the toolkit or for this window, calling this
2181      * method has no effect.
2182      * <p>
2183      * If a SecurityManager is installed, the calling thread must be
2184      * granted the AWTPermission "setWindowAlwaysOnTop" in
2185      * order to set the value of this property. If this
2186      * permission is not granted, this method will throw a
2187      * SecurityException, and the current value of the property will
2188      * be left unchanged.
2189      *
2190      * @param alwaysOnTop true if the window should always be above other
2191      *        windows
2192      * @throws SecurityException if the calling thread does not have
2193      *         permission to set the value of always-on-top property
2194      * @see #isAlwaysOnTop