public class EllipticalBeadRenderer extends AbstractBeadRenderer
EllipticalBeadRenderer renders features as simple
ellipses. Their outline and fill Paint,
Stroke, feature depth, Y-axis displacement are
configurable. Also configurable is the minimum ratio of long axis
to short axis of the ellipse - this prevents long features also
becoming ever wider and obscuring neighbours.
| Modifier and Type | Field and Description |
|---|---|
protected double |
dimensionRatio |
static ChangeType |
RATIO
Constant
RATIO indicating a change to the minimum
allowed ratio of long axis to short axis of the features. |
beadDepth, beadDisplacement, beadFill, beadOutline, beadStroke, delegates, delegationCache, DEPTH, DISPLACEMENT, FILL, OUTLINE, STROKE| Constructor and Description |
|---|
EllipticalBeadRenderer()
Creates a new
EllipticalBeadRenderer object
with the default settings. |
EllipticalBeadRenderer(double beadDepth,
double beadDisplacement,
Paint beadOutline,
Paint beadFill,
Stroke beadStroke,
double dimensionRatio)
Creates a new
EllipticalBeadRenderer. |
| Modifier and Type | Method and Description |
|---|---|
double |
getDepth(SequenceRenderContext context)
getDepth calculates the depth required by this
renderer to display its beads. |
double |
getDimensionRatio()
getDimensionRatio returns the maximum ratio of
long dimension to short dimension of the bead. |
void |
renderBead(Graphics2D g2,
Feature f,
SequenceRenderContext context)
renderBead renders features as simple ellipse. |
void |
setDimensionRatio(double ratio)
setDimensionRatio sets the minimum ratio of
long dimension to short dimension of the bead. |
getBeadDepth, getBeadDisplacement, getBeadFill, getBeadOutline, getBeadStroke, processMouseEvent, removeDelegateRenderer, renderFeature, setBeadDepth, setBeadDisplacement, setBeadFill, setBeadOutline, setBeadStroke, setDelegateRendereraddChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerpublic static final ChangeType RATIO
RATIO indicating a change to the minimum
allowed ratio of long axis to short axis of the features.protected double dimensionRatio
public EllipticalBeadRenderer()
EllipticalBeadRenderer object
with the default settings.public EllipticalBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke, double dimensionRatio)
EllipticalBeadRenderer.beadDepth - a double.beadDisplacement - a double.beadOutline - a Paint.beadFill - a Paint.beadStroke - a Stroke.dimensionRatio - a double.public void renderBead(Graphics2D g2, Feature f, SequenceRenderContext context)
renderBead renders features as simple ellipse.renderBead in interface BeadFeatureRendererrenderBead in class AbstractBeadRendererg2 - a Graphics2D context.f - a Feature to render.context - a SequenceRenderContext context.public double getDepth(SequenceRenderContext context)
getDepth calculates the depth required by this
renderer to display its beads.getDepth in interface FeatureRenderergetDepth in class AbstractBeadRenderercontext - a SequenceRenderContext object.double.public double getDimensionRatio()
getDimensionRatio returns the maximum ratio of
long dimension to short dimension of the bead. This should be
equal, or greater than 1.double.public void setDimensionRatio(double ratio) throws ChangeVetoException
setDimensionRatio sets the minimum ratio of
long dimension to short dimension of the bead. This should be
equal, or greater than 1.ratio - a double ratio of depth.ChangeVetoException - if an error occurs.Copyright © 2020 BioJava. All rights reserved.