Jalview-JS/JAL-3253-applet additional static final preferences
[jalview.git] / src / jalview / bin / Cache.java
index c95b507..4dac4df 100755 (executable)
@@ -22,7 +22,7 @@ package jalview.bin;
 
 import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
 import jalview.datamodel.PDBEntry;
-import jalview.gui.UserDefinedColours;
+import jalview.gui.Preferences;
 import jalview.schemes.ColourSchemeLoader;
 import jalview.schemes.ColourSchemes;
 import jalview.schemes.UserColourScheme;
@@ -510,7 +510,7 @@ public class Cache implements ApplicationSingletonI
             getDefault("sifts_cache_threshold_in_days",
                     DEFAULT_CACHE_THRESHOLD_IN_DAYS));
 
-    IdOrgSettings.setUrl(getDefault("ID_ORG_HOSTURL",
+    IdOrgSettings.setUrl(getDefault(Preferences.ID_ORG_HOSTURL,
             "http://www.jalview.org/services/identifiers"));
     IdOrgSettings.setDownloadLocation(ID_ORG_FILE);
 
@@ -518,7 +518,7 @@ public class Cache implements ApplicationSingletonI
             .println("Jalview Version: " + codeVersion + codeInstallation);
 
     StructureImportSettings.setDefaultStructureFileFormat(jalview.bin.Cache
-            .getDefault("PDB_DOWNLOAD_FORMAT", PDB_DOWNLOAD_FORMAT));
+            .getDefault(Preferences.PDB_DOWNLOAD_FORMAT, PDB_DOWNLOAD_FORMAT));
     StructureImportSettings
             .setDefaultPDBFileParser(DEFAULT_PDB_FILE_PARSER);
     // StructureImportSettings
@@ -598,7 +598,7 @@ public class Cache implements ApplicationSingletonI
     setProperty("VERSION", codeVersion);
 
     // LOAD USERDEFINED COLOURS
-    initUserColourSchemes(getProperty("USER_DEFINED_COLOURS"));
+    initUserColourSchemes(getProperty(Preferences.USER_DEFINED_COLOURS));
   }
 
   private void deleteBuildProperties()
@@ -1137,13 +1137,13 @@ public class Cache implements ApplicationSingletonI
     {
       if (coloursFound.toString().length() > 1)
       {
-        setProperty(UserDefinedColours.USER_DEFINED_COLOURS,
+        setProperty(Preferences.USER_DEFINED_COLOURS,
                 coloursFound.toString());
       }
       else
       {
         getInstance().applicationProperties
-                .remove(UserDefinedColours.USER_DEFINED_COLOURS);
+                .remove(Preferences.USER_DEFINED_COLOURS);
       }
     }
   }