JAL-2349 allow contact matrix to provide labels for its annotation row
[jalview.git] / src / jalview / datamodel / ContactMapHolder.java
index 4b46d7d..2b5c853 100644 (file)
@@ -37,13 +37,14 @@ public class ContactMapHolder implements ContactMapHolderI
   @Override
   public AlignmentAnnotation addContactList(ContactMatrixI cm)
   {
-    AlignmentAnnotation aa = new AlignmentAnnotation("Contact Matrix",
-            "Contact Matrix", new Annotation[0]);
+
+    AlignmentAnnotation aa = new AlignmentAnnotation(cm.getAnnotLabel(),
+            cm.getAnnotDescr(), new Annotation[0]);
     aa.graph = AlignmentAnnotation.CUSTOMRENDERER;
     aa.graphMin = cm.getMin();
     aa.graphMax = cm.getMax();
     aa.editable = false;
-    // aa.autoCalculated = true;
+
     contactmaps.put(aa.annotationId, cm);
     // TODO: contact matrices could be intra or inter - more than one refseq
     // possible!