package alive;


import java.applet.*;

/**
 * <ALIVE Project>
 * Applet/Application Launcher Class
 * By Rogerio Neves
 * LSI - POLI - USP
 */

public class LauncherLT extends Applet {
  private boolean isStandalone = false;
  //Get a parameter value
  public String getParameter(String key, String def) {
    return isStandalone ? System.getProperty(key, def) :
      (getParameter(key) != null ? getParameter(key) : def);
  }
  //Initialize the applet
  public void init() {
  }
  //Start the applet
  public void start() {
    EnvConfig config = new EnvConfig();
    if (isStandalone) config.codeBase = "file:./";
    else config.codeBase = getCodeBase().toString();
    xp1_Environment env = new xp1_Environment(config);
  }
  //Stop the applet
  public void stop() {
  }
  //Get Applet information
  public String getAppletInfo() {
    return "Simple Launcher for ALIVE Experiment";
  }
  //Get parameter info
  public String[][] getParameterInfo() {
    return null;
  }
  //Main method
  public static void main(String[] args) {
    LauncherLT applet = new LauncherLT();
    applet.isStandalone = true;
    applet.init();
    applet.start();
  }
}