import jalview.datamodel.AlignmentAnnotation;
import jalview.renderer.api.AnnotationRendererFactoryI;
import jalview.renderer.api.AnnotationRowRendererI;
+import jalview.ws.datamodel.alphafold.PAEContactMatrix;
import java.util.IdentityHashMap;
-public class AnnotationRendererFactory implements
- AnnotationRendererFactoryI
+public class AnnotationRendererFactory implements AnnotationRendererFactoryI
{
private static AnnotationRendererFactoryI factory = null;
@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;
}