X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FResidueColourScheme.java;h=2f7a5e0220a366291ca00030c016e83c5897d90d;hb=c854dfdb52d94eafd259846aaa242c79ea0753c7;hp=6aa798e6b7e435353dcf5e3a790c3f65ad2cb564;hpb=11b2e9b16c3bb93d8788c2bc5d5654f6163402e6;p=jalview.git diff --git a/src/jalview/schemes/ResidueColourScheme.java b/src/jalview/schemes/ResidueColourScheme.java index 6aa798e..2f7a5e0 100755 --- a/src/jalview/schemes/ResidueColourScheme.java +++ b/src/jalview/schemes/ResidueColourScheme.java @@ -62,8 +62,9 @@ public abstract class ResidueColourScheme implements ColourSchemeI /** * Creates a new ResidueColourScheme object. * - * @param final int[] index table into colors (ResidueProperties.naIndex or - * ResidueProperties.aaIndex) + * @param final + * int[] index table into colors (ResidueProperties.naIndex or + * ResidueProperties.aaIndex) * @param colors * colours for symbols in sequences */ @@ -98,8 +99,7 @@ public abstract class ResidueColourScheme implements ColourSchemeI { Color colour = Color.white; - if (colors != null && symbolIndex != null - && c < symbolIndex.length + if (colors != null && symbolIndex != null && c < symbolIndex.length && symbolIndex[c] < colors.length) { colour = colors[symbolIndex[c]]; @@ -208,4 +208,14 @@ public abstract class ResidueColourScheme implements ColourSchemeI { return true; } + + /** + * Default method returns false. Override this to return true in colour + * schemes that have a colour associated with gap residues. + */ + @Override + public boolean hasGapColour() + { + return false; + } }