Merge branch 'feature/2588' into merge/develop_feature/2588_JAL-2588
authorJim Procter <jprocter@issues.jalview.org>
Fri, 18 Aug 2017 14:38:20 +0000 (15:38 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 18 Aug 2017 14:38:20 +0000 (15:38 +0100)
1  2 
src/jalview/appletgui/SequenceRenderer.java
src/jalview/gui/SequenceRenderer.java
src/jalview/renderer/OverviewRenderer.java
src/jalview/schemes/ResidueColourScheme.java
src/jalview/schemes/UserColourScheme.java

@@@ -162,9 -120,10 +120,10 @@@ public class SequenceRenderer implement
      int length = seq.getLength();
  
      int curStart = -1;
 -    int curWidth = av.getCharWidth(), avCharWidth = av.getCharWidth(), avCharHeight = av
 -            .getCharHeight();
 +    int curWidth = av.getCharWidth(), avCharWidth = av.getCharWidth(),
 +            avCharHeight = av.getCharHeight();
  
+     Color resBoxColour = Color.white;
      Color tempColour = null;
      while (i <= end)
      {
@@@ -117,41 -95,14 +95,12 @@@ public class SequenceRenderer implement
    public Color getResidueColour(final SequenceI seq, int position,
            FeatureColourFinder finder)
    {
-     Color col = getResidueBoxColour(seq, position);
-     if (finder != null)
-     {
-       col = finder.findFeatureColour(col, seq, position);
-     }
-     return col;
-   }
-   /**
-    * DOCUMENT ME!
-    * 
-    * @param shader
-    *          DOCUMENT ME!
-    * @param seq
-    *          DOCUMENT ME!
-    * @param i
-    *          DOCUMENT ME!
-    */
-   void getBoxColour(ResidueShaderI shader, SequenceI seq, int i)
-   {
-     if (shader.getColourScheme() != null)
-     {
-       resBoxColour = shader.findColour(seq.getCharAt(i), i, seq);
-     }
-     else if (forOverview && !Comparison.isGap(seq.getCharAt(i)))
-     {
-       resBoxColour = Color.lightGray;
-     }
-     else
-     {
-       resBoxColour = Color.white;
-     }
+     return resColourFinder.getResidueColour(av.getShowBoxes(),
+             av.getResidueShading(),
+             allGroups, seq, position,
+             finder);
    }
  
 -
 -
    /**
     * DOCUMENT ME!
     *