Details
-
Type: Task
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 2.11.1
-
Fix Version/s: 2.11.1_js
-
Component/s: jalview-j2s
-
Labels:None
-
Epic Link:
Description
Issue for beta testers to track progress with JalviewJS - Please hit the 'Watch' link on the right to follow activity on this issue !
Latest instructions are:
Link for demo of JalviewJS embedded example:
https://builds.jalview.org/browse/JB-JB3/latest/artifact/shared/jalviewjs/jalview_embedded_example1.html
Embedding currently works by adding specially named divs on the page which JalviewJS locates and
inserts the contents of various windows. This is very much a proof of concept -- we needs lots of feedback from javascript natives about whether this is a sensible way to go.
To get JalviewJS on your own site then in principle, all you need to do is extract the tarball for JalviewJS linked to below to a directory and add the necessary Javascript includes.
https://builds.jalview.org/browse/JB-JB3/latest/artifact/shared/jalviewjs-site.tar.gz/site.tar.gz
The standard JalviewJS desktop page code looks like this:
<head>...<script src="swingjs/swingjs2.js"></script>
<script>
if (!self.SwingJS)alert('swingjs2.js was not found. It needs to be in swingjs folder
in the same directory as ' + document.location.href)
Info = {
code: null,
main: "jalview.bin.Jalview",
core: "jvexamplefile",
width: 850,
height: 550,
readyFunction: null,
serverURL: 'https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php',
j2sPath: 'swingjs/j2s',
console:'sysoutdiv',
allowjavascript: true
}
</script>
</head>
<body>
<script>
SwingJS.getApplet('testApplet', Info)
getClassList = function(){J2S._saveFile('_j2sclasslist.txt',
Clazz.ClassFilesLoaded.sort().join('\n'))}
</script>
<div style="position:left:900px;top:30px;width:600px;height:300px;">
<div id="sysoutdiv" style="border:1px solid
green;width:100%;height:95%;overflow:auto"></div>
This is System.out. <a href="javascript:testApplet._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>
</div>
</body>
You probably want to have the 'sysoutdiv' hidden or omitted, of course. By default,
jalview.bin.Jalview via JalviewJS will look at the first argument passed on the URL
and process it as a Jalview command line.
Latest instructions are:
Link for demo of JalviewJS embedded example:
https://builds.jalview.org/browse/JB-JB3/latest/artifact/shared/jalviewjs/jalview_embedded_example1.html
Embedding currently works by adding specially named divs on the page which JalviewJS locates and
inserts the contents of various windows. This is very much a proof of concept -- we needs lots of feedback from javascript natives about whether this is a sensible way to go.
To get JalviewJS on your own site then in principle, all you need to do is extract the tarball for JalviewJS linked to below to a directory and add the necessary Javascript includes.
https://builds.jalview.org/browse/JB-JB3/latest/artifact/shared/jalviewjs-site.tar.gz/site.tar.gz
The standard JalviewJS desktop page code looks like this:
<head>...<script src="swingjs/swingjs2.js"></script>
<script>
if (!self.SwingJS)alert('swingjs2.js was not found. It needs to be in swingjs folder
in the same directory as ' + document.location.href)
Info = {
code: null,
main: "jalview.bin.Jalview",
core: "jvexamplefile",
width: 850,
height: 550,
readyFunction: null,
serverURL: 'https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php',
j2sPath: 'swingjs/j2s',
console:'sysoutdiv',
allowjavascript: true
}
</script>
</head>
<body>
<script>
SwingJS.getApplet('testApplet', Info)
getClassList = function(){J2S._saveFile('_j2sclasslist.txt',
Clazz.ClassFilesLoaded.sort().join('\n'))}
</script>
<div style="position:left:900px;top:30px;width:600px;height:300px;">
<div id="sysoutdiv" style="border:1px solid
green;width:100%;height:95%;overflow:auto"></div>
This is System.out. <a href="javascript:testApplet._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>
</div>
</body>
You probably want to have the 'sysoutdiv' hidden or omitted, of course. By default,
jalview.bin.Jalview via JalviewJS will look at the first argument passed on the URL
and process it as a Jalview command line.