JAL-2527 move default colours for applet / application out of gui.Preferences so...
[jalview.git] / src / jalview / gui / Preferences.java
index 7ceb04e..6635dbe 100755 (executable)
@@ -121,13 +121,6 @@ public class Preferences extends GPreferences
 
   private static final int MAX_FONT_SIZE = 30;
 
-  public static final Color OVERVIEW_DEFAULT_GAP = Color.lightGray;
-
-  public static final Color OVERVIEW_DEFAULT_LEGACY_GAP = Color.white;
-
-  public static final Color OVERVIEW_DEFAULT_HIDDEN = Color.darkGray
-          .darker();
-
   /**
    * Holds name and link separated with | character. Sequence ID must be
    * $SEQUENCE_ID$ or $SEQUENCE_ID=/.possible | chars ./=$
@@ -327,10 +320,11 @@ public class Preferences extends GPreferences
      * Set overview panel defaults
      */
     gapColour.setBackground(
-            Cache.getDefaultColour(GAP_COLOUR, OVERVIEW_DEFAULT_GAP));
+            Cache.getDefaultColour(GAP_COLOUR,
+                    jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_GAP));
     hiddenColour.setBackground(
             Cache.getDefaultColour(HIDDEN_COLOUR,
-                    OVERVIEW_DEFAULT_HIDDEN));
+                    jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN));
     useLegacyGap.setSelected(Cache.getDefault(USE_LEGACY_GAP, false));
     gapLabel.setEnabled(!useLegacyGap.isSelected());
     gapColour.setEnabled(!useLegacyGap.isSelected());
@@ -1108,11 +1102,13 @@ public class Preferences extends GPreferences
     boolean enabled = useLegacyGap.isSelected();
     if (enabled)
     {
-      gapColour.setBackground(OVERVIEW_DEFAULT_LEGACY_GAP);
+      gapColour.setBackground(
+              jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_LEGACY_GAP);
     }
     else
     {
-      gapColour.setBackground(OVERVIEW_DEFAULT_GAP);
+      gapColour.setBackground(
+              jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_GAP);
     }
     gapColour.setEnabled(!enabled);
     gapLabel.setEnabled(!enabled);
@@ -1124,7 +1120,8 @@ public class Preferences extends GPreferences
     useLegacyGap.setSelected(false);
     useLegacyGaps_actionPerformed(null);
     showHiddenAtStart.setSelected(true);
-    hiddenColour.setBackground(OVERVIEW_DEFAULT_HIDDEN);
+    hiddenColour.setBackground(
+            jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN);
   }
 
   @Override