com.compomics.util.gui.spectrum
Class GraphicsPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.compomics.util.gui.spectrum.GraphicsPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
ChromatogramPanel, IsotopicDistributionPanel, SpectrumPanel

public abstract class GraphicsPanel
extends JPanel

This class presents a JPanel that will hold and display a mass spectrum in centroid or profile mode, or a chromatogram.

Author:
Lennart Martens, Harald Barsnes
See Also:
Serialized Form

Nested Class Summary
protected static class GraphicsPanel.GraphicsPanelType
          An enumerator of the possible GraphicsPanel types.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  float alphaLevel
          The opacity of the spectra.
static int ANNOTATED_STATUS
          This status indicates that annotation (if present) will be displayed, while limiting the user to zooming in/out.
protected  GraphicsPanel.GraphicsPanelType currentGraphicsPanelType
          Sets the current GraphicsPanel type, default to centroid spectrum.
protected  int currentPadding
          The current padding (distance between the axes and the border of the panel).
protected static int dataSetCounter
          The number of datasets currently displayed in the panel.
protected  double deltaMassWindow
          The size of the window to use when searcing for matches in the known masses list when the user hovers over a second data point after clicking a previous data point.
protected static int DOTS
          Drawstyle which draws a dot at the measurement height.
protected  Vector iAnnotations
          The Vector that holds a set of Annotation instances.
protected  double iAnnotationYAxisThreshold
          The procentual non-inclusive, minimal y-axis value (compared to the highest point in the spectrum) a point should have before being eligible for annotation.
protected  ArrayList<Color> iAreaUnderCurveColor
          Colors in which the chromatogram polyline is rendered.
protected  boolean iClicked
          Boolean that indicates whether a point has been marked by clicking.
protected  int iClickedDataSetIndex
          Int that indicates which dataset contains the clicked point.
protected  int iClickedIndex
          Int that indicates which point was clicked.
protected  Vector iClickedList
          The Vector that holds all points clicked up to now.
protected  Vector iClickedListDatasetIndices
          The Vector that holds the dataset indices of all points clicked up to now.
protected  ArrayList<Color> iDataPointAndLineColor
          Colors in which the data points and peaks are rendered.
protected  int iDotRadius
          This variable holds the dot radius; only used when drawing style is DOTS style.
protected  boolean iDragged
          This boolean is set to 'true' when dragging is performed.
protected  int iDragXLoc
          The current dragging location.
protected  int iDrawStyle
          This variable holds the drawing style.
protected  int iEndXLoc
          When the mouse is dragged, this represents the X-coordinate of the ending location.
protected  String iFilename
          The spectrum or chromatogram filename.
protected  Color iFilenameColor
          This is the color the filename should be presented in.
protected  boolean iHighLight
          Boolean that will be 'true' when a point needs highlighting.
protected  int iHighLightDatasetIndex
          Index of the dataset containing the point that needs to be highlighted.
protected  int iHighLightIndex
          Index of the point that needs to be highlighted.
protected static HashMap<Double,String> iKnownMassDeltas
          This HashMap instance holds all the known mass deltas (if any).
protected  int iMinDrag
          Minimal dragging distance in pixels.
protected  int iMSLevel
          The ms level of the current spectrum.
static int INTERACTIVE_STATUS
          This status indicates that no annotation will be displayed, but the user will have a fully functional interface (point clicking, selecting, sequencing etc.)
protected  int iPointDetectionTolerance
          The deviation (both left and right) allowed for point highlighting detection.
protected  Integer iPointSize
          Size for the point on a polygon.
protected  String iPrecursorCharge
          This String holds the charge for the precursor.
protected  double iPrecursorMZ
          This variable holds the precursor M/Z.
protected  ArrayList iSpecPanelListeners
          The list of SpectrumPanelListeners.
protected  int iStartXLoc
          When the mouse is dragged, this represents the X-coordinate of the starting location.
protected  int iStartYLoc
          When the mouse is dragged, this represents the Y-coordinate of the starting location.
protected  Vector iStoredSequence
          The Vector that holds a set of stored points from a previously established list.
protected  Vector iStoredSequenceDatasetIndices
          The Vector that holds the dataset indices of stored points from a previously established list.
protected  int iTopPadding
          Effective distance from the panel top border to 5 pixels above the top of the highest point (or y-tick mark).
protected  ArrayList<double[]> iXAxisData
          All the x-axis data points.
protected  ArrayList<int[]> iXAxisDataInPixels
          This array will hold the x-coordinates in pixels for all the x-axis values.
protected  String iXAxisLabel
          The label (and unit between brackets, if available) for the x-axis.
protected  double iXAxisMax
          The maximum x-axis value to display.
protected  double iXAxisMin
          The minimum x-axis value to display.
protected  boolean iXAxisStartAtZero
          This boolean is set to 'true' if the x-axis should start at zero.
protected  int iXPadding
          Effective distance from the x-axis to the panel border.
protected  double iXScaleUnit
          Scale unit for the X axis
protected  int iXUnit
          Graphical unit for the X axis
protected  ArrayList<double[]> iYAxisData
          All the y-axis values.
protected  ArrayList<int[]> iYAxisDataInPixels
          This array will hold the y-coordinates in pixels for all the y-axis values.
protected  String iYAxisLabel
          The label (and unit between brackets, if available) for the y-axis.
protected  double iYAxisMax
          The maximum y-axis value to display.
protected  double iYAxisMin
          The minimum y-axis value to display.
protected  double iYScaleUnit
          Scale unit for the Y axis
protected  int iYUnit
          Graphical unit for the Y axis
protected static int LINES
          Drawstyle which draws lines connecting the X-axis with the measurement.
protected  int maxPadding
          The maximum padding (distance between the axes and the border of the panel).
protected  boolean miniature
          If set to true, the y-axis is removed, the y- and x-axis tags are removed, and any annotations are hidden.
protected  int padding
          The padding (distance between the axes and the border of the panel).
protected  boolean showAllPeaks
          If false, only the annotated peaks will be shown.
protected  boolean showFileName
          The boolean is set to 'true' if the file name is to be shown in the panel.
protected  boolean showPrecursorDetails
          The boolean is set to 'true' if the precursor details is to be shown in the panel.
protected  boolean showResolution
          The boolean is set to 'true' if the resolution is to be shown in the panel.
protected  double xAxisZoomRangeLowerValue
          The lower range for the current zoom range.
protected  double xAxisZoomRangeUpperValue
          The upper range for the current zoom range.
protected  int xTagCount
          The number of X-axis tags.
protected  boolean yAxisZoomExcludesBackgroundPeaks
          If true, the automatic y-axis zoom excludes the background peaks.
protected  boolean yDataIsPositive
          If set to true, all y data is assumed to be positive.
protected  int yTagCount
          The number of Y-axis tags.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GraphicsPanel()
           
 
Method Summary
protected  void addListeners()
          This method adds the event listeners to the panel.
 void addReferenceAreaXAxis(ReferenceArea referenceArea)
          Add a x-axis reference area.
 void addReferenceAreaYAxis(ReferenceArea referenceArea)
          Add a y-axis reference area.
 void addSpectrumPanelListener(SpectrumPanelListener aListener)
          This method registers the specified SpectrumPanelListener with this instance and notifies it of all future events.
protected  void annotate(SpectrumAnnotation aSA, Graphics g, HashMap<String,Integer> aAlreadyAnnotated)
          This method attempts to find the specified SpectrumAnnotation in the current peak list and if so, annotates it correspondingly on the screen.
protected  int[] drawAxes(Graphics g, double aXMin, double aXMax, int aXScale, double aYMin, double aYMax)
          This method draws the axes and their labels on the specified Graphics object, taking into account the padding.
protected  void drawFilledPolygon(Graphics g)
          This method draws filled polygons for all of the peaks for all datasets in the current x-axis range on the panel.
protected  void drawMeasurementLine(int aFirstIndex, int aFirstDatasetIndex, int aSecondIndex, int aSecondDatasetIndex, Graphics g, Color aColor, int aExtraPadding)
          This method draws a line, measuring the distance between two points in real mass units.
protected  void drawPeaks(Graphics g)
          This method draws all of the peaks for all datasets in the current x-axis range on the panel.
protected  void drawXAxisReferenceAreas(Graphics g, boolean drawOnTop)
          Draws the x-axis reference areas if any.
protected  void drawXTags(Graphics g, int aMin, int aMax, int aXScale, int aXAxisWidth, int aPadding)
          This method draws tags on the X axis.
protected  void drawYAxisReferenceAreas(Graphics g, boolean drawOnTop)
          Draws the y-axis reference areas if any.
protected  void drawYTags(Graphics g, int aMin, int aMax, int aYAxisHeight, int aPadding)
          This method draws tags on the Y axis.
protected  void dropDottedLine(int aPeakIndex, int aDatasetIndex, int aTotalHeight, Graphics g)
          This method drops a dotted line from the specified total height to the top of the indicated point.
protected  String findDeltaMassMatches(double aDelta, double aWindow)
          This method attempts to find a list of known mass deltas, corresponding with the specified x value in the given window.
 HashMap<String,ReferenceArea> getAllReferenceAreasXAxis()
          Returns all the x-axis references areas as a hashmap, with the labels as the keys.
 HashMap<String,ReferenceArea> getAllReferenceAreasYAxis()
          Returns all the y-axis references areas as a hashmap, with the labels as the keys.
 float getAlphaLevel()
          Returns the alpha level.
 ArrayList<Color> getAreaUnderCurveColors()
          Returns the list of colors used for the datasets.
 float getBackgroundPeakWidth()
          Returns the current width of the background peaks.
 double getDeltaMassWindow()
          Get the size of the window to use when searching for matches in the known masses list when the user hovers over a second data point after clicking a previous data point.
static HashMap<Double,String> getKnownMassDeltas()
          Get all the known mass deltas (if any).
 int getMaxPadding()
          Returns the max padding (distance between the axes and the border of the panel).
 double getMaxXAxisValue()
          This method reports on the largest x-axis value in the point collection accross all datasets.
 double getMinXAxisValue()
          This method reports on the smallest x-axis value in the point collection across all datasets.
 Color getPeakWaterMarkColor()
          Get the peak water mark color.
 float getPeakWidth()
          Returns the current width of the peaks.
 ArrayList<double[]> getXAxisData()
          Returns the x-axis data.
 double getXAxisZoomRangeLowerValue()
          Returns the lower range for the current zoom range.
 double getXAxisZoomRangeUpperValue()
          Returns the upper range for the current zoom range.
 ArrayList<double[]> getYAxisData()
          Returns the y-axis data.
protected  void highLight(int aIndex, int dataSetIndex, Graphics g, Color aColor, String aComment, int aPixelsSpacer, boolean aShowArrow, int aAnnotationCounter)
          This method will highlight the specified point in the specified color by drawing a floating triangle + x-value above it.
protected  void highlightClicked(int aIndex, int dataSetIndex, Graphics g)
          This method will draw a highlighting triangle + x-value on top of the clicked marked point.
protected  void highLightPeak(int aIndex, int dataSetIndex, Graphics g)
          This method will draw a highlighting triangle + x-value on top of the marked point.
 boolean isMiniature()
          Returns true if the graphics panel is to be drawn in a minature form.
 boolean isSubscriptAnnotationNumbers()
          Returns true if the numbers in the peak annotations are to be subscripted.
 void paint(Graphics g)
          Invoked by Swing to draw components.
protected  void processXAndYData(double[] aXAxisData, double[] aYAxisData, Color dataPointAndLineColor, Color areaUnderCurveColor)
          This method reads the x and y values from the specified arrays and stores these internally for drawing.
 void removeAllReferenceAreasXAxis()
          Removes all the x-axis reference areas.
 void removeAllReferenceAreasYAxis()
          Removes all the y-axis reference areas.
 void removeReferenceAreaXAxis(String identifier)
          Removes the x-axis reference area with the given identifier.
 void removeReferenceAreaYAxis(String identifier)
          Removes the y-axis reference area with the given identifier.
 void rescale(double aMinXAxisValue, double aMaxXAxisValue)
          This method rescales the x-axis while notifying the observers.
 void rescale(double aMinXAxisValue, double aMaxXAxisValue, boolean aNotifyListeners)
          This method rescales the x-axis, allowing the caller to specify whether the observers need be notified.
 void setAlphaLevel(float alphaLevel)
          Sets the alpha level
 void setAnnotations(Vector aAnnotations)
          This method sets all the annotations on this instance.
 void setAnnotationYAxisThreshold(double aThreshold)
          This method allows the caller to set the procentual minimal, non-inclusive y-axis value threshold (compared to the highest point in the spectrum or chromatogram) a point must pass before being eligible for annotation.
 void setAreaUnderCurveColor(Color aColor, int index)
          Sets the color of the area under the curve for chromatograms and profile spectra for the dataset with the given dataset index.
 void setBackgroundPeakWidth(float backgroundPeakWidth)
          Set the backgroundPeakWidth peak width.
 void setDataPointAndLineColor(Color aColor, int index)
          Sets the color of data points and line for the dataset with the given dataset index.
 void setDeltaMassWindow(double deltaMassWindow)
          Set the size of the window to use when searching for matches in the known masses list when the user hovers over a second data point after clicking a previous data point.
 void setFilenameColor(Color aFilenameColor)
          This method sets the display color for the filename on the panel.
static void setKnownMassDeltas(HashMap<Double,String> aiKnownMassDeltas)
          Set all the known mass deltas (if any).
 void setMaxPadding(int aMaxPadding)
          Set the max padding (distance between the axes and the border of the panel).
 void setMiniature(boolean miniature)
          Set if the graphics panel is to be drawn in a minature form.
 void setPeakWaterMarkColor(Color peakWaterMarkColor)
          Set the peak water mark color.
 void setPeakWidth(float peakWidth)
          Set the peak width.
 void setScientificXAxis(boolean scientificXAxis)
          Set if the x-axis tags are to be drawn using scientific annotation.
 void setScientificXAxis(String pattern)
          Set if the x-axis tags are to be drawn using scientific annotation.
 void setScientificYAxis(boolean scientificYAxis)
          Set if the y-axis tags are to be drawn using scientific annotation.
 void setScientificYAxis(String pattern)
          Set if the y-axis tags are to be drawn using scientific annotation.
 void setShowPrecursorDetails(boolean showPrecursorDetails)
          Set wheter the precursor details are to be shown.
 void setShowResolution(boolean showResolution)
          Set wheter the resolution is to be shown.
 void setSubscriptAnnotationNumbers(boolean subscriptAnnotationNumbers)
          Set if the numbers in the peak annotations are to be subscripted.
 void setUseMassDeltaCombinations(boolean useMassDeltaCombinations)
          If true, pairs of delta mass annotations are used when doing de novo sequencing.
 void setXAxisStartAtZero(boolean aXAxisStartAtZero)
          This method sets the start value of the x-axis to zero.
 void setYAxisZoomExcludesBackgroundPeaks(boolean yAxisZoomExcludesBackgroundPeaks)
          Set if the automatic y-axis zoom only considers the anotated peaks.
 void setYDataIsPositive(boolean yDataIsPositive)
          Set to true of all y data values can be assumed to be positive.
 boolean showPrecursorDetails()
          Returns true of the precuror details are to be shown.
 boolean showResolution()
          Returns true if the resolution is to be shown.
 boolean useMassDeltaCombinations()
          If true, pairs of delta mass annotations are used when doing de novo sequencing.
 boolean yAxisZoomOnlyExcludesBackgroundPeaks()
          Returns true if the automatic y-axis zoom excludes background peaks.
 boolean yDataIsPositive()
          Returns true of all the y-data is to be assumed as positive.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

miniature

protected boolean miniature
If set to true, the y-axis is removed, the y- and x-axis tags are removed, and any annotations are hidden. All to make the graphics panel look better in a smaller version, e.g., when put into a table cell. When turning miniature mode one it is also recommended to reduce the max padding. Note that miniature and reduced max padding is set automatically by the GraphicsPanelTableCellRenderer.


yDataIsPositive

protected boolean yDataIsPositive
If set to true, all y data is assumed to be positive. This adds a white polygon under the y-axis hiding any polygon data lines that crosses (slightly) below the y-axis.


alphaLevel

protected float alphaLevel
The opacity of the spectra. 0 means completely see-through, 1 means opaque.


dataSetCounter

protected static int dataSetCounter
The number of datasets currently displayed in the panel.


INTERACTIVE_STATUS

public static final int INTERACTIVE_STATUS
This status indicates that no annotation will be displayed, but the user will have a fully functional interface (point clicking, selecting, sequencing etc.)

See Also:
Constant Field Values

ANNOTATED_STATUS

public static final int ANNOTATED_STATUS
This status indicates that annotation (if present) will be displayed, while limiting the user to zooming in/out.

See Also:
Constant Field Values

iKnownMassDeltas

protected static HashMap<Double,String> iKnownMassDeltas
This HashMap instance holds all the known mass deltas (if any). The keys are the Doubles with the massdelta, the values are the descriptions.


deltaMassWindow

protected double deltaMassWindow
The size of the window to use when searcing for matches in the known masses list when the user hovers over a second data point after clicking a previous data point.


iXAxisLabel

protected String iXAxisLabel
The label (and unit between brackets, if available) for the x-axis. Defaults to "m/z".


iYAxisLabel

protected String iYAxisLabel
The label (and unit between brackets, if available) for the y-axis. Defaults to "Int".


iFilenameColor

protected Color iFilenameColor
This is the color the filename should be presented in.


iDataPointAndLineColor

protected ArrayList<Color> iDataPointAndLineColor
Colors in which the data points and peaks are rendered. Indexed by dataset.


iAreaUnderCurveColor

protected ArrayList<Color> iAreaUnderCurveColor
Colors in which the chromatogram polyline is rendered. Indexed by dataset.


iPointSize

protected Integer iPointSize
Size for the point on a polygon.


iFilename

protected String iFilename
The spectrum or chromatogram filename.


iSpecPanelListeners

protected ArrayList iSpecPanelListeners
The list of SpectrumPanelListeners.


iPointDetectionTolerance

protected int iPointDetectionTolerance
The deviation (both left and right) allowed for point highlighting detection.


iStartXLoc

protected int iStartXLoc
When the mouse is dragged, this represents the X-coordinate of the starting location.


iStartYLoc

protected int iStartYLoc
When the mouse is dragged, this represents the Y-coordinate of the starting location.


iEndXLoc

protected int iEndXLoc
When the mouse is dragged, this represents the X-coordinate of the ending location.


xAxisZoomRangeLowerValue

protected double xAxisZoomRangeLowerValue
The lower range for the current zoom range.


xAxisZoomRangeUpperValue

protected double xAxisZoomRangeUpperValue
The upper range for the current zoom range.


iDragXLoc

protected int iDragXLoc
The current dragging location.


iXScaleUnit

protected double iXScaleUnit
Scale unit for the X axis


iYScaleUnit

protected double iYScaleUnit
Scale unit for the Y axis


iXUnit

protected int iXUnit
Graphical unit for the X axis


iYUnit

protected int iYUnit
Graphical unit for the Y axis


iXPadding

protected int iXPadding
Effective distance from the x-axis to the panel border.


iTopPadding

protected int iTopPadding
Effective distance from the panel top border to 5 pixels above the top of the highest point (or y-tick mark).


iXAxisStartAtZero

protected boolean iXAxisStartAtZero
This boolean is set to 'true' if the x-axis should start at zero.


iDragged

protected boolean iDragged
This boolean is set to 'true' when dragging is performed.


xTagCount

protected int xTagCount
The number of X-axis tags.


yTagCount

protected int yTagCount
The number of Y-axis tags.


padding

protected int padding
The padding (distance between the axes and the border of the panel).


currentPadding

protected int currentPadding
The current padding (distance between the axes and the border of the panel).


maxPadding

protected int maxPadding
The maximum padding (distance between the axes and the border of the panel). Increase if font size on the y-axis becomes too small.


showFileName

protected boolean showFileName
The boolean is set to 'true' if the file name is to be shown in the panel.


showPrecursorDetails

protected boolean showPrecursorDetails
The boolean is set to 'true' if the precursor details is to be shown in the panel.


showResolution

protected boolean showResolution
The boolean is set to 'true' if the resolution is to be shown in the panel.


iXAxisData

protected ArrayList<double[]> iXAxisData
All the x-axis data points. Indexed by dataset (one double[] per dataset). First dataset is the first double[], second dataset is the second double[] etc.Should at all times be sorted from high to low.


iXAxisMin

protected double iXAxisMin
The minimum x-axis value to display.


iXAxisMax

protected double iXAxisMax
The maximum x-axis value to display.


iYAxisMin

protected double iYAxisMin
The minimum y-axis value to display.


iYAxisMax

protected double iYAxisMax
The maximum y-axis value to display.


iAnnotationYAxisThreshold

protected double iAnnotationYAxisThreshold
The procentual non-inclusive, minimal y-axis value (compared to the highest point in the spectrum) a point should have before being eligible for annotation. Default is '0.0'.


iYAxisData

protected ArrayList<double[]> iYAxisData
All the y-axis values. Indexed by dataset (one double[] per dataset). First dataset is the first double[], second dataset is the second double[] etc. Y-axis valuea are related to the x-axis values by the table index. So the first y-axis value of the first dataset is the value for the first x-axis value in the first dataset etc.


iPrecursorMZ

protected double iPrecursorMZ
This variable holds the precursor M/Z.


iPrecursorCharge

protected String iPrecursorCharge
This String holds the charge for the precursor.


iXAxisDataInPixels

protected ArrayList<int[]> iXAxisDataInPixels
This array will hold the x-coordinates in pixels for all the x-axis values. Link is through index. Again indexed by dataset (one double[] per dataset).


iYAxisDataInPixels

protected ArrayList<int[]> iYAxisDataInPixels
This array will hold the y-coordinates in pixels for all the y-axis values. Link is through index. Again indexed by dataset (one double[] per dataset).


iHighLight

protected boolean iHighLight
Boolean that will be 'true' when a point needs highlighting.


iHighLightIndex

protected int iHighLightIndex
Index of the point that needs to be highlighted.


iHighLightDatasetIndex

protected int iHighLightDatasetIndex
Index of the dataset containing the point that needs to be highlighted.


iClicked

protected boolean iClicked
Boolean that indicates whether a point has been marked by clicking.


iClickedIndex

protected int iClickedIndex
Int that indicates which point was clicked.


iClickedDataSetIndex

protected int iClickedDataSetIndex
Int that indicates which dataset contains the clicked point.


iClickedList

protected Vector iClickedList
The Vector that holds all points clicked up to now.


iClickedListDatasetIndices

protected Vector iClickedListDatasetIndices
The Vector that holds the dataset indices of all points clicked up to now.


iStoredSequence

protected Vector iStoredSequence
The Vector that holds a set of stored points from a previously established list.


iStoredSequenceDatasetIndices

protected Vector iStoredSequenceDatasetIndices
The Vector that holds the dataset indices of stored points from a previously established list.


iAnnotations

protected Vector iAnnotations
The Vector that holds a set of Annotation instances.


iMinDrag

protected int iMinDrag
Minimal dragging distance in pixels.


iDrawStyle

protected int iDrawStyle
This variable holds the drawing style.


iDotRadius

protected int iDotRadius
This variable holds the dot radius; only used when drawing style is DOTS style.


LINES

protected static final int LINES
Drawstyle which draws lines connecting the X-axis with the measurement.

See Also:
Constant Field Values

DOTS

protected static final int DOTS
Drawstyle which draws a dot at the measurement height.

See Also:
Constant Field Values

iMSLevel

protected int iMSLevel
The ms level of the current spectrum. O is assumed to mean no ms level given.


showAllPeaks

protected boolean showAllPeaks
If false, only the annotated peaks will be shown. Note that this setting is ignored in profile mode!


yAxisZoomExcludesBackgroundPeaks

protected boolean yAxisZoomExcludesBackgroundPeaks
If true, the automatic y-axis zoom excludes the background peaks. False includes all peaks in the zoom.


currentGraphicsPanelType

protected GraphicsPanel.GraphicsPanelType currentGraphicsPanelType
Sets the current GraphicsPanel type, default to centroid spectrum.

Constructor Detail

GraphicsPanel

public GraphicsPanel()
Method Detail

isSubscriptAnnotationNumbers

public boolean isSubscriptAnnotationNumbers()
Returns true if the numbers in the peak annotations are to be subscripted.

Returns:
true if the numbers in the peak annotations are to be subscripted

setSubscriptAnnotationNumbers

public void setSubscriptAnnotationNumbers(boolean subscriptAnnotationNumbers)
Set if the numbers in the peak annotations are to be subscripted.

Parameters:
subscriptAnnotationNumbers - set if the numbers in the peak annotations are to be subscripted

yAxisZoomOnlyExcludesBackgroundPeaks

public boolean yAxisZoomOnlyExcludesBackgroundPeaks()
Returns true if the automatic y-axis zoom excludes background peaks. False if includes all peaks.

Returns:
true if the automatic y-axis zoom only excludes background peaks

setYAxisZoomExcludesBackgroundPeaks

public void setYAxisZoomExcludesBackgroundPeaks(boolean yAxisZoomExcludesBackgroundPeaks)
Set if the automatic y-axis zoom only considers the anotated peaks.

Parameters:
yAxisZoomExcludesBackgroundPeaks -

useMassDeltaCombinations

public boolean useMassDeltaCombinations()
If true, pairs of delta mass annotations are used when doing de novo sequencing. If false, only single delta masses are annotated.

Returns:
the useMassDeltaCombinations

setUseMassDeltaCombinations

public void setUseMassDeltaCombinations(boolean useMassDeltaCombinations)
If true, pairs of delta mass annotations are used when doing de novo sequencing. If false, only single delta masses are annotated.

Parameters:
useMassDeltaCombinations - the useMassDeltaCombinations to set

showPrecursorDetails

public boolean showPrecursorDetails()
Returns true of the precuror details are to be shown.

Returns:
true of the precuror details are to be show

setShowPrecursorDetails

public void setShowPrecursorDetails(boolean showPrecursorDetails)
Set wheter the precursor details are to be shown.

Parameters:
showPrecursorDetails - the showPrecursorDetails to set

showResolution

public boolean showResolution()
Returns true if the resolution is to be shown.

Returns:
true of the resolution is to be shown

setShowResolution

public void setShowResolution(boolean showResolution)
Set wheter the resolution is to be shown.

Parameters:
showResolution - the showResolution to set

yDataIsPositive

public boolean yDataIsPositive()
Returns true of all the y-data is to be assumed as positive.

Returns:
true of all the y-data is to be assumed as positive

setYDataIsPositive

public void setYDataIsPositive(boolean yDataIsPositive)
Set to true of all y data values can be assumed to be positive.

Parameters:
yDataIsPositive - true of all y data values can be assumed to be positive

isMiniature

public boolean isMiniature()
Returns true if the graphics panel is to be drawn in a minature form.

Returns:
true if the graphics panel is to be drawn in a minature form

setMiniature

public void setMiniature(boolean miniature)
Set if the graphics panel is to be drawn in a minature form.

Parameters:
miniature - if the spectrum is to be drawn in a minature form

getXAxisZoomRangeLowerValue

public double getXAxisZoomRangeLowerValue()
Returns the lower range for the current zoom range.

Returns:
the lower range for the current zoom range

getXAxisZoomRangeUpperValue

public double getXAxisZoomRangeUpperValue()
Returns the upper range for the current zoom range.

Returns:
the upper range for the current zoom range

getDeltaMassWindow

public double getDeltaMassWindow()
Get the size of the window to use when searching for matches in the known masses list when the user hovers over a second data point after clicking a previous data point.

Returns:
the size of the delta mass window

setDeltaMassWindow

public void setDeltaMassWindow(double deltaMassWindow)
Set the size of the window to use when searching for matches in the known masses list when the user hovers over a second data point after clicking a previous data point.

Parameters:
deltaMassWindow - the new size of the delta mass window

getKnownMassDeltas

public static HashMap<Double,String> getKnownMassDeltas()
Get all the known mass deltas (if any). The keys are the Doubles with the massdelta, the values are the descriptions.

Returns:
HashMap of the known mass deltas

setKnownMassDeltas

public static void setKnownMassDeltas(HashMap<Double,String> aiKnownMassDeltas)
Set all the known mass deltas (if any). The keys are the Doubles with the massdelta, the values are the descriptions.

Parameters:
aiKnownMassDeltas - the HasMap of the known mass deltas

getXAxisData

public ArrayList<double[]> getXAxisData()
Returns the x-axis data.

Returns:
the x-axis data

getYAxisData

public ArrayList<double[]> getYAxisData()
Returns the y-axis data.

Returns:
the y-axis data

getAlphaLevel

public float getAlphaLevel()
Returns the alpha level.

Returns:
the alphaLevel

setAlphaLevel

public void setAlphaLevel(float alphaLevel)
Sets the alpha level

Parameters:
alphaLevel - the alphaLevel to set

setXAxisStartAtZero

public void setXAxisStartAtZero(boolean aXAxisStartAtZero)
This method sets the start value of the x-axis to zero.

Parameters:
aXAxisStartAtZero - if true the x axis starts at zero

setMaxPadding

public void setMaxPadding(int aMaxPadding)
Set the max padding (distance between the axes and the border of the panel).

Parameters:
aMaxPadding - the new max padding

getMaxPadding

public int getMaxPadding()
Returns the max padding (distance between the axes and the border of the panel).

Returns:
the max padding

getPeakWidth

public float getPeakWidth()
Returns the current width of the peaks.

Returns:
the peak width

setPeakWidth

public void setPeakWidth(float peakWidth)
Set the peak width.

Parameters:
peakWidth - the new peak width

getBackgroundPeakWidth

public float getBackgroundPeakWidth()
Returns the current width of the background peaks.

Returns:
the peak width

setBackgroundPeakWidth

public void setBackgroundPeakWidth(float backgroundPeakWidth)
Set the backgroundPeakWidth peak width.

Parameters:
backgroundPeakWidth - the new backgroundPeakWidth peak width

setAnnotations

public void setAnnotations(Vector aAnnotations)
This method sets all the annotations on this instance. Passing a 'null' value for the Vector will result in simply removing all annotations. Do note that this method will attempt to remove duplicate annotations on a point by deleting any annotation for which the combination of annotation label and annotation x-axis value has been seen before!

Parameters:
aAnnotations - Vector with SpectrumAnnotation instances.

setAnnotationYAxisThreshold

public void setAnnotationYAxisThreshold(double aThreshold)
This method allows the caller to set the procentual minimal, non-inclusive y-axis value threshold (compared to the highest point in the spectrum or chromatogram) a point must pass before being eligible for annotation.

Parameters:
aThreshold - double with the procentual y-axis value (as compared to the highest point in the spectrum or chromatogram) cutoff threshold for annotation.

setFilenameColor

public void setFilenameColor(Color aFilenameColor)
This method sets the display color for the filename on the panel. Can be 'null' for default coloring.

Parameters:
aFilenameColor - Color to render the filename in on the panel. Can be 'null' for default coloring.

paint

public void paint(Graphics g)
Invoked by Swing to draw components. Applications should not invoke paint directly, but should instead use the repaint method to schedule the component for redrawing.

This method actually delegates the work of painting to three protected methods: paintComponent, paintBorder, and paintChildren. They're called in the order listed to ensure that children appear on top of component itself. Generally speaking, the component and its children should not paint in the insets area allocated to the border. Subclasses can just override this method, as always. A subclass that just wants to specialize the UI (look and feel) delegate's paint method should just override paintComponent.

Overrides:
paint in class JComponent
Parameters:
g - the Graphics context in which to paint
See Also:
JComponent.paintComponent(java.awt.Graphics), JComponent.paintBorder(java.awt.Graphics), JComponent.paintChildren(java.awt.Graphics), JComponent.getComponentGraphics(java.awt.Graphics), JComponent.repaint(long, int, int, int, int)

drawXAxisReferenceAreas

protected void drawXAxisReferenceAreas(Graphics g,
                                       boolean drawOnTop)
Draws the x-axis reference areas if any.

Parameters:
g - Graphics object to draw on.
drawOnTop - if true the areas to be drawn on top of the data are drawn, if false the areas that are to be drawn behind the data are drawn

drawYAxisReferenceAreas

protected void drawYAxisReferenceAreas(Graphics g,
                                       boolean drawOnTop)
Draws the y-axis reference areas if any.

Parameters:
g - Graphics object to draw on.
drawOnTop - if true the areas to be drawn on top of the data are drawn, if false the areas that are to be drawn behind the data are drawn

getMaxXAxisValue

public double getMaxXAxisValue()
This method reports on the largest x-axis value in the point collection accross all datasets.

Returns:
double with the largest x-axis value in the point collection.

getMinXAxisValue

public double getMinXAxisValue()
This method reports on the smallest x-axis value in the point collection across all datasets.

Returns:
double with the smallest x-axis value in the point collection.

addSpectrumPanelListener

public void addSpectrumPanelListener(SpectrumPanelListener aListener)
This method registers the specified SpectrumPanelListener with this instance and notifies it of all future events. The Listeners will be notified in order of addition (first addition is notified first).

Parameters:
aListener - SpectrumPanelListener to register on this instance.

addListeners

protected void addListeners()
This method adds the event listeners to the panel.


rescale

public void rescale(double aMinXAxisValue,
                    double aMaxXAxisValue)
This method rescales the x-axis while notifying the observers.

Parameters:
aMinXAxisValue - double with the new minimum x-axis value to display.
aMaxXAxisValue - double with the new maximum x-axis value to display.

addReferenceAreaXAxis

public void addReferenceAreaXAxis(ReferenceArea referenceArea)
Add a x-axis reference area.

Parameters:
referenceArea - the reference area to add

removeReferenceAreaXAxis

public void removeReferenceAreaXAxis(String identifier)
Removes the x-axis reference area with the given identifier. Does nothing if no reference with the given identifier is found.

Parameters:
identifier - the identifier of the reference to remove

removeAllReferenceAreasXAxis

public void removeAllReferenceAreasXAxis()
Removes all the x-axis reference areas.


getAllReferenceAreasXAxis

public HashMap<String,ReferenceArea> getAllReferenceAreasXAxis()
Returns all the x-axis references areas as a hashmap, with the labels as the keys.

Returns:
hashmap of all reference areas

addReferenceAreaYAxis

public void addReferenceAreaYAxis(ReferenceArea referenceArea)
Add a y-axis reference area.

Parameters:
referenceArea - the reference area to add

removeReferenceAreaYAxis

public void removeReferenceAreaYAxis(String identifier)
Removes the y-axis reference area with the given identifier. Does nothing if no reference with the given identifier is found.

Parameters:
identifier - the identifier of the reference to remove

removeAllReferenceAreasYAxis

public void removeAllReferenceAreasYAxis()
Removes all the y-axis reference areas.


getAllReferenceAreasYAxis

public HashMap<String,ReferenceArea> getAllReferenceAreasYAxis()
Returns all the y-axis references areas as a hashmap, with the labels as the keys.

Returns:
hashmap of all reference areas

setDataPointAndLineColor

public void setDataPointAndLineColor(Color aColor,
                                     int index)
Sets the color of data points and line for the dataset with the given dataset index. Index starts at 0.

Parameters:
aColor - the color to use
index - the index of the dataset

setAreaUnderCurveColor

public void setAreaUnderCurveColor(Color aColor,
                                   int index)
Sets the color of the area under the curve for chromatograms and profile spectra for the dataset with the given dataset index. Index starts at 0.

Parameters:
aColor - the color to use
index - the index of the dataset

getAreaUnderCurveColors

public ArrayList<Color> getAreaUnderCurveColors()
Returns the list of colors used for the datasets. Index on dataset. Index starts at 0.

Returns:
the the list of colors used for the datasets

rescale

public void rescale(double aMinXAxisValue,
                    double aMaxXAxisValue,
                    boolean aNotifyListeners)
This method rescales the x-axis, allowing the caller to specify whether the observers need be notified.

Parameters:
aMinXAxisValue - double with the new minimum x-axis value to display.
aMaxXAxisValue - double with the new maximum x-axis value to display.
aNotifyListeners - boolean to indicate whether the observers should be notified.

processXAndYData

protected void processXAndYData(double[] aXAxisData,
                                double[] aYAxisData,
                                Color dataPointAndLineColor,
                                Color areaUnderCurveColor)
This method reads the x and y values from the specified arrays and stores these internally for drawing. The x-axis values are sorted in this step.

Parameters:
aXAxisData - double[] with the x-axis values.
aYAxisData - double[] with the corresponding y-axis values.
dataPointAndLineColor - the color to use for the data points and line
areaUnderCurveColor - the color to use for the area under the curve

drawAxes

protected int[] drawAxes(Graphics g,
                         double aXMin,
                         double aXMax,
                         int aXScale,
                         double aYMin,
                         double aYMax)
This method draws the axes and their labels on the specified Graphics object, taking into account the padding.

Parameters:
g - Graphics object to draw on.
aXMin - double with the minimal x value.
aXMax - double with the maximum x value.
aXScale - int with the scale to display for the X-axis labels (as used in BigDecimal's setScale).
aYMin - double with the minimal y value.
aYMax - double with the maximum y value.
Returns:
int[] with the length of the X axis and Y axis respectively.

drawXTags

protected void drawXTags(Graphics g,
                         int aMin,
                         int aMax,
                         int aXScale,
                         int aXAxisWidth,
                         int aPadding)
This method draws tags on the X axis.

Parameters:
aMin - double with the minimum value for the axis.
aMax - double with the maximum value for the axis.
aXScale - int with the scale to display for the X-axis labels (as used in BigDecimal's setScale).
g - Graphics object to draw on.
aXAxisWidth - int with the axis width in pixels.
aPadding - int with the amount of padding to take into account.

drawYTags

protected void drawYTags(Graphics g,
                         int aMin,
                         int aMax,
                         int aYAxisHeight,
                         int aPadding)
This method draws tags on the Y axis.

Parameters:
aMin - double with the minimum value for the axis.
aMax - double with the maximum value for the axis.
g - Graphics object to draw on.
aYAxisHeight - int with the axis height in pixels.
aPadding - int with the amount of padding to take into account.

highLightPeak

protected void highLightPeak(int aIndex,
                             int dataSetIndex,
                             Graphics g)
This method will draw a highlighting triangle + x-value on top of the marked point.

Parameters:
aIndex - int with the index of the point to highlight.
dataSetIndex - the index of the dataset
g - Graphics object to draw the highlighting on.

highlightClicked

protected void highlightClicked(int aIndex,
                                int dataSetIndex,
                                Graphics g)
This method will draw a highlighting triangle + x-value on top of the clicked marked point.

Parameters:
aIndex - int with the index of the clicked point to highlight.
dataSetIndex - the index of the dataset
g - Graphics object to draw the highlighting on.

highLight

protected void highLight(int aIndex,
                         int dataSetIndex,
                         Graphics g,
                         Color aColor,
                         String aComment,
                         int aPixelsSpacer,
                         boolean aShowArrow,
                         int aAnnotationCounter)
This method will highlight the specified point in the specified color by drawing a floating triangle + x-value above it.

Parameters:
aIndex - int with the index.
dataSetIndex - the index of the dataset
g - Graphics object to draw on
aColor - Color to draw the highlighting in.
aComment - String with an optional comment. Can be 'null' in which case it will be omitted.
aPixelsSpacer - int that gives the vertical spacer in pixels for the highlighting.
aShowArrow - boolean that indicates whether a downward-pointing arrow and dotted line should be drawn over the point.
aAnnotationCounter - the number of annotation of the given peak

drawMeasurementLine

protected void drawMeasurementLine(int aFirstIndex,
                                   int aFirstDatasetIndex,
                                   int aSecondIndex,
                                   int aSecondDatasetIndex,
                                   Graphics g,
                                   Color aColor,
                                   int aExtraPadding)
This method draws a line, measuring the distance between two points in real mass units.

Parameters:
aFirstIndex - int with the first point index to draw from.
aFirstDatasetIndex - the dataset index of the first data point
aSecondIndex - int with the second point index to draw to.
aSecondDatasetIndex - the dataset index of the second data point
g - Graphics object on which to draw.
aColor - Color object with the color for all the drawing.
aExtraPadding - int with an optional amount of extra padding (lower on the graph if positive, higher on the graph if negative)

dropDottedLine

protected void dropDottedLine(int aPeakIndex,
                              int aDatasetIndex,
                              int aTotalHeight,
                              Graphics g)
This method drops a dotted line from the specified total height to the top of the indicated point.

Parameters:
aPeakIndex - int with the index of the point to draw the dotted line for.
aDatasetIndex - the index of the dataset
aTotalHeight - int with the height (in pixels) to drop the dotted line from.
g - Graphics object to draw the dotted line on.

findDeltaMassMatches

protected String findDeltaMassMatches(double aDelta,
                                      double aWindow)
This method attempts to find a list of known mass deltas, corresponding with the specified x value in the given window.

Parameters:
aDelta - the delta mass to search for
aWindow - the window used for the search
Returns:
String with the description of the matching mass delta or empty String if none was found.

annotate

protected void annotate(SpectrumAnnotation aSA,
                        Graphics g,
                        HashMap<String,Integer> aAlreadyAnnotated)
This method attempts to find the specified SpectrumAnnotation in the current peak list and if so, annotates it correspondingly on the screen.

Parameters:
aSA - SpectrumAnnotation with the annotation to find.
g - Graphics instance to annotate on.
aAlreadyAnnotated - HashMap with the index of a point as key, and the number of times it has been annotated as value (or 'null' if not yet annotated).

drawPeaks

protected void drawPeaks(Graphics g)
This method draws all of the peaks for all datasets in the current x-axis range on the panel.

Parameters:
g - Graphics object to draw on.

drawFilledPolygon

protected void drawFilledPolygon(Graphics g)
This method draws filled polygons for all of the peaks for all datasets in the current x-axis range on the panel.

Parameters:
g - Graphics object to draw on.

setScientificXAxis

public void setScientificXAxis(boolean scientificXAxis)
Set if the x-axis tags are to be drawn using scientific annotation. The default is false. The default pattern is "##0.#####E0".

Parameters:
scientificXAxis - if the x-axis tags is to be drawn using scientific annotation

setScientificXAxis

public void setScientificXAxis(String pattern)
Set if the x-axis tags are to be drawn using scientific annotation. The default is false. For pattern details see java.text.DecimalFormat. The default pattern is "##0.#####E0".

Parameters:
pattern - the number format pattern to use

setScientificYAxis

public void setScientificYAxis(boolean scientificYAxis)
Set if the y-axis tags are to be drawn using scientific annotation. The default is false. The default pattern is "##0.#####E0".

Parameters:
scientificYAxis - if the y-axis tags is to be drawn using scientific annotation

setScientificYAxis

public void setScientificYAxis(String pattern)
Set if the y-axis tags are to be drawn using scientific annotation. The default is false. For pattern details see java.text.DecimalFormat. The default pattern is "##0.#####E0".

Parameters:
pattern - the number format pattern to use

getPeakWaterMarkColor

public Color getPeakWaterMarkColor()
Get the peak water mark color.

Returns:
the peak water mark color

setPeakWaterMarkColor

public void setPeakWaterMarkColor(Color peakWaterMarkColor)
Set the peak water mark color.

Parameters:
peakWaterMarkColor - the color to set


Copyright © 2012. All Rights Reserved.