- }, startSeq, endSeq + 1);
-
- // now selection groups
- if (av.getSelectionGroup() != null
- || av.getAlignment().getGroups().size() > 0)
- {
- drawGroupsBoundaries(g, startRes, endRes, startSeq, endSeq, offset);
- }
-
- }
-
- /**
- * Draw a single sequence
- *
- * @param nextSeq
- * the next sequence to draw
- * @param g
- * graphics context
- * @param startRes
- * offset of the first column in the visible region (0..)
- * @param endRes
- * offset of the last column in the visible region (0..)
- * @param heightPosition
- * vertical location of the sequence in the alignment
- * @param i
- * index of sequence
- */
- private void drawSequence(SequenceI nextSeq, Graphics g, int startRes,
- int endRes, int heightPosition, int i)
- {
- int charWidth = av.getCharWidth();
-
- if (nextSeq == null)
- {
- // occasionally, a race condition occurs such that the alignment row is
- // empty
- // TODO Don't think this will happen any more?
- return;
- }
- seqRdr.drawSequence(nextSeq, av.getAlignment().findAllGroups(nextSeq),
- startRes, endRes, heightPosition);
+ seqRdr.drawSequence(nextSeq, av.getAlignment().findAllGroups(nextSeq),
+ startRes, endRes, offset + ((i - startSeq) * charHeight));