Package org.biojava.bio.gui.sequence
Class RoundRectangularBeadRenderer
- java.lang.Object
-
- org.biojava.utils.AbstractChangeable
-
- org.biojava.bio.gui.sequence.AbstractBeadRenderer
-
- org.biojava.bio.gui.sequence.RoundRectangularBeadRenderer
-
- All Implemented Interfaces:
Serializable,BeadFeatureRenderer,FeatureRenderer,Changeable
public class RoundRectangularBeadRenderer extends AbstractBeadRenderer
RoundRectangularBeadRendererrenders features as rectangles with rounded corners. Their outline and fillPaint,Stroke, feature depth, Y-axis displacement are configurable.- Since:
- 1.2
- Author:
- Keith James
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected doublearcHeightprotected doublearcWidthprotected RoundRectangle2Drect-
Fields inherited from class org.biojava.bio.gui.sequence.AbstractBeadRenderer
beadDepth, beadDisplacement, beadFill, beadOutline, beadStroke, delegates, delegationCache, DEPTH, DISPLACEMENT, FILL, OUTLINE, STROKE
-
-
Constructor Summary
Constructors Constructor Description RoundRectangularBeadRenderer()Creates a newRoundRectangularBeadRendererobject with the default settings.RoundRectangularBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke, double arcWidth, double arcHeight)Creates a newRoundRectangularBeadRenderer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDepth(SequenceRenderContext context)getDepthcalculates the depth required by this renderer to display its beads.voidrenderBead(Graphics2D g2, Feature f, SequenceRenderContext context)renderBeadrenders features as a rectangle with rounded corners.-
Methods inherited from class org.biojava.bio.gui.sequence.AbstractBeadRenderer
getBeadDepth, getBeadDisplacement, getBeadFill, getBeadOutline, getBeadStroke, processMouseEvent, removeDelegateRenderer, renderFeature, setBeadDepth, setBeadDisplacement, setBeadFill, setBeadOutline, setBeadStroke, setDelegateRenderer
-
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
-
-
-
-
Field Detail
-
rect
protected RoundRectangle2D rect
-
arcWidth
protected double arcWidth
-
arcHeight
protected double arcHeight
-
-
Constructor Detail
-
RoundRectangularBeadRenderer
public RoundRectangularBeadRenderer()
Creates a newRoundRectangularBeadRendererobject with the default settings.
-
RoundRectangularBeadRenderer
public RoundRectangularBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke, double arcWidth, double arcHeight)
Creates a newRoundRectangularBeadRenderer.- Parameters:
beadDepth- adouble.beadDisplacement- adouble.beadOutline- aPaint.beadFill- aPaint.beadStroke- aStroke.arcWidth- adoublevalue which sets the arc width of the corners.arcHeight- adoublevalue which sets the arc height of the corners.
-
-
Method Detail
-
renderBead
public void renderBead(Graphics2D g2, Feature f, SequenceRenderContext context)
renderBeadrenders features as a rectangle with rounded corners.- Specified by:
renderBeadin interfaceBeadFeatureRenderer- Specified by:
renderBeadin classAbstractBeadRenderer- Parameters:
g2- aGraphics2D.f- aFeatureto render.context- aSequenceRenderContextcontext.
-
getDepth
public double getDepth(SequenceRenderContext context)
getDepthcalculates the depth required by this renderer to display its beads.- Specified by:
getDepthin interfaceFeatureRenderer- Overrides:
getDepthin classAbstractBeadRenderer- Parameters:
context- aSequenceRenderContext.- Returns:
- a
double.
-
-