Merge branch 'features/JAL-3858_PAEsInProjects' into develop
[jalview.git] / src / jalview / datamodel / ContactMapHolder.java
index 2b5c853..5849374 100644 (file)
@@ -40,10 +40,11 @@ public class ContactMapHolder implements ContactMapHolderI
 
     AlignmentAnnotation aa = new AlignmentAnnotation(cm.getAnnotLabel(),
             cm.getAnnotDescr(), new Annotation[0]);
-    aa.graph = AlignmentAnnotation.CUSTOMRENDERER;
+    aa.graph = AlignmentAnnotation.CONTACT_MAP;
     aa.graphMin = cm.getMin();
     aa.graphMax = cm.getMax();
     aa.editable = false;
+    aa.calcId=cm.getType();
 
     contactmaps.put(aa.annotationId, cm);
     // TODO: contact matrices could be intra or inter - more than one refseq
@@ -65,6 +66,14 @@ public class ContactMapHolder implements ContactMapHolderI
   public void addContactListFor(AlignmentAnnotation annotation,
           ContactMatrixI cm)
   {
+    // update annotation with data from contact map
+    annotation.graphMin = cm.getMin();
+    annotation.graphMax = cm.getMax();
+    annotation.editable = false;
+    annotation.graph = AlignmentAnnotation.CONTACT_MAP;
+    annotation.calcId = cm.getType();
+    annotation.label = cm.getAnnotLabel();
+    annotation.description = cm.getAnnotDescr();
     contactmaps.put(annotation.annotationId, cm);
   }
 }