001 package com.croftsoft.core.lang.lifecycle;
002
003 import java.applet.Applet;
004
005 import com.croftsoft.core.lang.NullArgumentException;
006
007 /*********************************************************************
008 * Wraps the Lifecycle interface around an Applet.
009 *
010 * @version
011 * 2003-06-04
012 * @since
013 * 2003-06-04
014 * @author
015 * <a href="http://www.CroftSoft.com/">David Wallace Croft</a>
016 *********************************************************************/
017
018 public final class AppletLifecycle
019 implements Lifecycle
020 //////////////////////////////////////////////////////////////////////
021 //////////////////////////////////////////////////////////////////////
022 {
023
024 private final Applet applet;
025
026 //////////////////////////////////////////////////////////////////////
027 //////////////////////////////////////////////////////////////////////
028
029 public AppletLifecycle ( Applet applet )
030 //////////////////////////////////////////////////////////////////////
031 {
032 NullArgumentException.check ( this.applet = applet );
033 }
034
035 //////////////////////////////////////////////////////////////////////
036 //////////////////////////////////////////////////////////////////////
037
038 public void init ( ) { applet.init ( ); }
039
040 public void start ( ) { applet.start ( ); }
041
042 public void stop ( ) { applet.stop ( ); }
043
044 public void destroy ( ) { applet.destroy ( ); }
045
046 //////////////////////////////////////////////////////////////////////
047 //////////////////////////////////////////////////////////////////////
048 }