JAL-857 updated examples directory web pages to be dynamicaly decorated with jalview...
[jalview.git] / examples / linkedapplets_ng.html
1 <!--
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18 -->
19
20 <!-- boiler plate link to alternate demopage -->
21 <div style="width: 100%">
22 <div style="width:35%; align:left; float:right;">
23 <div style="margin:8px; padding:10px; border: 2px solid black; align: left;">
24 <p>Quick Links to jars for example:<br/><a href="jalviewApplet.jar">jalviewApplet.jar</a> and <a href="JmolApplet-12.2.4.jar">JmolApplet.jar</a>
25 </p></div>
26 </div>
27 </div>
28
29 <!-- content template start -->
30 <script src="javascript/deployJava.js"></script>
31 <script src="javascript/jshashtable-2.1.js" language="javascript"></script>
32 <script src="javascript/jalview.js" language="javascript"></script>
33 <script>  //deployJava.debug="true";
34   
35   function lJvApp() {
36     var jvapp = document.getElementById("jvapp");
37     var jvfollower = document.getElementById("jvfollower");
38     setConsole(document.getElementById("stdout"));
39     //jvapp.setSeparator(""+jvapp.getSeparator());
40     linkJvJmol(jvapp);
41   };
42
43   function lJvFollow() {
44     var jvapp = document.getElementById("jvapp");
45     var jvfollower = document.getElementById("jvfollower");
46     //jvfollower.setSeparator(""+jvfollower.getSeparator());
47     linkJvJmol(jvfollower);
48   };
49 </script>
50     <h2>JalviewLite Linked Applets Demo</h2>
51     <p>The two applets below use <a href="javascript:doSubmit('jalviewLiteJs')">JalviewLite's javascript API</a> to exchange events about the currently selected region and mouse position in the alignment.
52     </p>
53         <script> 
54   var attributes = {
55     code : 'jalview.bin.JalviewLite',
56     archive : 'jalviewApplet.jar,JmolApplet-12.2.4.jar',
57     width : 800,
58     height : 300,
59     mayscript : 'True', scriptable: 'True',
60     id : 'jvapp'
61   };
62   var parameters = {
63     oninit : "lJvApp",
64     automaticScrolling : "true",
65     file : "plantfdx.fa",
66     annotations : "plantfdx.annotations",
67     debug : "true",
68     wrap : "false",
69     // separator : "^",
70     showAnnotation : "true",
71     embedded : "true",
72     showFullId : "false",
73     RGB : "F2F2FF",
74     linkLabel_1 : "EMBL-EBI Search",
75     linkUrl_1 : "http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"
76     ,
77     linkLabel_2 : "Uniprot"
78     ,
79     linkUrl_2 : "http://www.uniprot.org/uniprot/$SEQUENCE_ID$",
80     permissions : 'sandbox',
81     APPLICATION_URL : "http://www.jalview.org/services/launchApp"
82   };
83  
84   deployJava.runApplet(attributes, parameters, '1.6');
85 </script>
86 <script> 
87   var attributes = {
88     code : 'jalview.bin.JalviewLite',
89     archive : 'jalviewApplet.jar,JmolApplet-12.2.4.jar',
90     width : 800,
91     height : 300,
92     mayscript : 'True', scriptable: 'True',
93     id : "jvfollower"
94   };
95   var parameters = {
96     oninit : "lJvFollow",
97     file : "plantfdx.fa",
98     annotations : "plantfdx.annotations",
99     automaticScrolling : "true",
100     debug : "true",
101     wrap : "false",
102     // separator : "^",
103     showAnnotation : "true",
104     embedded : "true",
105     showFullId : "false",
106     RGB : "F2F2FF",
107     linkLabel_1 : "EMBL-EBI Search",
108     linkUrl_1 : "http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"
109     ,
110     linkLabel_2 : "Uniprot",
111     linkUrl_2 : "http://www.uniprot.org/uniprot/$SEQUENCE_ID$",
112     permissions : 'sandbox',
113    APPLICATION_URL : "http://www.jalview.org/services/launchApp"
114   };
115   deployJava.runApplet(attributes, parameters, '1.6');
116 </script>
117     <p>
118 <!--      <a href="javascript:linkJvJmol()">Click Me If you don't see any messages below</a>
119       <br>
120        -->
121 <form name="console" id="console">
122 <textarea name="output"
123         id="stdout" rows="20" cols="80">Messages  will appear here.</textarea></form>
124       <br>
125 </p>
126 <!-- content template end -->