- // TODO replace 8 or so code duplications with calls to this method
- // (refactored as needed)
- Color col = getResidueBoxColour(seq, position);
-
- if (fr != null)
- {
- col = fr.findFeatureColour(col, seq, position);
- }
- return col;
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param cs
- * DOCUMENT ME!
- * @param seq
- * DOCUMENT ME!
- * @param i
- * DOCUMENT ME!
- */
- void getBoxColour(ColourSchemeI cs, SequenceI seq, int i)
- {
- if (cs != null)
- {
- resBoxColour = cs.findColour(seq.getCharAt(i), i, seq);
- }
- else if (forOverview
- && !jalview.util.Comparison.isGap(seq.getCharAt(i)))
- {
- resBoxColour = Color.lightGray;
- }
- else
- {
- resBoxColour = Color.white;
- }
+ allGroups = av.getAlignment().findAllGroups(seq);
+ return resColourFinder.getResidueColour(av.getShowBoxes(),
+ av.getResidueShading(), allGroups, seq, position, finder);