Path: blob/master/src/java.desktop/share/classes/java/beans/AppletInitializer.java
41152 views
/*1* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.beans;2627import java.applet.Applet;2829import java.beans.beancontext.BeanContext;3031/**32* This interface is designed to work in collusion with java.beans.Beans.instantiate.33* The interface is intended to provide mechanism to allow the proper34* initialization of JavaBeans that are also Applets, during their35* instantiation by java.beans.Beans.instantiate().36*37* @see java.beans.Beans#instantiate38*39* @since 1.240*41* @deprecated The Applet API is deprecated. See the42* <a href="../applet/package-summary.html"> java.applet package43* documentation</a> for further information.44*/45@Deprecated(since = "9", forRemoval = true)46public interface AppletInitializer {4748/**49* <p>50* If passed to the appropriate variant of java.beans.Beans.instantiate51* this method will be called in order to associate the newly instantiated52* Applet (JavaBean) with its AppletContext, AppletStub, and Container.53* </p>54* <p>55* Conformant implementations shall:56* <ol>57* <li> Associate the newly instantiated Applet with the appropriate58* AppletContext.59*60* <li> Instantiate an AppletStub() and associate that AppletStub with61* the Applet via an invocation of setStub().62*63* <li> If BeanContext parameter is null, then it shall associate the64* Applet with its appropriate Container by adding that Applet to its65* Container via an invocation of add(). If the BeanContext parameter is66* non-null, then it is the responsibility of the BeanContext to associate67* the Applet with its Container during the subsequent invocation of its68* addChildren() method.69* </ol>70*71* @param newAppletBean The newly instantiated JavaBean72* @param bCtxt The BeanContext intended for this Applet, or73* null.74*/75@SuppressWarnings("removal")76void initialize(Applet newAppletBean, BeanContext bCtxt);7778/**79* <p>80* Activate, and/or mark Applet active. Implementors of this interface81* shall mark this Applet as active, and optionally invoke its start()82* method.83* </p>84*85* @param newApplet The newly instantiated JavaBean86*/87@SuppressWarnings("removal")88void activate(Applet newApplet);89}909192