1 package jalview.renderer;
3 import jalview.datamodel.AlignmentAnnotation;
4 import jalview.renderer.api.AnnotationRendererFactoryI;
5 import jalview.renderer.api.AnnotationRowRendererI;
7 import java.util.IdentityHashMap;
9 public class AnnotationRendererFactory implements
10 AnnotationRendererFactoryI
13 private static AnnotationRendererFactoryI factory = null;
15 public static AnnotationRendererFactoryI getRendererFactory()
19 factory = new AnnotationRendererFactory();
24 IdentityHashMap<Object, AnnotationRowRendererI> renderers = new IdentityHashMap<Object, AnnotationRowRendererI>();
26 public AnnotationRendererFactory()
32 public AnnotationRowRendererI getRendererFor(AlignmentAnnotation row)
34 if (row.graph == AlignmentAnnotation.CUSTOMRENDERER)
36 return new ContactMapRenderer();