JAL-3274 resource path correction, code tidying (constants etc)
[jalview.git] / src / jalview / renderer / OverviewResColourFinder.java
index 07fc6e3..a497d92 100644 (file)
@@ -36,14 +36,19 @@ public class OverviewResColourFinder extends ResidueColourFinder
 
   boolean useLegacy = false;
 
+  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();
+
   /**
    * Constructor without colour settings (used by applet)
    */
   public OverviewResColourFinder()
   {
-    GAP_COLOUR = Color.lightGray;
-    RESIDUE_COLOUR = Color.white;
-    HIDDEN_COLOUR = Color.DARK_GRAY.darker();
+    this(false, OVERVIEW_DEFAULT_GAP, OVERVIEW_DEFAULT_HIDDEN);
   }
 
   /**
@@ -84,8 +89,8 @@ public class OverviewResColourFinder extends ResidueColourFinder
     // settings
     if (shader.getColourScheme() != null)
     {
-      if (!shader.getColourScheme().hasGapColour()
-              && Comparison.isGap(currentChar))
+      if (Comparison.isGap(currentChar)
+              && (!shader.getColourScheme().hasGapColour()))
       {
         resBoxColour = GAP_COLOUR;
       }