uk.ac.sanger.cgp.standalonecsa.util
Class SimpleChromGraphic

java.lang.Object
  extended by uk.ac.sanger.cgp.standalonecsa.util.SimpleChromGraphic

public class SimpleChromGraphic
extends java.lang.Object

Author:
Original: kr2, $Author: kr2 $

Field Summary
static java.awt.Color A_BASE_COLOR
           
static java.awt.Color A_HIGHLIGHT_COLOR
           
static java.awt.Color C_BASE_COLOR
           
static java.awt.Color C_HIGHLIGHT_COLOR
           
static java.awt.Color G_BASE_COLOR
           
static java.awt.Color G_HIGHLIGHT_COLOR
           
protected static org.apache.commons.logging.Log log
           
static java.awt.Color T_BASE_COLOR
           
static java.awt.Color T_HIGHLIGHT_COLOR
           
 
Constructor Summary
protected SimpleChromGraphic()
           
  SimpleChromGraphic(org.biojava.bio.chromatogram.Chromatogram chrom, int startScanIn, int stopScanIn, int heightIn, float horizScaleIn)
          The supplied height is used to calculate the scaling factor for the image.
  SimpleChromGraphic(org.biojava.bio.chromatogram.Chromatogram chrom, int startScanIn, int stopScanIn, int heightIn, float horizScaleIn, int heightBuffIn, boolean renderScaleIn)
           
 
Method Summary
 void drawTo(java.awt.Graphics2D g2)
           
static java.awt.Color generateFillForColor(java.awt.Color baseCol)
           
 float getHorizScale()
           
 int getRenderedHeight()
           
 int getRenderedWidth()
           
 int getStartScan()
           
 int getStopScan()
           
 void setupOffsetTransform(java.awt.Graphics2D g2)
          Developer is resposible for saving the original transform and reinstating
 void setupXoffsetTransform(java.awt.Graphics2D g2)
          Developer is resposible for saving the original transform and reinstating
 void setupYoffsetTransform(java.awt.Graphics2D g2)
          Developer is resposible for saving the original transform and reinstating
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log

A_BASE_COLOR

public static final java.awt.Color A_BASE_COLOR

C_BASE_COLOR

public static final java.awt.Color C_BASE_COLOR

G_BASE_COLOR

public static final java.awt.Color G_BASE_COLOR

T_BASE_COLOR

public static final java.awt.Color T_BASE_COLOR

A_HIGHLIGHT_COLOR

public static final java.awt.Color A_HIGHLIGHT_COLOR

C_HIGHLIGHT_COLOR

public static final java.awt.Color C_HIGHLIGHT_COLOR

G_HIGHLIGHT_COLOR

public static final java.awt.Color G_HIGHLIGHT_COLOR

T_HIGHLIGHT_COLOR

public static final java.awt.Color T_HIGHLIGHT_COLOR
Constructor Detail

SimpleChromGraphic

protected SimpleChromGraphic()

SimpleChromGraphic

public SimpleChromGraphic(org.biojava.bio.chromatogram.Chromatogram chrom,
                          int startScanIn,
                          int stopScanIn,
                          int heightIn,
                          float horizScaleIn)
                   throws CsaRenderException
The supplied height is used to calculate the scaling factor for the image. To add a buffer above peaks setHeightBuffer in px...this will be divided by the scaling factor and applied across the coords

Throws:
CsaRenderException

SimpleChromGraphic

public SimpleChromGraphic(org.biojava.bio.chromatogram.Chromatogram chrom,
                          int startScanIn,
                          int stopScanIn,
                          int heightIn,
                          float horizScaleIn,
                          int heightBuffIn,
                          boolean renderScaleIn)
                   throws CsaRenderException
Throws:
CsaRenderException
Method Detail

generateFillForColor

public static java.awt.Color generateFillForColor(java.awt.Color baseCol)

drawTo

public void drawTo(java.awt.Graphics2D g2)

getRenderedWidth

public int getRenderedWidth()

getRenderedHeight

public int getRenderedHeight()

getHorizScale

public float getHorizScale()

getStartScan

public int getStartScan()

getStopScan

public int getStopScan()

setupOffsetTransform

public void setupOffsetTransform(java.awt.Graphics2D g2)
Developer is resposible for saving the original transform and reinstating


setupXoffsetTransform

public void setupXoffsetTransform(java.awt.Graphics2D g2)
Developer is resposible for saving the original transform and reinstating


setupYoffsetTransform

public void setupYoffsetTransform(java.awt.Graphics2D g2)
Developer is resposible for saving the original transform and reinstating