SequenceFeature mouse over text updated
authoramwaterhouse <Andrew Waterhouse>
Mon, 5 Dec 2005 16:29:26 +0000 (16:29 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 5 Dec 2005 16:29:26 +0000 (16:29 +0000)
src/jalview/appletgui/SeqPanel.java

index 1bbf15d..9030341 100755 (executable)
@@ -295,14 +295,13 @@ public class SeqPanel
       seqCanvas.pdbCanvas.highlightRes(sequence.findPosition(res));\r
     }\r
 \r
-    ap.alignFrame.statusBar.setText(text.toString());\r
 \r
     // use aa to see if the mouse pointer is on a\r
-    if (av.showSequenceFeatures)\r
+    if (av.showSequenceFeatures && sequence.getSequenceFeatures()!=null)\r
     {\r
       Vector features = sequence.getSequenceFeatures();\r
       Enumeration e = features.elements();\r
-      StringBuffer sbuffer = new StringBuffer();\r
+      text.append(" Sequence Feature: ");\r
 \r
       while (e.hasMoreElements())\r
       {\r
@@ -310,20 +309,19 @@ public class SeqPanel
         if (sf.getBegin() <= sequence.findPosition(res) &&\r
             sf.getEnd() >= sequence.findPosition(res))\r
         {\r
-          if (sbuffer.length() > 0)\r
-          {\r
-            sbuffer.append("; ");\r
-          }\r
-          sbuffer.append(sf.getType() + " " + sf.getDescription());\r
+          text.append(sf.getDescription());\r
           if (sf.getStatus().length() > 0)\r
           {\r
-            sbuffer.append(" (" + sf.getStatus() + ")");\r
+            text.append(" (" + sf.getStatus() + ")");\r
           }\r
+          text.append("; ");\r
         }\r
 \r
       }\r
     }\r
 \r
+     ap.alignFrame.statusBar.setText(text.toString());\r
+\r
   }\r
 \r
   public void doMouseDragged(MouseEvent evt)\r