Class ChromatogramPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ChromatogramPanel
extends GraphicsPanel
This class provides a JPanel that can display a profileChromatogram.
Version:
$Id$
Author:
Lennart Martens, Harald Barsnes
See Also:
Serialized Form
  • Constructor Details

    • ChromatogramPanel

      public ChromatogramPanel()
      Empty default constructor
    • ChromatogramPanel

      public ChromatogramPanel​(double[] aXAxisData, double[] aYAxisData)
      This constructor creates a ChromatogramPanel based on the passed parameters. This constructor assumes profileChromatogram data rather than spectrum data. (For profile spectrum data use the SpectrumPanel class instead and set ProfileMode to 'true'.)
      Parameters:
      aXAxisData - double[] with all the X axis data.
      aYAxisData - double[] with all the Y axis data.
    • ChromatogramPanel

      public ChromatogramPanel​(double[] aXAxisData, double[] aYAxisData, String aXAxisLabel, String aYAxisLabel)
      This constructor creates a ChromatogramPanel based on the passed parameters. This constructor assumes profileChromatogram data rather than spectrum data. (For profile spectrum data use the SpectrumPanel class instead and set ProfileMode to 'true'.)
      Parameters:
      aXAxisData - double[] with all the X axis data.
      aYAxisData - double[] with all the Y axis data.
      aXAxisLabel - String with the label for the x-axis (can have a unit between brackets, if available) - can be 'null' for no label
      aYAxisLabel - String with the label for the y-axis (can have a unit between brackets, if available) - can be 'null' for no label
    • ChromatogramPanel

      public ChromatogramPanel​(double[] aXAxisData, double[] aYAxisData, String aXAxisLabel, String aYAxisLabel, Integer aPointSize)
      This constructor creates a ChromatogramPanel based on the passed parameters. This constructor assumes profileChromatogram data rather than spectrum data. (For profile spectrum data use the SpectrumPanel class instead and set ProfileMode to 'true'.)
      Parameters:
      aXAxisData - double[] with all the X axis data.
      aYAxisData - double[] with all the Y axis data.
      aXAxisLabel - String with the label for the x-axis (can have a unit between brackets, if available) - can be 'null' for no label
      aYAxisLabel - String with the label for the y-axis (can have a unit between brackets, if available) - can be 'null' for no label
      aPointSize - Integer with the point size to use
    • ChromatogramPanel

      public ChromatogramPanel​(double[] aXAxisData, double[] aYAxisData, String aXAxisLabel, String aYAxisLabel, Integer aPointSize, boolean profileChromatogram)
      This constructor creates a ChromatogramPanel based on the passed parameters. This constructor assumes profileChromatogram data rather than spectrum data. (For profile spectrum data use the SpectrumPanel class instead and set ProfileMode to 'true'.)
      Parameters:
      aXAxisData - double[] with all the X axis data.
      aYAxisData - double[] with all the Y axis data.
      aXAxisLabel - String with the label for the x-axis (can have a unit between brackets, if available) - can be 'null' for no label
      aYAxisLabel - String with the label for the y-axis (can have a unit between brackets, if available) - can be 'null' for no label
      aPointSize - Integer with the point size to use
      profileChromatogram - If true, the profileChromatogram will be drawn with connected peaks, if false, only the peaks themselves are drawn. Note that profile mode is not recommended when the peak count is high as the drawing will be slow.
  • Method Details

    • addAdditionalDataset

      public void addAdditionalDataset​(double[] aXAxisData, double[] aYAxisData, Color dataPointAndLineColor, Color areaUnderCurveColor)
      Adds an additional profileChromatogram dataset to be displayed in the same Chromatogram Panel. Remember to use different colors for the different datasets.
      Parameters:
      aXAxisData - double[] with all the x-axis values.
      aYAxisData - double[] with all the y-axis values
      dataPointAndLineColor - the color to use for the data points and lines
      areaUnderCurveColor - the color to use for the area under the curve
    • setPointSize

      public void setPointSize​(Integer aPointSize)
      This method allows the caller to set the point size for the profileChromatogram. Note that this number needs to be even, so any uneven number will be replaced by the closest, lower, even integer (e.g., 5 becomes 4, 13 becomes 12).
      Parameters:
      aPointSize - int with the point size, that will be reduced to the closest, lower even integer (e.g., 5 becomes 4, 13 becomes 12).
    • setProfileMode

      public void setProfileMode​(boolean profileMode)
      Set the drawing style to profile or centroid mode. Profile mode draws lines between the peaks while centroid mode only draws the peaks. Profile mode is only recommended for datasets with low number of peaks, as it can be slow on bigger datasets.
      Parameters:
      profileMode - use profile mode?