Package org.biojava.bio.gui.sequence
Interface BeadFeatureRenderer
-
- All Superinterfaces:
FeatureRenderer
- All Known Implementing Classes:
AbstractBeadRenderer,EllipticalBeadRenderer,RectangularBeadRenderer,RectangularImapRenderer,RoundRectangularBeadRenderer
public interface BeadFeatureRenderer extends FeatureRenderer
BeadFeatureRenderers use a 'string of beads' metaphor for displaying features.A concrete
BeadFeatureRenderermay render a series of features in more than one style by delegating to otherBeadFeatureRenderers for the additional style(s). This is achieved using thesetDelegateRenderer()method which associates anOptimizableFilterwith anotherBeadFeatureRenderer. Any feature accepted by the filter is rendered with that renderer, while the remainder are rendered by the current renderer.- Since:
- 1.2
- Author:
- Keith James
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublegetBeadDepth()getBeadDepthreturns the depth of a single bead produced by the renderer.doublegetBeadDisplacement()getBeadDisplacementreturns the displacement of beads from the centre line of the renderer.voidrenderBead(Graphics2D g2, Feature f, SequenceRenderContext context)renderBeadshould implement rendering for this bead type only.voidsetDelegateRenderer(OptimizableFilter filter, BeadFeatureRenderer renderer)setDelegateRendererassociates anOptimizableFilterwith aBeadFeatureRenderer.-
Methods inherited from interface org.biojava.bio.gui.sequence.FeatureRenderer
getDepth, processMouseEvent, renderFeature
-
-
-
-
Method Detail
-
getBeadDepth
double getBeadDepth()
getBeadDepthreturns the depth of a single bead produced by the renderer.- Returns:
- a
double.
-
getBeadDisplacement
double getBeadDisplacement()
getBeadDisplacementreturns the displacement of beads from the centre line of the renderer. A positive value indicates displacment downwards (for horizontal renderers) or to the right (for vertical renderers).- Returns:
- a
double.
-
setDelegateRenderer
void setDelegateRenderer(OptimizableFilter filter, BeadFeatureRenderer renderer)
setDelegateRendererassociates anOptimizableFilterwith aBeadFeatureRenderer. Any feature accepted by the filter will be passed to the associated renderer for drawing. TheOptimizableFilters should be disjoint with respect to each other (a feature may not be rendered more than once).- Parameters:
filter- anOptimizableFilter.renderer- aBeadFeatureRenderer.
-
renderBead
void renderBead(Graphics2D g2, Feature f, SequenceRenderContext context)
renderBeadshould implement rendering for this bead type only. TherenderFeaturemethod is expected to handle the calls to delegate renderers.- Parameters:
g2- aGraphics2D.f- aFeatureto render.context- aSequenceRenderContextcontext.
-
-