/* * Top level applet driver. * * Copyright 2000 Andy Gill * * $Revision: 1.1 $ * $Date: 2000/09/15 16:14:17 $ */ import java.applet.*; import java.net.*; /** * @version 0.1 * @author Andy Gill */ /** *
* Top level applet driver. *
*/ public class HoodApplet extends Applet { /** * Typical use of Hood as an applet might be ** <HEADER> * <TITLE>Haskell Object Observation Debugger</TITLE> * </HEADER> * <BODY BGCOLOR="#cccc99"> * <P ALIGN="CENTER"> * <APPLET code="Hood.class" width=500 height=300>> * <PARAM name="URL" * value="file:/d:/Ideas/Debugger/observe.xml"> * </APPLET> * </P> * </BODY> **/ public void init() { Message.applet(); String filename = getParameter("file"); String path = getDocumentBase().toString(); String fileSep = System.getProperty("file.separator"); int n = path.lastIndexOf(fileSep); if (n == -1) { n = path.lastIndexOf('\\'); } if (n == -1) { n = path.lastIndexOf('/'); } if (n != -1) { String file = path.substring(0,n+1) + filename; Message.message(file); new HoodTopLevel(file, this, getImage(getCodeBase(),"hood.gif") ); } } }