home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / beans / AppletInitializer.java next >
Encoding:
Java Source  |  1998-03-20  |  2.4 KB  |  81 lines

  1. /*
  2.  * @(#)AppletInitializer.java    1.2 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.beans;
  16.  
  17. import java.applet.Applet;
  18.  
  19. import java.beans.beancontext.BeanContext;
  20.  
  21. /**
  22.  * <p>
  23.  * This interface is designed to work in collusion with java.beans.Beans.instantiate.
  24.  * The interafce is intended to provide mechanism to allow the proper 
  25.  * initialization of JavaBeans that are also Applets, during their
  26.  * instantiation by java.beans.Beans.instantiate().
  27.  * </p>
  28.  *
  29.  * @see java.beans.Bean.instantiate
  30.  *
  31.  * @version 1.2
  32.  * @since JDK1.2
  33.  *
  34.  */
  35.  
  36.  
  37. public interface AppletInitializer {
  38.  
  39.     /**
  40.      * <p>
  41.      * If passed to the appropriate variant of java.beans.Beans.instantiate
  42.      * this method will be called in order to associate the newly instantiated
  43.      * Applet (JavaBean) with its AppletContext, AppletStub, and Container.
  44.      * </p>
  45.      * <p>
  46.      * Conformant implementations shall:
  47.      * <ol>
  48.      * <li> Associate the newly instantiated Applet with the appropriate
  49.      * AppletContext.
  50.      *
  51.      * <li> Instantiate an AppletStub() and associate that AppletStub with
  52.      * the Applet via an invocation of setStub().
  53.      *
  54.      * <li> If BeanContext parameter is null, then it shall associate the
  55.      * Applet with its appropriate Container by adding that Applet to its
  56.      * Container via an invocation of add(). If the BeanContext parameter is
  57.      * non-null, then it is the responsibility of the BeanContext to associate
  58.      * the Applet with its Container during the subsequent invocation of its
  59.      * addChildren() method.
  60.      * </ol>
  61.      * </p>
  62.      *
  63.      * @param The newly instantiated JavaBean
  64.      * @param The BeanContext intended for this Applet, or null.
  65.      */
  66.  
  67.     void initialize(Applet newAppletBean, BeanContext bCtxt);
  68.  
  69.     /**
  70.      * <p>
  71.      * Activate, and/or mark Applet active. Implementors of this interface
  72.      * shall mark this Applet as active, and optionally invoke its start()
  73.      * method.
  74.      * </p>
  75.      *
  76.      * @param The newly instantiated JavaBean
  77.      */
  78.  
  79.     void activate(Applet newApplet);
  80. }
  81.