19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package sun.applet; 27 28 import java.util.EventListener; 29 import java.io.Serializable; 30 import java.io.ObjectOutputStream; 31 import java.io.IOException; 32 33 /** 34 * AppletEventMulticaster class. This class manages an immutable 35 * structure consisting of a chain of AppletListeners and is 36 * responsible for dispatching events to them. 37 * 38 * @author Sunita Mani 39 */ 40 public class AppletEventMulticaster implements AppletListener { 41 42 private final AppletListener a, b; 43 44 public AppletEventMulticaster(AppletListener a, AppletListener b) { 45 this.a = a; this.b = b; 46 } 47 48 public void appletStateChanged(AppletEvent e) { 49 a.appletStateChanged(e); 50 b.appletStateChanged(e); 51 } 52 53 /** 54 * Adds Applet-listener-a with Applet-listener-b and 55 * returns the resulting multicast listener. 56 * @param a Applet-listener-a 57 * @param b Applet-listener-b 58 */ 59 public static AppletListener add(AppletListener a, AppletListener b) { | 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package sun.applet; 27 28 import java.util.EventListener; 29 import java.io.Serializable; 30 import java.io.ObjectOutputStream; 31 import java.io.IOException; 32 33 /** 34 * AppletEventMulticaster class. This class manages an immutable 35 * structure consisting of a chain of AppletListeners and is 36 * responsible for dispatching events to them. 37 * 38 * @author Sunita Mani 39 * 40 * @deprecated The Applet API is deprecated. See the 41 * <a href="../../java/applet/package-summary.html"> java.applet package 42 * documentation</a> for further information. 43 */ 44 @Deprecated(since = "9") 45 public class AppletEventMulticaster implements AppletListener { 46 47 private final AppletListener a, b; 48 49 public AppletEventMulticaster(AppletListener a, AppletListener b) { 50 this.a = a; this.b = b; 51 } 52 53 public void appletStateChanged(AppletEvent e) { 54 a.appletStateChanged(e); 55 b.appletStateChanged(e); 56 } 57 58 /** 59 * Adds Applet-listener-a with Applet-listener-b and 60 * returns the resulting multicast listener. 61 * @param a Applet-listener-a 62 * @param b Applet-listener-b 63 */ 64 public static AppletListener add(AppletListener a, AppletListener b) { |