ATV applet manual

Introduction

All necessary classes for ATV applet are in the » forester.jar jar file.

The main class for ATV applet is org.forester.atv.ATVapplet.class.

ATV applet can be launched with the applet tag ([sun] [w3schools] [w3c]) which might be best accomplished by using JavaScript.

Parameters

ATV applet currently uses two parameters:

Example of ATV launching JavaScript & HTML

The following is an example of a simple JavaScript for launching ATV applet (it defines a function called openWin):

<script language="JavaScript"> <!-- function openWin( dataurl, configfile ) { atv_window = open("", "atv_window", "width=300,height=150,status=no,toolbar=no,menubar=no,resizable=yes"); // open document for further output atv_window.document.open(); // create document atv_window.document.writeln( "<HTML>" ); atv_window.document.writeln( "<HEAD>" ); atv_window.document.writeln( "<TITLE>ATV Launchpad</TITLE>" ); atv_window.document.writeln( "</HEAD>" ); atv_window.document.writeln( "<BODY TEXT=\"#FFFFFF\" BGCOLOR=\"#000000\">" ); atv_window.document.writeln( "<FONT FACE=\"HELVETICA,ARIAL\">" ); atv_window.document.writeln( "<CENTER>" ); atv_window.document.writeln( "<B>Please do not close this window as long as you want to use ATV.</B>" ); atv_window.document.write( "<APPLET ARCHIVE=\"forester.jar\"" ); atv_window.document.write( " CODEBASE=\"http://path/to/forester_jar_directory\"" ); atv_window.document.write( " CODE=\"org.forester.atv.ATVapplet.class\"" ); atv_window.document.write( " NAME=\"ATV" ); atv_window.document.write( " WIDTH=\"220\" HEIGHT=\"60\"" ); atv_window.document.writeln( " ALT=\"ATV Applet is not working on your system (requires at least Sun Java 1.5)!\">" ); atv_window.document.writeln( "<PARAM NAME=\"url_of_tree_to_load\" VALUE=\"" + dataurl + "\">" ); atv_window.document.writeln( "<PARAM NAME=\"config_file\" VALUE=\"" + configfile + "\">" ); atv_window.document.writeln( "Your browser is completely ignoring the &lt;APPLET&gt; tag!" ); atv_window.document.writeln( "</APPLET>" ); atv_window.document.writeln( "</CENTER>" ); atv_window.document.writeln( "</BODY>" ); atv_window.document.writeln( "</HTML>" ); // close the document - (not the window!) atv_window.document.close(); } // --> </script>

The ATV launching JavaScript function (openWin) is called with the following HTML code:

<a href="#" onClick="openWin( 'http://path/to/phylogeny_files/my_phylogeny_1', 'http://path/to/config_files/my_config_file' )"> phylogeny 1 </a>

Note

Please note that when using Java applets everything (jar archive containing the necessary classes, data files, and configuration files) has to originate from the same server (for security reasons).

Examples

ATV applet examples

Last updated 2007-06-12

ATV | www.phylosoft.org