{
if (shader.getColourScheme() != null)
{
- if (forOverview && Comparison.isGap(seq.getCharAt(i)))
+ if (forOverview && Comparison.isGap(seq.getCharAt(i))
+ && !shader.getColourScheme().hasGapColour())
{
resBoxColour = Color.lightGray;
}
/*
* step 1: build a map from colours to the symbol(s) that have the colour
*/
- Map<Color, List<String>> colours = new HashMap<Color, List<String>>();
+ Map<Color, List<String>> colours = new HashMap<>();
for (char symbol = 'A'; symbol <= 'Z'; symbol++)
{
/*
* step 2: make a list of { A,G,R=12f9d6 } residues/colour specs
*/
- List<String> residueColours = new ArrayList<String>();
+ List<String> residueColours = new ArrayList<>();
for (Entry<Color, List<String>> cols : colours.entrySet())
{
boolean first = true;
Collections.sort(residueColours);
return StringUtils.listToDelimitedString(residueColours, ";");
}
+
+ @Override
+ public boolean hasGapColour()
+ {
+ return (findColour(' ') != null);
+ }
}