Feature text mouse over modified
authoramwaterhouse <Andrew Waterhouse>
Fri, 24 Feb 2006 11:36:51 +0000 (11:36 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 24 Feb 2006 11:36:51 +0000 (11:36 +0000)
src/jalview/appletgui/SeqPanel.java

index 2a25263..daff328 100755 (executable)
@@ -257,23 +257,31 @@ public class SeqPanel
     // use aa to see if the mouse pointer is on a\r
     if (av.showSequenceFeatures && sequence.getSequenceFeatures()!=null)\r
     {\r
-      Vector features = sequence.getSequenceFeatures();\r
-      Enumeration e = features.elements();\r
+      int index = 0;\r
+      sequence.getSequenceFeatures();\r
       boolean first = true;\r
-      while (e.hasMoreElements())\r
+      while (index < sequence.getSequenceFeatures().length)\r
       {\r
-        SequenceFeature sf = (SequenceFeature) e.nextElement();\r
+        SequenceFeature sf = sequence.getSequenceFeatures()[index];\r
         if (sf.getBegin() <= sequence.findPosition(res) &&\r
             sf.getEnd() >= sequence.findPosition(res))\r
         {\r
+          if(!av.featuresDisplayed.containsKey(sf.getType()))\r
+           {\r
+             index++;\r
+             continue;\r
+           }\r
+\r
           if(first)\r
           {\r
-            text.append(" Sequence Feature: ");\r
+            text.append(" Sequence Feature:");\r
             first = false;\r
           }\r
 \r
+          text.append(" "+sf.getType());\r
+\r
           if(sf.getDescription()!=null)\r
-            text.append(sf.getDescription());\r
+            text.append(" "+sf.getDescription());\r
 \r
           if (sf.getStatus()!=null && sf.getStatus().length() > 0)\r
           {\r
@@ -282,6 +290,8 @@ public class SeqPanel
           text.append("; ");\r
         }\r
 \r
+        index++;\r
+\r
       }\r
     }\r
 \r
@@ -435,8 +445,7 @@ public class SeqPanel
 \r
   public void drawChars(int seqstart, int seqend, int start)\r
   {\r
-    seqCanvas.drawPanel(seqCanvas.gg, start, av.getEndRes(), seqstart, seqend,\r
-                        av.getStartRes(), av.getStartSeq(), 0);\r
+    seqCanvas.drawPanel(seqCanvas.gg, start, av.getEndRes(), seqstart, seqend,  0);\r
     seqCanvas.repaint();\r
   }\r
 \r