+ public int getResidueColourInt(boolean showBoxes, ResidueShaderI shader,
+ SequenceGroup[] allGroups, final SequenceI seq, int i,
+ FeatureColourFinder finder)
+ {
+
+ int c = seq.getColor(i);
+ if (c != 0)
+ {
+ return c;
+ }
+
+ int col = getResidueBoxColourInt(showBoxes, shader, allGroups, seq,
+ i);
+
+
+ // if there's a FeatureColourFinder we might override the residue colour
+ // here with feature colouring
+ return seq.setColor(i,
+ finder == null || finder.noFeaturesDisplayed() ? col
+ : finder.findFeatureColourInt(col, seq, i));
+ }
+