JAL-957 first attempt to build examples with jbake
[jalview.git] / examples-jbake / templates / jvl_linkedapplets_ng.ftl
1 <script src="http://www.java.com/js/deployJava.js"></script>
2 <script src="javascript/jalview.js" language="javascript"></script>
3 <script>  //deployJava.debug="true";
4   
5   function lJvApp() {
6     var jvapp = document.getElementById("jvapp");
7     var jvfollower = document.getElementById("jvfollower");
8     setConsole(document.getElementById("stdout"));
9     //jvapp.setSeparator(""+jvapp.getSeparator());
10     linkJvJmol(jvapp);
11   };
12
13   function lJvFollow() {
14     var jvapp = document.getElementById("jvapp");
15     var jvfollower = document.getElementById("jvfollower");
16     //jvfollower.setSeparator(""+jvfollower.getSeparator());
17     linkJvJmol(jvfollower);
18   };
19 </script>
20     <strong>JalviewLite Linked Applets Demo<br></strong>
21     <p>The two applets below use <a href="JalviewLiteJs.html">JalviewLite's javascript API</a> to exchange events about the currently selected region and mouse position in the alignment.
22     </p>
23         <script> 
24   var attributes = {
25     code : 'jalview.bin.JalviewLite',
26     archive : 'jalviewApplet.jar',
27     width : 800,
28     height : 300,
29     mayscript : 'True', scriptable: 'True',
30     id : 'jvapp'
31   };
32   var parameters = {
33     oninit : "lJvApp",
34     automaticScrolling : "true",
35     file : "plantfdx.fa",
36     annotations : "plantfdx.annotations",
37     debug : "true",
38     wrap : "false",
39     // separator : "^",
40     showAnnotation : "true",
41     embedded : "true",
42     showFullId : "false",
43     RGB : "F2F2FF",
44     linkLabel_1 : "EMBL-EBI Search",
45     linkUrl_1 : "http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"
46     ,
47     linkLabel_2 : "Uniprot"
48     ,
49     linkUrl_2 : "http://www.uniprot.org/uniprot/$SEQUENCE_ID$",
50     permissions : 'all-permissions',
51     APPLICATION_URL : "http://www.jalview.org/services/launchApp"
52   };
53  
54   deployJava.runApplet(attributes, parameters, '1.6+');
55 </script>
56 <script> 
57   var attributes = {
58     code : 'jalview.bin.JalviewLite',
59     archive : 'jalviewApplet.jar',
60     width : 800,
61     height : 300,
62     mayscript : 'True', scriptable: 'True',
63     id : "jvfollower"
64   };
65   var parameters = {
66     oninit : "lJvFollow",
67     file : "plantfdx.fa",
68     annotations : "plantfdx.annotations",
69     automaticScrolling : "true",
70     debug : "true",
71     wrap : "false",
72     // separator : "^",
73     showAnnotation : "true",
74     embedded : "true",
75     showFullId : "false",
76     RGB : "F2F2FF",
77     linkLabel_1 : "EMBL-EBI Search",
78     linkUrl_1 : "http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"
79     ,
80     linkLabel_2 : "Uniprot"
81     ,
82     linkUrl_2 : "http://www.uniprot.org/uniprot/$SEQUENCE_ID$",
83     permissions : 'all-permissions',
84    APPLICATION_URL : "http://www.jalview.org/services/launchApp"
85   };
86   deployJava.runApplet(attributes, parameters, '1.6+');
87 </script>
88     <p>
89 <!--      <a href="javascript:linkJvJmol()">Click Me If you don't see any messages below</a>
90       <br>
91        --><form name="console" id="console"><textarea name="output"
92         id="stdout" rows="20" cols="80">Messages  will appear here.</textarea></form>
93       <br>
94 </p>