public class PherogramPainter extends java.lang.Object
PherogramTraceCurveView
and
PherogramArea
) that implements common painting routines.Modifier and Type | Field and Description |
---|---|
static int |
INDEX_LABEL_INTERVAL |
Constructor and Description |
---|
PherogramPainter(PherogramComponent owner) |
Modifier and Type | Method and Description |
---|---|
double |
calculateTraceCurvesHeight()
Returns the height that is used to paint the trace curves.
|
void |
paintBaseCallIndices(java.awt.Graphics2D g,
int firstBaseCallIndex,
int lastBaseCallIndex,
double startX,
double startY,
PherogramDistortion distortion,
double compoundWidth) |
void |
paintBaseCallLines(java.awt.Graphics2D g,
int firstBaseCallIndex,
int lastBaseCallIndex,
double startX,
double startY,
double height,
PherogramDistortion distortion) |
void |
paintBaseCalls(java.awt.Graphics2D g,
int firstBaseCallIndex,
int lastBaseCallIndex,
double startX,
double startY,
PherogramDistortion distortion) |
void |
paintGaps(java.awt.Graphics2D g,
int firstBaseCallIndex,
int lastBaseCallIndex,
double startX,
double startY,
double height,
PherogramDistortion distortion,
double compoundWidth) |
double |
paintTraceCurves(java.awt.Graphics2D g,
int firstBaseCallIndex,
int lastBaseCallIndex,
double x,
double y,
PherogramDistortion distortion,
double compoundWidth) |
void |
paintUnscaledBackground(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D visibleRect,
double horizontalScale) |
void |
paintUnscaledBaseCallIndices(int startX,
int endX,
java.awt.Graphics2D g,
double paintX,
double paintY,
double horizontalScale) |
void |
paintUnscaledBaseCallLines(int startX,
int endX,
java.awt.Graphics2D g,
double paintX,
double paintY,
double height,
double horizontalScale) |
void |
paintUnscaledBaseCalls(int startX,
int endX,
java.awt.Graphics2D g,
double paintStartX,
double paintY,
double horizontalScale)
Paints the nucleotide characters of the base call sequence at the x-positions stored in the underlying
pherogram model.
|
double |
paintUnscaledTraceCurves(int startX,
int endX,
java.awt.Graphics2D g,
double paintX,
double paintY,
double horizontalScale)
Paints parts the four trace curves stored in the specified provider with a constant scale on x.
|
public static final int INDEX_LABEL_INTERVAL
public PherogramPainter(PherogramComponent owner)
public void paintUnscaledBackground(java.awt.Graphics2D g, java.awt.geom.Rectangle2D visibleRect, double horizontalScale)
public void paintBaseCalls(java.awt.Graphics2D g, int firstBaseCallIndex, int lastBaseCallIndex, double startX, double startY, PherogramDistortion distortion)
public void paintUnscaledBaseCalls(int startX, int endX, java.awt.Graphics2D g, double paintStartX, double paintY, double horizontalScale)
Note that no background will be painted by this method and the font currently set in the specified graphics context will be used.
startX
- the index in provider
of the first trace value to be paintedendX
- the index in provider
after the last value to be paintedg
- the graphics context to paint onpaintCenterX
- the left most coordinate of the area where the trace curves will be paintedpaintY
- the top most coordinate of the area where the trace curves will be paintedhorizontalScale
- the factor by which the trace curves shall be scaled (zoomed) on the x-axispublic double calculateTraceCurvesHeight()
PherogramProvider
is normalized to 1.0, the returned value is equal to the vertical scale value of the owning pherogram component
(PherogramComponent.getVerticalScale()
).public double paintUnscaledTraceCurves(int startX, int endX, java.awt.Graphics2D g, double paintX, double paintY, double horizontalScale)
Note that no background will be painted by this method.
startX
- the index in provider
of the first trace value to be paintedendX
- the index in provider
after the last value to be paintedg
- the graphics context to paint onpaintX
- the left most coordinate of the area where the trace curves will be paintedpaintY
- the top most coordinate of the area where the trace curves will be paintedhorizontalScale
- the factor by which the trace curves shall be scaled (zoomed) on the x-axispublic void paintUnscaledBaseCallLines(int startX, int endX, java.awt.Graphics2D g, double paintX, double paintY, double height, double horizontalScale)
public void paintBaseCallLines(java.awt.Graphics2D g, int firstBaseCallIndex, int lastBaseCallIndex, double startX, double startY, double height, PherogramDistortion distortion)
public void paintUnscaledBaseCallIndices(int startX, int endX, java.awt.Graphics2D g, double paintX, double paintY, double horizontalScale)
public void paintBaseCallIndices(java.awt.Graphics2D g, int firstBaseCallIndex, int lastBaseCallIndex, double startX, double startY, PherogramDistortion distortion, double compoundWidth)
public double paintTraceCurves(java.awt.Graphics2D g, int firstBaseCallIndex, int lastBaseCallIndex, double x, double y, PherogramDistortion distortion, double compoundWidth)
public void paintGaps(java.awt.Graphics2D g, int firstBaseCallIndex, int lastBaseCallIndex, double startX, double startY, double height, PherogramDistortion distortion, double compoundWidth)