< prev index next >

src/java.desktop/share/classes/java/awt/event/ContainerEvent.java

Print this page

        

*** 37,52 **** * contents internally so that the program works properly regardless of * whether the program is receiving these events or not. * <P> * This low-level event is generated by a container object (such as a * Panel) when a component is added to it or removed from it. ! * The event is passed to every <code>ContainerListener</code> ! * or <code>ContainerAdapter</code> object which registered to receive such ! * events using the component's <code>addContainerListener</code> method. ! * (<code>ContainerAdapter</code> objects implement the ! * <code>ContainerListener</code> interface.) Each such listener object ! * gets this <code>ContainerEvent</code> when the event occurs. * <p> * An unspecified behavior will be caused if the {@code id} parameter * of any particular {@code ContainerEvent} instance is not * in the range from {@code CONTAINER_FIRST} to {@code CONTAINER_LAST}. * --- 37,52 ---- * contents internally so that the program works properly regardless of * whether the program is receiving these events or not. * <P> * This low-level event is generated by a container object (such as a * Panel) when a component is added to it or removed from it. ! * The event is passed to every {@code ContainerListener} ! * or {@code ContainerAdapter} object which registered to receive such ! * events using the component's {@code addContainerListener} method. ! * ({@code ContainerAdapter} objects implement the ! * {@code ContainerListener} interface.) Each such listener object ! * gets this {@code ContainerEvent} when the event occurs. * <p> * An unspecified behavior will be caused if the {@code id} parameter * of any particular {@code ContainerEvent} instance is not * in the range from {@code CONTAINER_FIRST} to {@code CONTAINER_LAST}. *
*** 93,114 **** * JDK 1.1 serialVersionUID */ private static final long serialVersionUID = -4114942250539772041L; /** ! * Constructs a <code>ContainerEvent</code> object. * <p> This method throws an ! * <code>IllegalArgumentException</code> if <code>source</code> ! * is <code>null</code>. * ! * @param source The <code>Component</code> object (container) * that originated the event * @param id An integer indicating the type of event. * For information on allowable values, see * the class description for {@link ContainerEvent} * @param child the component that was added or removed ! * @throws IllegalArgumentException if <code>source</code> is null * @see #getContainer() * @see #getID() * @see #getChild() */ public ContainerEvent(Component source, int id, Component child) { --- 93,114 ---- * JDK 1.1 serialVersionUID */ private static final long serialVersionUID = -4114942250539772041L; /** ! * Constructs a {@code ContainerEvent} object. * <p> This method throws an ! * {@code IllegalArgumentException} if {@code source} ! * is {@code null}. * ! * @param source The {@code Component} object (container) * that originated the event * @param id An integer indicating the type of event. * For information on allowable values, see * the class description for {@link ContainerEvent} * @param child the component that was added or removed ! * @throws IllegalArgumentException if {@code source} is null * @see #getContainer() * @see #getID() * @see #getChild() */ public ContainerEvent(Component source, int id, Component child) {
*** 117,129 **** } /** * Returns the originator of the event. * ! * @return the <code>Container</code> object that originated ! * the event, or <code>null</code> if the object is not a ! * <code>Container</code>. */ public Container getContainer() { return (source instanceof Container) ? (Container)source : null; } --- 117,129 ---- } /** * Returns the originator of the event. * ! * @return the {@code Container} object that originated ! * the event, or {@code null} if the object is not a ! * {@code Container}. */ public Container getContainer() { return (source instanceof Container) ? (Container)source : null; }
< prev index next >