tooltip displays formatted annotation row description including sequence reference...
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index 40d2b7e..f2864db 100755 (executable)
@@ -699,4 +699,18 @@ public class AlignmentAnnotation
       }
     }
   }
+
+  /**
+   * format description string for display
+   * @param seqname
+   * @return Get the annotation description string optionally prefixed by associated sequence name (if any) 
+   */
+  public String getDescription(boolean seqname)
+  {
+    if (seqname && this.sequenceRef!=null)
+    {
+      return sequenceRef.getName()+" : "+description;
+    }
+    return description;
+  }
 }