src/share/classes/java/awt/Container.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * 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,10 +308,12 @@
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,12 +391,14 @@
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,10 +440,13 @@
* 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 that was added
* @exception NullPointerException if {@code comp} is {@code null}
* @see #add(Component, Object)
* @see #invalidate
*/
public Component add(String name, Component comp) {
@@ -1471,10 +1478,11 @@
/**
* 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,10 +3860,13 @@
* 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.