package jalview.renderer; import jalview.datamodel.AlignmentAnnotation; import jalview.renderer.api.AnnotationRendererFactoryI; import jalview.renderer.api.AnnotationRowRendererI; import java.util.IdentityHashMap; public class AnnotationRendererFactory implements AnnotationRendererFactoryI { private static AnnotationRendererFactoryI factory = null; public static AnnotationRendererFactoryI getRendererFactory() { if (factory == null) { factory = new AnnotationRendererFactory(); } return factory; } IdentityHashMap renderers = new IdentityHashMap(); public AnnotationRendererFactory() { // renderers.put) } @Override public AnnotationRowRendererI getRendererFor(AlignmentAnnotation row) { if (row.graph == AlignmentAnnotation.CUSTOMRENDERER) { return new ContactMapRenderer(); } return null; } }