src/share/classes/java/awt/Container.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 308,317 **** --- 308,320 ---- public int getComponentCount() { return countComponents(); } /** + * Returns the number of components in this container. + * + * @return the number of components in this container * @deprecated As of JDK version 1.1, * replaced by getComponentCount(). */ @Deprecated public int countComponents() {
*** 389,400 **** --- 392,406 ---- public Insets getInsets() { return insets(); } /** + * Returns the insets for this container. + * * @deprecated As of JDK version 1.1, * replaced by <code>getInsets()</code>. + * @return the insets for this container */ @Deprecated public Insets insets() { ComponentPeer peer = this.peer; if (peer instanceof ContainerPeer) {
*** 436,445 **** --- 442,454 ---- * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * display the added component. * + * @param name the name of the component to be added + * @param comp the component to be added + * @return the component added * @exception NullPointerException if {@code comp} is {@code null} * @see #add(Component, Object) * @see #invalidate */ public Component add(String name, Component comp) {
*** 1469,1480 **** --- 1478,1491 ---- } } /** * Gets the layout manager for this container. + * * @see #doLayout * @see #setLayout + * @return the current layout manager for this container */ public LayoutManager getLayout() { return layoutMgr; }
*** 3852,3861 **** --- 3863,3876 ---- * Number of PropertyChangeListener objects registered. It's used * to add/remove ContainerListener to track target Container's state. */ private volatile transient int propertyListenersCount = 0; + /** + * The handler to fire {@code PropertyChange} + * when children are added or removed + */ protected ContainerListener accessibleContainerHandler = null; /** * Fire <code>PropertyChange</code> listener, if one is registered, * when children are added or removed.