001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021
022package org.biojava.bio.gui.sequence;
023
024import java.awt.Graphics2D;
025
026import org.biojava.bio.seq.Feature;
027
028/**
029 * <code>ImageMapRenderer</code>s create strings representing
030 * <code>Feature</code>s suitable for use in HTML image
031 * maps. Typically an <code>ImageMapRenderer</code> will be used as a
032 * decorator on a <code>FeatureRenderer</code> which will draw the
033 * corresponding image area(s).
034 *
035 * @author Keith James
036 * @since 1.3
037 */
038public interface ImageMapRenderer extends FeatureRenderer
039{
040    /**
041     * <code>renderImageMap</code> renders the <code>Feature</code> as
042     * set of image map hotspots.
043     *
044     * @param g2 a <code>Graphics2D</code>.
045     * @param f a <code>Feature</code>.
046     * @param context a <code>SequenceRenderContext</code>.
047     */
048    public void renderImageMap(Graphics2D                 g2,
049                               Feature                     f,
050                               SequenceRenderContext context);
051}