Package org.biojava.bio.gui.sequence
Class StackedFeatureRenderer
- java.lang.Object
-
- org.biojava.utils.AbstractChangeable
-
- org.biojava.bio.gui.sequence.StackedFeatureRenderer
-
- All Implemented Interfaces:
FeatureRenderer
,Changeable
public class StackedFeatureRenderer extends AbstractChangeable implements FeatureRenderer
Allows you to stack multiple feature renderers up (for example a label renderer and a beaded renderer) and have them treated as a single renderer for layout.- Author:
- Matthew Pocock
-
-
Field Summary
Fields Modifier and Type Field Description static ChangeType
RENDERERS
-
Constructor Summary
Constructors Constructor Description StackedFeatureRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRenderer(FeatureRenderer renderer)
double
getDepth(SequenceRenderContext src)
FeatureHolder
processMouseEvent(FeatureHolder hits, SequenceRenderContext src, MouseEvent me)
void
removeRenderer(FeatureRenderer renderer)
void
renderFeature(Graphics2D g, Feature f, SequenceRenderContext src)
-
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
-
-
-
-
Field Detail
-
RENDERERS
public static final ChangeType RENDERERS
-
-
Constructor Detail
-
StackedFeatureRenderer
public StackedFeatureRenderer()
-
-
Method Detail
-
addRenderer
public void addRenderer(FeatureRenderer renderer)
-
removeRenderer
public void removeRenderer(FeatureRenderer renderer)
-
getDepth
public double getDepth(SequenceRenderContext src)
- Specified by:
getDepth
in interfaceFeatureRenderer
-
renderFeature
public void renderFeature(Graphics2D g, Feature f, SequenceRenderContext src)
- Specified by:
renderFeature
in interfaceFeatureRenderer
-
processMouseEvent
public FeatureHolder processMouseEvent(FeatureHolder hits, SequenceRenderContext src, MouseEvent me)
- Specified by:
processMouseEvent
in interfaceFeatureRenderer
-
-