Merge branch 'features/JAL-3858_PAEsInProjects' into develop
[jalview.git] / src / jalview / renderer / AnnotationRendererFactory.java
index 1bee418..db2eb7a 100644 (file)
@@ -3,6 +3,7 @@ package jalview.renderer;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.renderer.api.AnnotationRendererFactoryI;
 import jalview.renderer.api.AnnotationRowRendererI;
+import jalview.ws.datamodel.alphafold.PAEContactMatrix;
 
 import java.util.IdentityHashMap;
 
@@ -31,9 +32,16 @@ public class AnnotationRendererFactory implements
   @Override
   public AnnotationRowRendererI getRendererFor(AlignmentAnnotation row)
   {
-    if (row.graph == AlignmentAnnotation.CUSTOMRENDERER)
+    if (row.graph == AlignmentAnnotation.CONTACT_MAP)
     {
-      return new ContactMapRenderer();
+      // TODO consider configuring renderer/etc according to the type of matrix
+      // bound to the annotation row - needs to be looked up in that case
+      if (PAEContactMatrix.PAEMATRIX.equals(row.getCalcId()))
+      {
+        return ContactMapRenderer.newPAERenderer();
+      }
+      // TODO add potential for configuring renderer directly from the annotation row and/or viewmodel
+      
     }
     return null;
   }