From 621e4fe6be0c6a4fcc3fcb8ee88873b62974f1b3 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 25 Oct 2006 14:46:20 +0000 Subject: [PATCH] Get sequence in routine --- src/jalview/gui/IdCanvas.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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) - -- 1.7.10.2