org.biojava.bio.gui.sequence
Class GlyphFeatureRenderer
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.gui.sequence.SequenceRendererWrapper
org.biojava.bio.gui.sequence.FilteringRenderer
org.biojava.bio.gui.sequence.GlyphFeatureRenderer
- All Implemented Interfaces:
- Serializable, FeatureRenderer, SequenceRenderer, Changeable
- Direct Known Subclasses:
- SecondaryStructureFeatureRenderer
public class GlyphFeatureRenderer
- extends FilteringRenderer
- implements FeatureRenderer
A FeatureRenderer that renders a particular Glyph for Features accepted by a particular
FeatureFilter
- Since:
- 1.5
- Author:
- Mark Southern
- See Also:
Glyph
,
Serialized Form
Methods inherited from class org.biojava.bio.gui.sequence.FilteringRenderer |
getChangeSupport, getContext, getFilter, getMinimumLeader, getMinimumTrailer, getRecurse, hasListeners, paint, processMouseEvent, setFilter, setRecurse, toString |
GlyphFeatureRenderer
public GlyphFeatureRenderer()
addFilterAndGlyph
public void addFilterAndGlyph(FeatureFilter ff,
Glyph g)
throws ChangeVetoException
- Throws:
ChangeVetoException
setDepth
public void setDepth(double depth)
getDepth
public double getDepth(SequenceRenderContext src)
- Description copied from interface:
SequenceRenderer
- Retrieve the depth of this renderer when rendering src.
The depth may vary between sequence panels - for example based upon
sequence length. Each line of information in the SequenceRendererContext
only renders a region of the sequence. The depth for one complete line may
be different from that for another due to the sequence having more or less
information in that region to show. For example, a feature renderer
implementation may chose to collapse down to a depth of zero pixels if
there are no features to render within a region.
- Specified by:
getDepth
in interface FeatureRenderer
- Specified by:
getDepth
in interface SequenceRenderer
- Overrides:
getDepth
in class FilteringRenderer
- Parameters:
src
- the SequenceRenderContext to return info for
- Returns:
- the depth of the renderer for that sequence panel
processMouseEvent
public FeatureHolder processMouseEvent(FeatureHolder fh,
SequenceRenderContext src,
MouseEvent me)
- Specified by:
processMouseEvent
in interface FeatureRenderer
renderFeature
public void renderFeature(Graphics2D g2,
Feature f,
SequenceRenderContext src)
- Specified by:
renderFeature
in interface FeatureRenderer