From 56ad3ae1c8b2fefd7af371049e344acfc1f23944 Mon Sep 17 00:00:00 2001
From: jprocter
Sequence associations are turned off for subsequent annotation definitions by:
SEQUENCE_REF ALIGNMENTdiff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index 5ddaa5e..2d2d748 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -199,14 +199,13 @@ public class AnnotationLabels if (tooltip == null) { tooltip = new Tooltip(ap.av.alignment. - getAlignmentAnnotation()[row]. - description, + getAlignmentAnnotation()[row].getDescription(true), this); } else { tooltip.setTip(ap.av.alignment. - getAlignmentAnnotation()[row].description); + getAlignmentAnnotation()[row].getDescription(true)); } } else if (tooltip != null) diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 40d2b7e..f2864db 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -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; + } } diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index c0b8022..2eda839 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -369,7 +369,7 @@ public class AnnotationLabels if (aa.description != null && !aa.description.equals("New description")) { - desc.append(aa.description); + desc.append(aa.getDescription(true)); if(aa.hasScore) desc.append("