ContainerPeer.java revision 10444:f08705540498
1/* 2 * Copyright (c) 1995, 2005, 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 */ 25package java.awt.peer; 26 27import java.awt.*; 28 29/** 30 * The peer interface for {@link Container}. This is the parent interface 31 * for all container like widgets. 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 */ 39public interface ContainerPeer extends ComponentPeer { 40 41 /** 42 * Returns the insets of this container. Insets usually is the space that 43 * is occupied by things like borders. 44 * 45 * @return the insets of this container 46 */ 47 Insets getInsets(); 48 49 /** 50 * Notifies the peer that validation of the component tree is about to 51 * begin. 52 * 53 * @see Container#validate() 54 */ 55 void beginValidate(); 56 57 /** 58 * Notifies the peer that validation of the component tree is finished. 59 * 60 * @see Container#validate() 61 */ 62 void endValidate(); 63 64 /** 65 * Notifies the peer that layout is about to begin. This is called 66 * before the container itself and its children are laid out. 67 * 68 * @see Container#validateTree() 69 */ 70 void beginLayout(); 71 72 /** 73 * Notifies the peer that layout is finished. This is called after the 74 * container and its children have been laid out. 75 * 76 * @see Container#validateTree() 77 */ 78 void endLayout(); 79} 80