001package org.biojava.bio.gui.sequence; 002 003import java.awt.Graphics2D; 004 005/** 006 * Render information from a CircularRendererContext onto a graphics context. 007 * 008 * <p> 009 * Every CircularRenderer paints information about a sequence, it's symbols or features 010 * or some other property, into a ring. The depth of the ring is given by getDepth(). 011 * </p> 012 * 013 * @author Matthew Pocock 014 * @since 1.4 015 */ 016public interface CircularRenderer { 017 /** 018 * Get the depth needed for this renderer. 019 * 020 * @param crc the CircularRendererContext to render information from 021 * @return the depth required to render the context 022 */ 023 public double getDepth(CircularRendererContext crc); 024 025 /** 026 * Paint this renderer. 027 * 028 * @param g2 the graphics to paint to 029 * @param crc the context giving the data to paint 030 */ 031 public void paint(Graphics2D g2, CircularRendererContext crc); 032}