FileDocCategorySizeDatePackage
ContainerEvent.javaAPI DocAndroid 1.5 API2607Wed May 06 22:41:54 BST 2009java.awt.event

ContainerEvent

public class ContainerEvent extends ComponentEvent
This class is not supported in Android 1.0. It is merely provided to maintain interface compatibility with desktop Java implementations.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
public static final int
CONTAINER_FIRST
public static final int
CONTAINER_LAST
public static final int
COMPONENT_ADDED
public static final int
COMPONENT_REMOVED
private Component
child
Constructors Summary
public ContainerEvent(Component src, int id, Component child)


           
        super(src, id);
        this.child = child;
    
Methods Summary
public java.awt.ComponentgetChild()

        return child;
    
public java.lang.StringparamString()

        /* The format is based on 1.5 release behavior 
         * which can be revealed by the following code:
         * 
         * ContainerEvent e = new ContainerEvent(new Panel(),
         *          ContainerEvent.COMPONENT_ADDED,
         *          new Button("Button"));
         * System.out.println(e);
         */

        String idString = null;

        switch (id) {
        case COMPONENT_ADDED:
            idString = "COMPONENT_ADDED"; //$NON-NLS-1$
            break;
        case COMPONENT_REMOVED:
            idString = "COMPONENT_REMOVED"; //$NON-NLS-1$
            break;
        default:
            idString = "unknown type"; //$NON-NLS-1$
        }

        return (idString + ",child=" + child.getName()); //$NON-NLS-1$