org.biojava.bio.gui.sequence
Class ZiggyFeatureRenderer

java.lang.Object
  extended by org.biojava.utils.AbstractChangeable
      extended by org.biojava.bio.gui.sequence.ZiggyFeatureRenderer
All Implemented Interfaces:
java.io.Serializable, FeatureRenderer, Changeable

public class ZiggyFeatureRenderer
extends AbstractChangeable
implements FeatureRenderer, java.io.Serializable

A feature renderer that draws non-contiguous features as a set of boxes joined by zig-zags.

This is applicable to rendering cds's or non-contiguous homologies for example.

Author:
Matthew Pocock
See Also:
Serialized Form

Constructor Summary
ZiggyFeatureRenderer()
           
 
Method Summary
 double getBlockDepth()
           
 double getDepth(SequenceRenderContext src)
           
 java.awt.Paint getFill()
           
 java.awt.Paint getOutline()
           
 FeatureHolder processMouseEvent(FeatureHolder hits, SequenceRenderContext src, java.awt.event.MouseEvent me)
           
 void renderFeature(java.awt.Graphics2D g, Feature f, SequenceRenderContext context)
           
 void setBlockDepth(double depth)
           
 void setFill(java.awt.Paint p)
           
 void setOutline(java.awt.Paint p)
           
 
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZiggyFeatureRenderer

public ZiggyFeatureRenderer()
Method Detail

setFill

public void setFill(java.awt.Paint p)
             throws ChangeVetoException
Throws:
ChangeVetoException

getFill

public java.awt.Paint getFill()

setOutline

public void setOutline(java.awt.Paint p)
                throws ChangeVetoException
Throws:
ChangeVetoException

getOutline

public java.awt.Paint getOutline()

setBlockDepth

public void setBlockDepth(double depth)
                   throws ChangeVetoException
Throws:
ChangeVetoException

getBlockDepth

public double getBlockDepth()

getDepth

public double getDepth(SequenceRenderContext src)
Specified by:
getDepth in interface FeatureRenderer

renderFeature

public void renderFeature(java.awt.Graphics2D g,
                          Feature f,
                          SequenceRenderContext context)
Specified by:
renderFeature in interface FeatureRenderer

processMouseEvent

public FeatureHolder processMouseEvent(FeatureHolder hits,
                                       SequenceRenderContext src,
                                       java.awt.event.MouseEvent me)
Specified by:
processMouseEvent in interface FeatureRenderer