4 <title>Embedded JalviewJS Example 2</title><meta charset="utf-8" />
5 <script src="swingjs/swingjs2.js"></script>
8 // NOTE: The applet on this page is "Jalview".
10 // BH 2019.10.06 adds Tree and Pca functionality
11 // BH see issue JAL-3451
13 if (!self.SwingJS)alert('swingjs2.js was not found. It needs to be in swingjs folder in the same directory as ' + document.location.href)
16 main: "jalview.bin.JalviewJS2",
20 oninit:function() {$("#links").show();},
24 serverURL: 'https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php',
25 j2sPath: 'swingjs/j2s',
30 jvGet = function(what) {
33 alert(Jalview1.getApp().getSelectedSequences());
36 alert(Jalview2.getApp().getSelectedSequences());
39 alert(Jalview1.getApp().getSelectedSequencesAsAlignment("fasta",true));
42 alert(Jalview2.getApp().getSelectedSequencesAsAlignment("fasta",true));
48 $(document).ready(function() {
50 SwingJS.getApplet('Jalview1', Info);
51 SwingJS.getApplet('Jalview2', Info);
57 <body style="background-image: url(images/coolVeryLightBG.png);">
58 <table style="width:1000px;border:2px solid lightblue;border-spacing:0;font-size:16pt;" padding="10" valign="top">
60 <td style="font-size:24;font-weight:bold;background-color:lightblue" colspan=2><center>Demonstration of embedded JalviewJS components</center>
67 <td colspan=2 valign=top style="padding:20px;background-color:lightgray">
68 this page tests two Jalview apps on the same page.
69 <div id="Jalview1-desktop-div" style="width:0px;height:0px;"></div>
70 <div id="Jalview2-desktop-div" style="width:0px;height:0px;"></div>
72 <tr><td style="background-color:lightgray;padding:10px">
73 <div id="Jalview1-alignment-div" style="padding:10px;position:relative;width:550px;height:300px">
75 <td style="background-color:lightgray;padding:10px">
76 <div id="Jalview2-alignment-div" style="padding:10px;position:relative;width:550px;height:300px">
80 <div style="display:block;width:500px;height:300px;">
81 <div id="sysoutdiv" style="border:1px solid green;width:100%;height:95%;overflow:auto"></div>
82 This is System.out. <a href="javascript:J2S.thisApplet._clearConsole()">clear it</a> <br>Add ?j2snocore to URL to see full class list; ?j2sdebug to use uncompressed j2s/core files <br><a href="javascript:getClassList()">get _j2sClassList.txt</a>
86 <div id=links style="display:none">
87 <a href="javascript:jvGet('select1')">Show Jalview1 selections</a>
89 <a href="javascript:jvGet('select2')">Show Jalview2 selections</a>
92 <a href="javascript:jvGet('select1fasta')">Show Jalview1 selections (fasta)</a>
94 <a href="javascript:jvGet('select2fasta')">Show Jalview2 selections (fasta)</a>