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
RoundRectangularBeadRenderer renders features
as rectangles with rounded corners. Their outline and fill
Paint, Stroke, feature depth, Y-axis
displacement are configurable.- Since:
- 1.2
- Author:
- Keith James
- See Also:
-
Field Summary
FieldsFields inherited from class org.biojava.bio.gui.sequence.AbstractBeadRenderer
beadDepth, beadDisplacement, beadFill, beadOutline, beadStroke, delegates, delegationCache, DEPTH, DISPLACEMENT, FILL, OUTLINE, STROKE -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptiondoublegetDepth(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, setDelegateRendererMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
-
Field Details
-
rect
-
arcWidth
-
arcHeight
-
-
Constructor Details
-
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 Details
-
renderBead
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
getDepthcalculates the depth required by this renderer to display its beads.- Specified by:
getDepthin interfaceFeatureRenderer- Overrides:
getDepthin classAbstractBeadRenderer- Parameters:
context- aSequenceRenderContext.- Returns:
- a
double.
-