JAL-2527 Updates following code review
[jalview.git] / src / jalview / gui / Preferences.java
index 3c0faab..7ceb04e 100755 (executable)
@@ -113,15 +113,19 @@ public class Preferences extends GPreferences
 
   public static final String USE_LEGACY_GAP = "USE_LEGACY_GAP";
 
+  public static final String GAP_COLOUR = "GAP_COLOUR";
+
+  public static final String HIDDEN_COLOUR = "HIDDEN_COLOUR";
+
   private static final int MIN_FONT_SIZE = 1;
 
   private static final int MAX_FONT_SIZE = 30;
 
-  private static final Color OVERVIEW_DEFAULT_GAP = Color.lightGray;
+  public static final Color OVERVIEW_DEFAULT_GAP = Color.lightGray;
 
-  private static final Color OVERVIEW_DEFAULT_LEGACY_GAP = Color.white;
+  public static final Color OVERVIEW_DEFAULT_LEGACY_GAP = Color.white;
 
-  private static final Color OVERVIEW_DEFAULT_HIDDEN = Color.darkGray
+  public static final Color OVERVIEW_DEFAULT_HIDDEN = Color.darkGray
           .darker();
 
   /**
@@ -323,15 +327,15 @@ public class Preferences extends GPreferences
      * Set overview panel defaults
      */
     gapColour.setBackground(
-            Cache.getDefaultColour("GAP_COLOUR", OVERVIEW_DEFAULT_GAP));
+            Cache.getDefaultColour(GAP_COLOUR, OVERVIEW_DEFAULT_GAP));
     hiddenColour.setBackground(
-            Cache.getDefaultColour("HIDDEN_COLOUR",
+            Cache.getDefaultColour(HIDDEN_COLOUR,
                     OVERVIEW_DEFAULT_HIDDEN));
-    useLegacyGap.setSelected(Cache.getDefault("USE_LEGACY_GAP", false));
+    useLegacyGap.setSelected(Cache.getDefault(USE_LEGACY_GAP, false));
     gapLabel.setEnabled(!useLegacyGap.isSelected());
     gapColour.setEnabled(!useLegacyGap.isSelected());
     showHiddenAtStart
-            .setSelected(Cache.getDefault("SHOW_OV_HIDDEN_AT_START", true));
+            .setSelected(Cache.getDefault(SHOW_OV_HIDDEN_AT_START, true));
 
     /*
      * Set Structure tab defaults.
@@ -658,8 +662,8 @@ public class Preferences extends GPreferences
     /*
      * Save Overview settings
      */
-    Cache.setColourProperty("GAP_COLOUR", gapColour.getBackground());
-    Cache.setColourProperty("HIDDEN_COLOUR", hiddenColour.getBackground());
+    Cache.setColourProperty(GAP_COLOUR, gapColour.getBackground());
+    Cache.setColourProperty(HIDDEN_COLOUR, hiddenColour.getBackground());
     Cache.applicationProperties.setProperty(USE_LEGACY_GAP,
             Boolean.toString(useLegacyGap.isSelected()));
     Cache.applicationProperties.setProperty(SHOW_OV_HIDDEN_AT_START,