New example file for version 2.3
[jalview.git] / src / jalview / gui / AnnotationLabels.java
index ccbebd5..a0648c7 100755 (executable)
@@ -206,7 +206,7 @@ public class AnnotationLabels
           ap,
           new AlignmentAnnotation[]
           {aa[selectedRow]},
-          null
+          null, null
           );
     }
     else if (evt.getActionCommand().equals(COPYCONS_SEQ))
@@ -367,17 +367,31 @@ public class AnnotationLabels
 
     getSelectedRow(evt.getY() - scrollOffset);
 
+
     if (selectedRow > -1
         && ap.av.alignment.getAlignmentAnnotation().length > selectedRow)
     {
-      String desc = ap.av.alignment.
-          getAlignmentAnnotation()[selectedRow].description;
+      AlignmentAnnotation aa = ap.av.alignment.
+          getAlignmentAnnotation()[selectedRow];
+
+      StringBuffer desc = new StringBuffer("<html>");
+
+      if (aa.description != null && !aa.description.equals("New description"))
+      {
+        desc.append(aa.description+"<br>");
+      }
+      if(aa.hasScore())
+      {
+        desc.append("Score: "+aa.score);
+      }
 
-      if (desc != null && !desc.equals("New description"))
+      if(desc.length()!=6)
       {
-        setToolTipText(ap.av.alignment.
-                       getAlignmentAnnotation()[selectedRow].description);
+        desc.append("</html>");
+        this.setToolTipText(desc.toString());
       }
+      else
+        this.setToolTipText(null);
     }
 
   }