org.biojava.bio.chromatogram.graphic
Class ChromatogramGraphic.Option

java.lang.Object
  extended by org.biojava.bio.chromatogram.graphic.ChromatogramGraphic.Option
Enclosing class:
ChromatogramGraphic

public static class ChromatogramGraphic.Option
extends java.lang.Object

A typesafe enumeration of the options available for configuring the behavior of a ChromatogramGraphic instance. The semantics and expected values are described with the enumerated options.

Since:
1.3
Author:
Rhett Sutphin (UI CBCB)

Field Summary
static ChromatogramGraphic.Option DRAW_CALL_A
          Option indicating whether to fill in the callboxes for calls of nucleotide A.
static ChromatogramGraphic.Option DRAW_CALL_C
          Option indicating whether to fill in the callboxes for calls of nucleotide C.
static ChromatogramGraphic.Option DRAW_CALL_G
          Option indicating whether to fill in the callboxes for calls of nucleotide G.
static ChromatogramGraphic.Option DRAW_CALL_OTHER
          Option indicating whether to fill in the callboxes for non-base calls (gaps, ambiguities).
static ChromatogramGraphic.Option DRAW_CALL_SEPARATORS
          Option indicating whether to draw vertical lines separating the calls.
static ChromatogramGraphic.Option DRAW_CALL_T
          Option indicating whether to fill in the callboxes for calls of nucleotide T.
static ChromatogramGraphic.Option DRAW_TRACE_A
          Option indicating whether to draw the chromatogram trace for nucleotide A.
static ChromatogramGraphic.Option DRAW_TRACE_C
          Option indicating whether to draw the chromatogram trace for nucleotide C.
static ChromatogramGraphic.Option DRAW_TRACE_G
          Option indicating whether to draw the chromatogram trace for nucleotide G.
static ChromatogramGraphic.Option DRAW_TRACE_T
          Option indicating whether to draw the chromatogram trace for nucleotide T.
static ChromatogramGraphic.Option FROM_TRACE_SAMPLE
          Option indicating the lowest (leftmost) trace sample that should be drawn.
static ChromatogramGraphic.Option HEIGHT_IS_AUTHORITATIVE
          Option indicating whether height or vertical scale is the authoritative measure.
static ChromatogramGraphic.Option HORIZONTAL_NONLINEAR_SCALER
          Option specifying the non-linear scaling function to apply, as embodied in a ChromatogramNonlinearScaler object.
static ChromatogramGraphic.Option SEPARATOR_COLOR
          Option indicating the color that the call separators should be.
static ChromatogramGraphic.Option SEPARATOR_STROKE
          Option providing the the stroke to use for drawing call separators.
static ChromatogramGraphic.Option SUBPATH_LENGTH
          To improve performance, the drawing objects for the chromatogram traces are precomputed.
static ChromatogramGraphic.Option TO_TRACE_SAMPLE
          Option indicating the highest (rightmost) trace sample that should be drawn.
static ChromatogramGraphic.Option TRACE_STROKE
          Option providing the the stroke to use for drawing the chromatogram traces.
static ChromatogramGraphic.Option USE_CUSTOM_STROKE
          Option indicating whether to use custom strokes when drawing traces and separators.
static ChromatogramGraphic.Option USE_PER_SHAPE_TRANSFORM
          Option indicating whether to apply scaling and translation transforms to each shape individually or to apply a single transform to the graphics context.
static ChromatogramGraphic.Option WIDTH_IS_AUTHORITATIVE
          Option indicating whether width or horizontal scale is the authoritative measure.
 
Method Summary
static ChromatogramGraphic.Option lookup(java.lang.String desc)
          Looks up an Option instance based on its string description.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DRAW_CALL_A

public static final ChromatogramGraphic.Option DRAW_CALL_A
Option indicating whether to fill in the callboxes for calls of nucleotide A.

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_CALL_C

public static final ChromatogramGraphic.Option DRAW_CALL_C
Option indicating whether to fill in the callboxes for calls of nucleotide C.

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_CALL_G

public static final ChromatogramGraphic.Option DRAW_CALL_G
Option indicating whether to fill in the callboxes for calls of nucleotide G.

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_CALL_T

public static final ChromatogramGraphic.Option DRAW_CALL_T
Option indicating whether to fill in the callboxes for calls of nucleotide T.

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_CALL_OTHER

public static final ChromatogramGraphic.Option DRAW_CALL_OTHER
Option indicating whether to fill in the callboxes for non-base calls (gaps, ambiguities).

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_TRACE_A

public static final ChromatogramGraphic.Option DRAW_TRACE_A
Option indicating whether to draw the chromatogram trace for nucleotide A.

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_TRACE_C

public static final ChromatogramGraphic.Option DRAW_TRACE_C
Option indicating whether to draw the chromatogram trace for nucleotide C.

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_TRACE_G

public static final ChromatogramGraphic.Option DRAW_TRACE_G
Option indicating whether to draw the chromatogram trace for nucleotide G.

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_TRACE_T

public static final ChromatogramGraphic.Option DRAW_TRACE_T
Option indicating whether to draw the chromatogram trace for nucleotide T.

Value type: Boolean.
Default value: Boolean.TRUE.


DRAW_CALL_SEPARATORS

public static final ChromatogramGraphic.Option DRAW_CALL_SEPARATORS
Option indicating whether to draw vertical lines separating the calls.

Value type: Boolean.
Default value: Boolean.TRUE.


SEPARATOR_COLOR

public static final ChromatogramGraphic.Option SEPARATOR_COLOR
Option indicating the color that the call separators should be.

Value type: Color.
Default value: Color.lightGray.


WIDTH_IS_AUTHORITATIVE

public static final ChromatogramGraphic.Option WIDTH_IS_AUTHORITATIVE
Option indicating whether width or horizontal scale is the authoritative measure. If the value is true, then when the Chromatogram displayed by the graphic is changed, the horizontal scale may be changed but the width will stay the same. If the value is false, the width may change but the horizontal scale will stay the same.

Value type: Boolean.
Default value: Boolean.FALSE.


HEIGHT_IS_AUTHORITATIVE

public static final ChromatogramGraphic.Option HEIGHT_IS_AUTHORITATIVE
Option indicating whether height or vertical scale is the authoritative measure. If the value is true, then when the Chromatogram displayed by the graphic is changed, the vertical scale may be changed but the height will stay the same. If the value is false, the height may change but the vertical scale will stay the same.

Value type: Boolean.
Default value: Boolean.TRUE.


USE_CUSTOM_STROKE

public static final ChromatogramGraphic.Option USE_CUSTOM_STROKE
Option indicating whether to use custom strokes when drawing traces and separators.

Value type: Boolean.
Default value: Boolean.TRUE.


TRACE_STROKE

public static final ChromatogramGraphic.Option TRACE_STROKE
Option providing the the stroke to use for drawing the chromatogram traces.

Value type: Stroke.
Default value: BasicStroke with width 1.0, cap CAP_ROUND, join JOIN_ROUND.


SEPARATOR_STROKE

public static final ChromatogramGraphic.Option SEPARATOR_STROKE
Option providing the the stroke to use for drawing call separators.

Value type: Stroke.
Default value: BasicStroke with width 1.0, default cap & join.


USE_PER_SHAPE_TRANSFORM

public static final ChromatogramGraphic.Option USE_PER_SHAPE_TRANSFORM
Option indicating whether to apply scaling and translation transforms to each shape individually or to apply a single transform to the graphics context. For putative performance reasons, the latter is the default. However, setting this property to true may result in more attractive output, particularly when the horizontal and vertical scales are very different. This value must also be set to true if using a custom stroke while drawing into a Swing graphics context on JDK 1.3.1 on Mac OS X, due to a nasty rendering bug on that platform.

Value type: Boolean.
Default value: Boolean.FALSE.


SUBPATH_LENGTH

public static final ChromatogramGraphic.Option SUBPATH_LENGTH
To improve performance, the drawing objects for the chromatogram traces are precomputed. Specifically, the traces are stored as a set of GeneralPaths. This option indicates how long (in trace samples) each one of these should be. Ideally, this value would be slightly more than the average number of trace samples visible at once in the application using the graphic. However, constantly changing this value is counterproductive as it forces the recalculation of the subpaths. In general, having a value that is too small should be preferred to one that is too large.

Value type: Integer.
Default value: 250.


FROM_TRACE_SAMPLE

public static final ChromatogramGraphic.Option FROM_TRACE_SAMPLE
Option indicating the lowest (leftmost) trace sample that should be drawn. The sample at this (0-based) index will be drawn at x=0 in the output chromatogram. Note that this option is reset to zero every time ChromatogramGraphic.setChromatogram(org.biojava.bio.chromatogram.Chromatogram) is called.

Value type: Integer.
Default value: 0.


TO_TRACE_SAMPLE

public static final ChromatogramGraphic.Option TO_TRACE_SAMPLE
Option indicating the highest (rightmost) trace sample that should be drawn. The sample at this (0-based) index will be the last drawn in the output chromatogram. Note that this option is reset to the length of the new chromatogram every time ChromatogramGraphic.setChromatogram(org.biojava.bio.chromatogram.Chromatogram) is called.

Value type: Integer.
Default value: Integer.MAX_VALUE.


HORIZONTAL_NONLINEAR_SCALER

public static final ChromatogramGraphic.Option HORIZONTAL_NONLINEAR_SCALER
Option specifying the non-linear scaling function to apply, as embodied in a ChromatogramNonlinearScaler object.

Value type: ChromatogramNonlinearScaler.
Default value: an instance of ChromatogramNonlinearScaler.Identity.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

lookup

public static final ChromatogramGraphic.Option lookup(java.lang.String desc)
Looks up an Option instance based on its string description.

Parameters:
desc - the description of the desired Option
Returns:
the Option with the specified description or null if there isn't one