From: amwaterhouse Date: Wed, 25 Oct 2006 14:46:20 +0000 (+0000) Subject: Get sequence in routine X-Git-Tag: Release_2_2~232 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=621e4fe6be0c6a4fcc3fcb8ee88873b62974f1b3;p=jalview.git Get sequence in routine --- diff --git a/src/jalview/gui/IdCanvas.java b/src/jalview/gui/IdCanvas.java index d3b56be..24bf616 100755 --- a/src/jalview/gui/IdCanvas.java +++ b/src/jalview/gui/IdCanvas.java @@ -280,9 +280,12 @@ public class IdCanvas extends JPanel { //Now draw the id strings + SequenceI sequence; //Now draw the id strings for (int i = starty; i < endy; i++) { + sequence = av.alignment.getSequenceAt(i); + if (av.hasHiddenRows) { setHiddenFont(i); @@ -290,21 +293,21 @@ public class IdCanvas extends JPanel // Selected sequence colours if ( (searchResults != null) && - searchResults.contains(av.alignment.getSequenceAt(i))) + searchResults.contains(sequence)) { currentColor = Color.black; currentTextColor = Color.white; } else if ( (av.getSelectionGroup() != null) && av.getSelectionGroup().getSequences(false).contains( - av.alignment.getSequenceAt(i))) + sequence)) { currentColor = Color.lightGray; currentTextColor = Color.black; } else { - currentColor = av.alignment.getSequenceAt(i).getColor(); + currentColor = sequence.getColor(); currentTextColor = Color.black; } @@ -315,7 +318,7 @@ public class IdCanvas extends JPanel gg.setColor(currentTextColor); - String string = av.alignment.getSequenceAt(i).getDisplayId( av.getShowJVSuffix()); + String string = sequence.getDisplayId( av.getShowJVSuffix()); gg.drawString(string, 0, (((i - starty) * av.charHeight) + av.charHeight) -