1 /* 2 * Copyright (c) 1995, 2013, 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 23 * questions. 24 */ 25 26 package java.awt.peer; 27 28 import java.awt.*; 29 30 /** 31 * The peer interface for {@link Window}. 32 * 33 * The peer interfaces are intended only for use in porting 34 * the AWT. They are not intended for use by application 35 * developers, and developers should not implement peers 36 * nor invoke any of the peer methods directly on the peer 37 * instances. 38 */ 39 public interface WindowPeer extends ContainerPeer { 40 41 /** 42 * Makes this window the topmost window on the desktop. 43 * 44 * @see Window#toFront() 45 */ 46 void toFront(); 47 48 /** 49 * Makes this window the bottommost window on the desktop. 50 * 51 * @see Window#toBack() 52 */ 53 void toBack(); 54 55 /** 56 * Updates the window's always-on-top state. 57 * Sets if the window should always stay 58 * on top of all other windows or not. 59 * 60 * @see Window#getAlwaysOnTop() 61 * @see Window#setAlwaysOnTop(boolean) 62 */ 63 void updateAlwaysOnTopState(); 64 65 /** 66 * Updates the window's focusable state. 67 * 68 * @see Window#setFocusableWindowState(boolean) 69 */ 70 void updateFocusableWindowState(); 71 72 /** 73 * Sets if this window is blocked by a modal dialog or not. 74 * 75 * @param blocker the blocking modal dialog 76 * @param blocked {@code true} to block the window, {@code false} 77 * to unblock it 78 */ 79 void setModalBlocked(Dialog blocker, boolean blocked); 80 81 /** 82 * Updates the minimum size on the peer. 83 * 84 * @see Window#setMinimumSize(Dimension) 85 */ 86 void updateMinimumSize(); 87 88 /** 89 * Updates the icons for the window. 90 * 91 * @see Window#setIconImages(java.util.List) 92 */ 93 void updateIconImages(); 94 95 /** 96 * Sets the level of opacity for the window. 97 * 98 * @see Window#setOpacity(float) 99 */ 100 void setOpacity(float opacity); 101 102 /** 103 * Enables the per-pixel alpha support for the window. 104 * 105 * @see Window#setBackground(Color) 106 */ 107 void setOpaque(boolean isOpaque); 108 109 /** 110 * Updates the native part of non-opaque window. 111 * 112 * @see Window#setBackground(Color) 113 */ 114 void updateWindow(); 115 116 /** 117 * Instructs the peer to update the position of the security warning. 118 */ 119 void repositionSecurityWarning(); 120 }