X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fappletgui%2FSeqPanel.java;h=daff328cc57240ad7e34403a2af103c31f561c70;hb=4944c2f33bb34b4f262fd2f3ae40dcdc2a825557;hp=2a252630ef63fd8d5dedefb4a4a23c63d774ceff;hpb=acedfd8c93a1d897e2441714d5d4af487e57d14c;p=jalview.git 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(); }