+ return (isGap && !shader.getColourScheme().hasGapColour() ? gapColourInt
+ : shader.findColourInt(currentChar, i, seq));
+ }
+
+ @Override
+ public Color getResidueColour(boolean showBoxes, ResidueShaderI shader,
+ SequenceGroup[] allGroups, final SequenceI seq, int i,
+ FeatureColourFinder finder)
+ {
+ Color col = getResidueBoxColour(showBoxes, shader, allGroups, seq, i);
+
+ // if there's a FeatureColourFinder we might override the residue colour
+ // here with feature colouring
+ col = finder == null || finder.noFeaturesDisplayed() ? col
+ : finder.findFeatureColour(col, seq, i);
+ return col;
+ }
+
+ public int getResidueColourInt(boolean showBoxes, ResidueShaderI shader,
+ SequenceGroup[] allGroups, final SequenceI seq, int i,
+ FeatureColourFinder finder)
+ {
+ int col = getResidueBoxColourInt(showBoxes, shader, allGroups, seq, i);
+
+ // if there's a FeatureColourFinder we might override the residue colour
+ // here with feature colouring
+ col = finder == null || finder.noFeaturesDisplayed() ? col
+ : finder.findFeatureColourInt(col, seq, i);
+ return col;
+ }
+
+ @Override
+ protected Color getResidueBoxColour(boolean showBoxes,
+ ResidueShaderI shader, SequenceGroup[] allGroups, SequenceI seq,
+ int i)
+ {
+ return new Color(
+ getResidueBoxColourInt(showBoxes, shader, allGroups, seq, i));