-
Notifications
You must be signed in to change notification settings - Fork 0
/
coverJava.htm
84 lines (65 loc) · 2.2 KB
/
coverJava.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<title>HTML5-only and WebGL Jmol Demo</title>
<meta charset="utf-8">
<script type="text/javascript" src="JSmol.min.js"></script>
<script type="text/javascript">
var jmolApplet0; // set up in HTML table, below
var Info;
// note that the variable name MUST match the first parameter in quotes
;(function() {
// ?_USE=JAVA ?_USE=SIGNED ?_USE=HTML5
// Developers: The _debugCode flag is checked in j2s/java/core.z.js,
// and, if TRUE, skips loading the core methods, forcing those
// to be read from their individual directories. Set this
// true if you want to do some code debugging by inserting
// System.out.println, document.title, or alert commands
// anywhere in the Java or Jmol code.
var s = document.location.search;
Jmol._debugCode = (s.indexOf("debugcode") >= 0);
jmol_isReady = function(applet) {
document.title = (applet._id + " is ready")
Jmol._getElement(applet, "appletdiv").style.border="1px solid blue"
}
Info = {
width: 300,
height: 300,
debug: false,
color: "white",
addSelectionOptions: false,
serverURL: "http://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php",
use: "HTML5",
coverImage: "data/1hxw.png", // initial image instead of applet
coverScript: "", // special script for click of cover image (otherwise equal to script)
deferApplet: true, // wait to load applet until click
deferUncover: true, // wait to uncover applet until script completed
jarPath: "java",
j2sPath: "j2s",
jarFile: "JmolAppletSigned.jar",
isSigned: true,
//disableJ2SLoadMonitor: true,
//disableInitialConsole: true,
readyFunction: jmol_isReady,
//defaultModel: "$dopamine",
script: "load data/1hxw.png;"
}
})();
$(document).ready(function(){
Info.deferApplet = true;
Info.deferUncover = true;
Info.use="JAVA";
$("#appletplace2").html(Jmol.getAppletHtml("jmol2", Info));
});
</script>
</head>
<body>
<table width=1000 cellpadding=10>
<tr>
<td valign=top>
<div id="appletplace2"></div>
JAVA mode: In this canvas we just have an image. Clicking on the image will load the JAVA code and display the model.
</td>
</tr></table>
</body>
</html>