001        package com.croftsoft.apps.exemplar;
002         
003        import javax.swing.JApplet;
004         
005        import com.croftsoft.core.lang.lifecycle.*;
006         
007        /***********************************************************************
008        * Applet.
009        *
010        * @version
011        *   $Id: ExemplarApplet.java,v 1.4 2008/02/15 22:38:03 croft Exp $
012        * @since
013        *   2006-12-16
014        * @author
015        *   <a href="https://www.croftsoft.com/">David Wallace Croft</a>
016        ***********************************************************************/
017         
018        public final class  ExemplarApplet
019          extends JApplet
020          implements Lifecycle
021        ////////////////////////////////////////////////////////////////////////
022        ////////////////////////////////////////////////////////////////////////
023        {
024           
025        private static final long  serialVersionUID = 0L;
026         
027        //
028         
029        // private static final String  EXAMPLE_PARAMETER = "example";
030         
031        //
032           
033        private final ExemplarMain  exemplarMain;
034         
035        ////////////////////////////////////////////////////////////////////////
036        ////////////////////////////////////////////////////////////////////////
037           
038        public  ExemplarApplet ( )
039        ////////////////////////////////////////////////////////////////////////
040        {
041          exemplarMain = new ExemplarMain ( null );
042        }
043         
044        ////////////////////////////////////////////////////////////////////////
045        // overridden applet methods
046        ////////////////////////////////////////////////////////////////////////
047         
048        @Override
049        public String  getAppletInfo ( )
050        ////////////////////////////////////////////////////////////////////////
051        {
052          return exemplarMain.getExemplarConfig ( ).getInfo ( );
053        }
054         
055        @Override
056        public void  init ( )
057        ////////////////////////////////////////////////////////////////////////
058        {
059          // final ExemplarConfig  exemplarConfig
060          //   = exemplarMain.getExemplarConfig ( );
061           
062          // exemplarConfig.setCodeBase ( getCodeBase ( ) );
063           
064          exemplarMain.setContentPane ( getContentPane ( ) );
065           
066          // exemplarConfig.setExampleParameter (
067          //   getParameter ( EXAMPLE_PARAMETER ) );
068           
069          LifecycleLib.init ( exemplarMain );
070        }
071         
072        @Override
073        public void  start ( )
074        ////////////////////////////////////////////////////////////////////////
075        {
076          LifecycleLib.start ( exemplarMain );
077        }
078         
079        @Override
080        public void  stop ( )
081        ////////////////////////////////////////////////////////////////////////
082        {
083          LifecycleLib.stop ( exemplarMain );
084        }
085         
086        @Override
087        public void  destroy ( )
088        ////////////////////////////////////////////////////////////////////////
089        {
090          LifecycleLib.destroy ( exemplarMain );
091        }
092         
093        ////////////////////////////////////////////////////////////////////////
094        ////////////////////////////////////////////////////////////////////////
095        }