@@ -11436,25 +11436,6 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
1143611436 return data;
1143711437 }
1143811438
11439- J2S._loadFileData = function(applet, fileName, fSuccess, fError, info) {
11440- info || (info = {});
11441- var isRaw = [];
11442- fileName = J2S._checkFileName(applet, fileName, isRaw);
11443- fSuccess = J2S._checkCache(applet, fileName, fSuccess);
11444- if (isRaw[0]) {
11445- J2S._getRawDataFromServer("_", fileName, fSuccess, fError, info);
11446- return;
11447- }
11448- info.type = "GET";
11449- info.dataType = "text";
11450- info.url = fileName;
11451- info.async = J2S._asynchronous;
11452- info.success = function(a) { J2S._loadSuccess(a, fSuccess) };
11453- info.error = function() { J2S._loadError(fError) };
11454- J2S._checkAjaxPost(info);
11455- J2S._ajax(info);
11456- }
11457-
1145811439 J2S._checkAjaxPost = function(info) {
1145911440 var pt = info.url.indexOf("?POST?");
1146011441 if (pt > 0) {
@@ -11530,7 +11511,27 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
1153011511
1153111512 var knownDomains = {};
1153211513
11533- J2S.getFileData = function(fileName, fSuccess, doProcess, info) {
11514+ // old? for Jmol? Not used in SwingJS
11515+ J2S._loadFileData = function(applet, fileName, fSuccess, fError, info) {
11516+ info || (info = {});
11517+ var isRaw = [];
11518+ fileName = J2S._checkFileName(applet, fileName, isRaw);
11519+ fSuccess = J2S._checkCache(applet, fileName, fSuccess);
11520+ if (isRaw[0]) {
11521+ J2S._getRawDataFromServer("_", fileName, fSuccess, fError, info);
11522+ return;
11523+ }
11524+ info.type = "GET";
11525+ info.dataType = "text";
11526+ info.url = fileName;
11527+ info.async = J2S._asynchronous;
11528+ info.success = function(a) { J2S._loadSuccess(a, fSuccess) };
11529+ info.error = function() { J2S._loadError(fError) };
11530+ J2S._checkAjaxPost(info);
11531+ J2S._ajax(info);
11532+ }
11533+
11534+ J2S.getFileData = function(fileName, fWhenDone, doProcess, info) {
1153411535 if (info === true)
1153511536 info = {isBinary: true};
1153611537 info || (info = {});
@@ -11567,18 +11568,18 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
1156711568 && fileName.indexOf(document.location.host) >= 0);
1156811569 var isHttps2Http = (J2S._httpProto == "https://" && fileName.indexOf("http://") == 0);
1156911570 var cantDoSynchronousLoad = (!isMyHost && J2S.$supportsIECrossDomainScripting());
11570- var mustCallHome = !isFile && (isHttps2Http || asBase64 || !fSuccess && cantDoSynchronousLoad);
11571+ var mustCallHome = !isFile && (isHttps2Http || asBase64 || !fWhenDone && cantDoSynchronousLoad);
1157111572 var url;
1157211573 var isNotDirectCall = !mustCallHome && !isFile && !isMyHost && !(url = J2S._isDirectCall(fileName));
1157311574 fileName = url || fileName;
1157411575 var data = null;
1157511576 if (mustCallHome || isNotDirectCall) {
11576- data = J2S._getRawDataFromServer("_", fileName, fSuccess, fSuccess ,
11577+ data = J2S._getRawDataFromServer("_", fileName, fWhenDone, fWhenDone ,
1157711578 asBase64, true, info);
1157811579 } else {
1157911580 fileName = fileName.replace(/file:\/\/\/\//, "file://"); // opera
1158011581 if (!isTyped)info.dataType = (isBinary ? "binary" : "text");
11581- info.async = !!fSuccess ;
11582+ info.async = !!fWhenDone ;
1158211583 if (isPost) {
1158311584 info.type = "POST";
1158411585 info.url = fileName.split("?POST?")[0]
@@ -11587,12 +11588,12 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
1158711588 info.type = "GET";
1158811589 info.url = fileName;
1158911590 }
11590- if (fSuccess ) {
11591- info.success = function(data) { fSuccess (J2S._xhrReturn(info.xhr)) };
11592- info.error = function() { fSuccess (info.xhr.statusText) };
11591+ if (fWhenDone ) {
11592+ info.success = function(data) { fWhenDone (J2S._xhrReturn(info.xhr)) };
11593+ info.error = function() { fWhenDone (info.xhr.statusText) };
1159311594 }
1159411595 info.xhr = J2S.$ajax(info);
11595- if (!fSuccess ) {
11596+ if (!fWhenDone ) {
1159611597 data = J2S._xhrReturn(info.xhr);
1159711598 if (data == null)
1159811599 doProcess = null;
@@ -11778,14 +11779,14 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
1177811779 case "java.util.Array":
1177911780 var e = Clazz.new_(Clazz.load("java.io.File").c$$S,
1178011781 [ file.name ]);
11781- swingjs.JSUtil.setFileBytesStatic$java_io_File $O(e, J2S._toBytes(data))
11782+ swingjs.JSUtil.setFileBytesStatic$$O $O(e, J2S._toBytes(data))
1178211783 arr.push(e);
1178311784 data = arr;
1178411785 break;
1178511786 case "java.io.File":
1178611787 var f = Clazz.new_(Clazz.load("java.io.File").c$$S,
11787- [ file.name ]);
11788- swingjs.JSUtil.setFileBytesStatic$java_io_File $O(f, J2S._toBytes(data));
11788+ [ J2S.getGlobal("j2s.tmpdir") + "OPEN/" + file.name ]);
11789+ swingjs.JSUtil.setFileBytesStatic$O $O(f, J2S._toBytes(data));
1178911790 data = f;
1179011791 break;
1179111792 case "ArrayBuffer":
@@ -13077,6 +13078,10 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
1307713078 }
1307813079 __nextExecution();
1307913080 };
13081+
13082+ J2S.showStatus = function(msg, doFadeout) {
13083+ Clazz._LoaderProgressMonitor.showStatus(msg, doFadeout);
13084+ }
1308013085
1308113086 J2S.debugClip = function() { return J2S._debugClip };
1308213087
@@ -14717,7 +14722,7 @@ Clazz.newInstance = function (objThis, args, isInner, clazz) {
1471714722 var haveFinals = (finalVars || outerObj && outerObj.$finals$);
1471814723 if (!outerObj || !objThis)
1471914724 return;
14720- var clazz1 = (outerObj.__CLASS_NAME__ ? getClazz(outerObj) : null);
14725+ var clazz1 = (outerObj.__CLASS_NAME__ || outerObj instanceof String ? getClazz(outerObj) : null);
1472114726 (!clazz1 || clazz1 == outerObj) && (outerObj = objThis);
1472214727
1472314728 if (haveFinals) {
@@ -15956,6 +15961,7 @@ Clazz.newInterface(java.lang,"Runnable");
1595615961
1595715962
1595815963;(function(){var P$=java.lang,I$=[[0,'java.util.stream.StreamSupport','java.util.Spliterators','java.lang.CharSequence$lambda1','java.lang.CharSequence$lambda2']],$I$=function(i){return I$[i]||(I$[i]=Clazz.load(I$[0][i]))};
15964+
1595915965var C$=Clazz.newInterface(P$, "CharSequence");
1596015966C$.$defaults$ = function(C$){
1596115967
0 commit comments