JAL-3368 retaining branch for future SwingJS reference
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Tue, 15 Oct 2019 10:10:31 +0000 (06:10 -0400)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Tue, 15 Oct 2019 10:10:31 +0000 (06:10 -0400)
src/jalview/util/Platform.java

index 11f7988..ffecebb 100644 (file)
@@ -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;
       }
-
     }
   }