/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
}
}
-
+
public Color findSequenceColour(SequenceI seq, int i)
{
allGroups = av.alignment.findAllGroups(seq);
getBoxColour(currentSequenceGroup.cs, seq, i);
graphics.setColor(resBoxColour.darker());
}
+ if (currentSequenceGroup.getShowunconserved())
+ {
+ // cheat - use this if we have a consensus for each group: s = getDisplayChar(currentSequenceGroup.getConsensus(), i, s, '.');
+ s = getDisplayChar(av.consensus, i, s, '.');
+ }
}
else
{
graphics.setColor(resBoxColour);
}
}
+ if (av.getShowunconserved())
+ {
+ s = getDisplayChar(av.consensus, i, s, '.');
+
+ }
}
if (av.upperCasebold)
}
}
-
+
charOffset = (av.charWidth - fm.charWidth(s)) / 2;
graphics.drawString(String.valueOf(s), charOffset + av.charWidth
* (i - start), y1);
}
+
+ private char getDisplayChar(AlignmentAnnotation consensus, int position, char s, char c)
+ {
+ char conschar = consensus.annotations[position].displayCharacter.charAt(0);
+ if (conschar!='-' && s==conschar)
+ {
+ s= c;
+ }
+ return s;
+ }
+
boolean inCurrentSequenceGroup(int res)
{
if (allGroups == null)