|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
BeadFeatureRenderer
s use a 'string of beads'
metaphor for displaying features.
A concrete BeadFeatureRenderer
may render a series
of features in more than one style by delegating to other
BeadFeatureRenderer
s for the additional style(s). This
is achieved using the setDelegateRenderer()
method
which associates an OptimizableFilter
with another
BeadFeatureRenderer
. Any feature accepted by the
filter is rendered with that renderer, while the remainder are
rendered by the current renderer.
Method Summary | |
double |
getBeadDepth()
getBeadDepth returns the depth of a single bead
produced by the renderer. |
double |
getBeadDisplacement()
getBeadDisplacement returns the displacement of
beads from the centre line of the renderer. |
void |
renderBead(java.awt.Graphics2D g2,
Feature f,
SequenceRenderContext context)
renderBead should implement rendering for this
bead type only. |
void |
setDelegateRenderer(OptimizableFilter filter,
BeadFeatureRenderer renderer)
setDelegateRenderer associates an
OptimizableFilter with a
BeadFeatureRenderer . |
Methods inherited from interface org.biojava.bio.gui.sequence.FeatureRenderer |
getDepth, processMouseEvent, renderFeature |
Method Detail |
public double getBeadDepth()
getBeadDepth
returns the depth of a single bead
produced by the renderer.
double
.public double getBeadDisplacement()
getBeadDisplacement
returns 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).
double
.public void setDelegateRenderer(OptimizableFilter filter, BeadFeatureRenderer renderer)
setDelegateRenderer
associates an
OptimizableFilter
with a
BeadFeatureRenderer
. Any feature accepted by the
filter will be passed to the associated renderer for
drawing. The OptimizableFilter
s should be disjoint
with respect to each other (a feature may not be rendered more
than once).
filter
- an OptimizableFilter
.renderer
- a BeadFeatureRenderer
.public void renderBead(java.awt.Graphics2D g2, Feature f, SequenceRenderContext context)
renderBead
should implement rendering for this
bead type only. The renderFeature
method is
expected to handle the calls to delegate renderers.
g2
- a Graphics2D
.f
- a Feature
to render.context
- a SequenceRenderContext
context.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |