Archaeopteryx applets manual

Introduction

Two types of Archaeopteryx applets exist. One of them is embedded in a web page (ArchaeopteryxE) whereas the other one opens its own frame (ArchaeopteryxA).
An example of ArchaeopteryxE can be seen here and examples of ArchaeopteryxA are here.
All necessary classes for both types of Archaeopteryx applets are in the » archaeopteryx_applets.jar jar file
(the forester.jar jar file could also be used, but this is significantly larger since it contains many additional classes which are not needed for Archaeopteryx applets).

The main class for ArchaeopteryxE is: org.forester.archaeopteryx.ArchaeopteryxE.class

The main class for ArchaeopteryxA is: org.forester.archaeopteryx.ArchaeopteryxA.class

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

Parameters

Archaeopteryx applets use two parameters:

Example HTML for launching ArchaeopteryxE

<applet archive="archaeopteryx_applets.jar" code="org.forester.archaeopteryx.ArchaeopteryxE.class" codebase="http://www.myserver.org/path/to/archaeopteryx_applets_jar_directory" width="600" height="500" alt="ArchaeopteryxE is not working on your system (requires at least Sun Java 1.5)!"> <param name="url_of_tree_to_load" value="http://www.myserver.org/my_data/my_tree.xml"> <param name="config_file" value="http://www.myserver.org/my_data/my_config_file"> <param name="java_arguments" value="-Xmx512m"> </applet>

Example of ArchaeopteryxA launching JavaScript & HTML

The following is an example of a simple JavaScript for launching ArchaeopteryxA (it defines a function called openWin) [download it as archaeopteryx.js]:

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

The Archaeopteryx 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).

Last updated 2011.01.13

Archaeopteryx | www.phylosoft.org