// SwingJS.js\r
\r
+// BH 7/24/2015 9:09:39 AM allows setting Info.resourcePath\r
// BH 4/28/2015 10:15:32 PM adds getAppletHtml \r
// BH 4/2/2015 5:17:44 PM adds SwingJS.getJavaResource(path)\r
\r
return SwingJS._Applet._get(id, Info, checkOnly);\r
}\r
\r
- SwingJS.getJavaResource = function(path) {\r
+ SwingJS.getJavaResource = function(path, isJavaPath) {\r
if (path.indexOf("http") != 0) {\r
var applet = Jmol._applets[java.lang.Thread.currentThread().getName()];\r
- path = (applet.__Info.resourcePath || applet.__Info.j2sPath) + "/" + path\r
+ path = (!isJavaPath && applet.__Info.resourcePath || applet.__Info.j2sPath) + "/" + path\r
} \r
- System.out.println("Swingjs.js getJavaResource " + path);\r
+ System.out.println("Swingjs.js getJavaResource " + path)\r
var s = Jmol._getFileData(path);\r
- System.out.println(s);\r
if (s.indexOf("[Exception") == 0)\r
return null; \r
- System.out.println("Swingjs.js getJavaResource len=" + s.length);\r
if (path.lastIndexOf(".css") == path.length - 4) {\r
path = path.substring(0, path.lastIndexOf("/") + 1) + "images/";\r
s = s.replace(/images\//g, path)\r