From 1858fc1b685034eb94cf3793ad9a4203816134d6 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 24 Feb 2006 11:36:51 +0000 Subject: [PATCH] Feature text mouse over modified --- src/jalview/appletgui/SeqPanel.java | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 2a25263..daff328 100755 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -257,23 +257,31 @@ public class SeqPanel // use aa to see if the mouse pointer is on a if (av.showSequenceFeatures && sequence.getSequenceFeatures()!=null) { - Vector features = sequence.getSequenceFeatures(); - Enumeration e = features.elements(); + int index = 0; + sequence.getSequenceFeatures(); boolean first = true; - while (e.hasMoreElements()) + while (index < sequence.getSequenceFeatures().length) { - SequenceFeature sf = (SequenceFeature) e.nextElement(); + SequenceFeature sf = sequence.getSequenceFeatures()[index]; if (sf.getBegin() <= sequence.findPosition(res) && sf.getEnd() >= sequence.findPosition(res)) { + if(!av.featuresDisplayed.containsKey(sf.getType())) + { + index++; + continue; + } + if(first) { - text.append(" Sequence Feature: "); + text.append(" Sequence Feature:"); first = false; } + text.append(" "+sf.getType()); + if(sf.getDescription()!=null) - text.append(sf.getDescription()); + text.append(" "+sf.getDescription()); if (sf.getStatus()!=null && sf.getStatus().length() > 0) { @@ -282,6 +290,8 @@ public class SeqPanel text.append("; "); } + index++; + } } @@ -435,8 +445,7 @@ public class SeqPanel public void drawChars(int seqstart, int seqend, int start) { - seqCanvas.drawPanel(seqCanvas.gg, start, av.getEndRes(), seqstart, seqend, - av.getStartRes(), av.getStartSeq(), 0); + seqCanvas.drawPanel(seqCanvas.gg, start, av.getEndRes(), seqstart, seqend, 0); seqCanvas.repaint(); } -- 1.7.10.2