Settooltip for sequence feature
authoramwaterhouse <Andrew Waterhouse>
Mon, 7 Feb 2005 17:08:14 +0000 (17:08 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 7 Feb 2005 17:08:14 +0000 (17:08 +0000)
src/jalview/gui/SeqPanel.java

index cc16a26..986f996 100755 (executable)
@@ -187,19 +187,23 @@ public class SeqPanel extends JPanel
       Enumeration e = features.elements();\r
       StringBuffer sbuffer = new StringBuffer();\r
 \r
-      this.setToolTipText(null);\r
+\r
       while (e.hasMoreElements())\r
       {\r
         SequenceFeature sf = (SequenceFeature) e.nextElement();\r
         if (sf.getStart() <= sequence.findPosition(res) &&\r
             sf.getEnd() >= sequence.findPosition(res))\r
         {\r
+          if(sbuffer.length()>0)\r
+            sbuffer.append("; ");\r
           sbuffer.append(sf.getType() + " " + sf.getDescription());\r
-          ToolTipManager.sharedInstance().registerComponent(this);\r
-          this.setToolTipText(sbuffer.toString());\r
+\r
         }\r
 \r
       }\r
+\r
+      ToolTipManager.sharedInstance().registerComponent(this);\r
+      this.setToolTipText(sbuffer.toString());\r
     }\r
 \r
 \r