001 package com.croftsoft.apps.jogl;
002
003 import javax.swing.JApplet;
004
005 import com.croftsoft.core.lang.lifecycle.*;
006
007 /***********************************************************************
008 * Applet wrapper.
009 *
010 * @version
011 * $Id: JoglApplet.java,v 1.4 2008/02/18 23:28:00 croft Exp $
012 * @since
013 * 2008-02-10
014 * @author
015 * <a href="https://www.croftsoft.com/">David Wallace Croft</a>
016 ***********************************************************************/
017
018 public final class JoglApplet
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 JoglMain joglMain;
034
035 ////////////////////////////////////////////////////////////////////////
036 ////////////////////////////////////////////////////////////////////////
037
038 public JoglApplet ( )
039 ////////////////////////////////////////////////////////////////////////
040 {
041 joglMain = new JoglMain ( null );
042 }
043
044 ////////////////////////////////////////////////////////////////////////
045 // overridden applet methods
046 ////////////////////////////////////////////////////////////////////////
047
048 @Override
049 public String getAppletInfo ( )
050 ////////////////////////////////////////////////////////////////////////
051 {
052 return joglMain.getJoglConfig ( ).getInfo ( );
053 }
054
055 @Override
056 public void init ( )
057 ////////////////////////////////////////////////////////////////////////
058 {
059 // final JoglConfig joglConfig
060 // = joglMain.getJoglConfig ( );
061
062 // joglConfig.setCodeBase ( getCodeBase ( ) );
063
064 joglMain.setContentPane ( getContentPane ( ) );
065
066 // joglConfig.setExampleParameter (
067 // getParameter ( EXAMPLE_PARAMETER ) );
068
069 LifecycleLib.init ( joglMain );
070 }
071
072 @Override
073 public void start ( )
074 ////////////////////////////////////////////////////////////////////////
075 {
076 LifecycleLib.start ( joglMain );
077 }
078
079 @Override
080 public void stop ( )
081 ////////////////////////////////////////////////////////////////////////
082 {
083 LifecycleLib.stop ( joglMain );
084 }
085
086 @Override
087 public void destroy ( )
088 ////////////////////////////////////////////////////////////////////////
089 {
090 LifecycleLib.destroy ( joglMain );
091 }
092
093 ////////////////////////////////////////////////////////////////////////
094 ////////////////////////////////////////////////////////////////////////
095 }