if (PreferenceManager.getInstance().getAsBoolean(PreferenceManager.ENABLE_ANTIALISING)) {
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
}
String nucSequence = new String(seq, indexOfFirstCodonStart, seq.length - indexOfFirstCodonStart);
AminoAcidSequence aaSequence = AminoAcidManager.getInstance().
getAminoAcidSequence(strand, start + indexOfFirstCodonStart, nucSequence);
if ((aaSequence != null) && aaSequence.hasNonNullSequence()) {
//This rectangle holds a single AA glyph. x and width will be updated in the for loop
Rectangle aaRect = new Rectangle(0, bandRectangle.y, 1, bandRectangle.height);
//start position for this amino acid. Will increment in for loop below
int aaSeqStartPosition = aaSequence.getStartPosition();
//calculated oddness or evenness of first amino acid
int firstFullAcidIndex = (int) Math.floor((aaSeqStartPosition - readingFrame) / 3);
boolean odd = (firstFullAcidIndex % 2) == 1;
if (shouldDrawLetters) {
Font f = FontManager.getFont(Font.BOLD, fontSize);
g.setFont(f);
}
for (AminoAcid acid : aaSequence.getSequence()) {
if (acid != null) {
//calculate x pixel boundaries of this AA rectangle
int px = getPixelFromChromosomeLocation(context.getChr(), aaSeqStartPosition, origin, locScale);
int px2 = getPixelFromChromosomeLocation(context.getChr(), aaSeqStartPosition + 3,
origin, locScale);