JAL-3253-applet removes references to JalviewLite interface
[jalview.git] / src / jalview / gui / Preferences.java
index 777ab48..1f77f75 100755 (executable)
@@ -100,6 +100,8 @@ public class Preferences extends GPreferences
 
   public static final String AUTOASSOCIATE_PDBANDSEQS = "AUTOASSOCIATE_PDBANDSEQS";
 
+  public static final String BLOSUM62_PCA_FOR_NUCLEOTIDE = "BLOSUM62_PCA_FOR_NUCLEOTIDE";
+
   public static final String CENTRE_COLUMN_LABELS = "CENTRE_COLUMN_LABELS";
 
   public static final String CHIMERA_PATH = "CHIMERA_PATH";
@@ -237,8 +239,6 @@ public class Preferences extends GPreferences
 
   public static final List<String> groupURLLinks; // not implemented
 
-  public static final String BLOSUM62_PCA_FOR_NUCLEOTIDE = "BLOSUM62_PCA_FOR_NUCLEOTIDE";
-
   public static final String SHOW_IDENTITY = "SHOW_IDENTITY";
 
   public static final String SHOW_FULLSCREEN = "SHOW_FULLSCREEN";
@@ -798,16 +798,17 @@ public class Preferences extends GPreferences
             protColour.getSelectedItem().toString());
     Cache.setPropertyNoSave(DEFAULT_COLOUR_NUC,
             nucColour.getSelectedItem().toString());
-    Cache.setColourProperty(ANNOTATIONCOLOUR_MIN,
+    Cache.setColourPropertyNoSave(ANNOTATIONCOLOUR_MIN,
             minColour.getBackground());
-    Cache.setColourProperty(ANNOTATIONCOLOUR_MAX,
+    Cache.setColourPropertyNoSave(ANNOTATIONCOLOUR_MAX,
             maxColour.getBackground());
 
     /*
      * Save Overview settings
      */
-    Cache.setColourProperty(GAP_COLOUR, gapColour.getBackground());
-    Cache.setColourProperty(HIDDEN_COLOUR, hiddenColour.getBackground());
+    Cache.setColourPropertyNoSave(GAP_COLOUR, gapColour.getBackground());
+    Cache.setColourPropertyNoSave(HIDDEN_COLOUR,
+            hiddenColour.getBackground());
     Cache.setPropertyNoSave(USE_LEGACY_GAP,
             Boolean.toString(useLegacyGap.isSelected()));
     Cache.setPropertyNoSave(SHOW_OV_HIDDEN_AT_START,
@@ -1045,7 +1046,8 @@ public class Preferences extends GPreferences
   }
 
   /**
-   * DOCUMENT ME!
+   * Opens a file browser, and if a file is chosen, sets its path as the text of
+   * the 'startup file' text field
    */
   @Override
   public void startupFileTextfield_mouseClicked()
@@ -1065,8 +1067,10 @@ public class Preferences extends GPreferences
       FileFormatI format = chooser.getSelectedFormat();
       if (format != null)
       {
-        Cache.setPropertyNoSave("DEFAULT_FILE_FORMAT",
-                format.getName());
+        /*
+         * saving properties to file is deferred to the 'OK' action
+         */
+        Cache.setPropertyNoSave("DEFAULT_FILE_FORMAT", format.getName());
       }
       startupFileTextfield
               .setText(chooser.getSelectedFile().getAbsolutePath());