From: hansonr Date: Tue, 15 Oct 2019 10:10:31 +0000 (-0400) Subject: JAL-3368 retaining branch for future SwingJS reference X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4ac85f169f84dc3935971ddaff16aca651505f75;p=jalview.git JAL-3368 retaining branch for future SwingJS reference --- diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index 11f7988..ffecebb 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -335,13 +335,12 @@ public class Platform if (!isJS() || data == null) { return; - } - /** - * @j2sNative - * - * swingjs.JSUtil.cacheFileData$S$O(path, data); - * - */ + } /** + * @j2sNative + * + * swingjs.JSUtil.cacheFileData$S$O(path, data); + * + */ } public static void cacheFileData(File file) @@ -440,13 +439,12 @@ public class Platform { BrowserLauncher.openURL(url); return false; - } - /** - * @j2sNative - * - * - * window.open(url); - */ + } /** + * @j2sNative + * + * + * window.open(url); + */ return true; } @@ -535,8 +533,7 @@ public class Platform public static Object parseJSON(String json) throws ParseException { - return (isJS() ? JSON.parse(json) - : new JSONParser().parse(json)); + return (isJS() ? JSON.parse(json) : new JSONParser().parse(json)); } public static Object parseJSON(Reader r) @@ -614,13 +611,12 @@ public class Platform if (isJS()) { System.out.println( - "Platform adding known access-control-allow-origin * for domain " - + domain); - /** - * @j2sNative - * - * J2S.addDirectDatabaseCall(domain); - */ + "Platform adding known access-control-allow-origin * for domain " + + domain);/** + * @j2sNative + * + * J2S.addDirectDatabaseCall(domain); + */ } } @@ -719,7 +715,8 @@ public class Platform return Regex.perlCode(code); } - /** + /** + * Convert a color name to a Color object. SwingJS can do this natively. * @param c */ public static Color getColorFromName(String name) @@ -766,7 +763,6 @@ public class Platform default: return null; } - } }