/*
- * 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 synchronized void drawBoxes(SequenceI seq, int start, int end,
int y1)
{
+ if (seq==null) return; // fix for racecondition
int i = start;
int length = seq.getLength();
{
graphics.setColor(currentSequenceGroup.textColour);
}
+ if (currentSequenceGroup.getShowunconserved()) // todo optimize
+ {
+ // todo - use sequence group consensus
+ s = getDisplayChar(av.consensus, i, s, '.');
+
+ }
}
else
graphics.setColor(av.textColour2);
}
}
+ if (av.showUnconserved)
+ {
+ s = getDisplayChar(av.consensus, i, s, '.');
+
+ }
}
}
}
}
+ 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;
+ }
/**
* DOCUMENT ME!