Class DrawProtScatterPlot

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--Draw2DprotPlot
                    |
                    +--DrawProtScatterPlot
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable

public class DrawProtScatterPlot
extends Draw2DprotPlot

Class DrawProtScatterPlot.java - draw scatterplot using Draw2Dplot base class. This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government and Djamel Medjahed (SAIC-Frederick). As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file.

Version:
$Date: 2002/10/14 20:17:17 $ $Revision: $
Author:
P. Lemkin (NCI), Djamel Medjahed (SAIC), NCI-Frederick, Frederick, MD
See Also:
ProtPlot Home

This work was derived from MAExplorer under the Mozilla 1.1 Open Source Public License by Peter Lemkin of the National Cancer Institute, an agency of the United States Government subject to the limitations noted in the accompanying LEGAL file. See licence info on http://maexplorer.sourceforge.org/, Serialized Form


Inner classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
private  int maxPoints
          max # points allocated for drawing arrays
private  int prevBestMPID
          previus best mPid of protein selected by mouse motion or clicking
private  ProtPlot prp
          instance of ProtPlot
private  ReadPRP rd
          instance of ReadPRP of current sample
private  ReadPRP rdX
          instance of ReadPRP of ratio sample X
private  ReadPRP rdY
          instance of ReadPRP of ratio sample Y
private  boolean showAssocWebPageFlag
          flag to allow popup web access to associated protein database
private  ShowScatterPlotPopup spp
          instance of ShowScatterPlotPopup
private  UtilPRP util
          instance of UtilPRP
 
Fields inherited from class Draw2DprotPlot
aText, curProteinColor, cvPrecision, dbugCnt, drawIntoImageFlag, eDiff, eDiffBest, fil, horizCaption, iBest, iCurMPid, iHeight, img, info1, info2, info3, info4, info5, info6, iWidth, leftTextX, ln10, log10e, logScaleX, logScaleY, logScalingFlag, lowerTitle1, lowerTitle2, maxX, maxXscroll, maxY, maxYscroll, MIN_CANVAS_HEIGHT, MIN_CANVAS_WIDTH, minX, minXscroll, minY, minYscroll, normFont, notOkColor, nPointsMax, nPointsPlotted, oGifFileName, okColor, pointColor, preferredHeight, preferredWidth, radius, RADIUS, scale, SCALE_DEF, scaleX, scaleXplot, scaleY, scaleYplot, sMaxX, sMaxY, sMinX, sMinY, TARGET_SIZE, title, titleFont, topTitle1, topTitle2, topTitle3, topTitle4, vertCaption, xBase, xcurProtein, xDataScatterPlot, xLeft, xOffset, XOFFSET_DEF, xPlotted, xPnt, xRange, XRANGE_DEF, xRight, xScale, xText, yBase, ycurProtein, yDataScatterPlot, yOffset, YOFFSET_DEF, yPlotted, yPnt, yRange, YRANGE_DEF, yScale, yText, yTop
 
Fields inherited from class java.awt.Canvas
base, nameCounter, serialVersionUID
 
Fields inherited from class java.awt.Component
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dbg, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
(package private) DrawProtScatterPlot(ProtPlot prp, ShowScatterPlotPopup spp)
          DrawProtScatterPlot() - constructor
 
Method Summary
private  void draw_MWvsPI_scatterPlot()
          draw_MWvsPI_scatterPlot() - draw (Mw vs pI) scatterplot (repeatedly) of Filter data.
private  boolean draw_XvsY_scatterPlot()
          draw_XvsY_scatterPlot() - draw (X vs Y) scatterplot (repeatedly) of Filter data.
private  void drawScatterPlot()
          drawScatterPlot() - draw scatterplot (repeatedly) of Filter data This generates the data lists that are passed to the drawing engine.
 void mouseHandler(int x, int y, int mouseKeyMods, boolean updateCurProtFlag)
          mouseHandler() - interact with current plot if a graphic plot.
 void setCurProtein(int mPid, boolean updateCurProtFlag)
          setCurProtein() - set current protein spot to mPid if it exists (not -1).
 void setNewDraw2DprotPlot()
          setNewDraw2DprotPlot() - reset data structures for new sample
 void showProteinOfInterest(int mPid, int mouseKeyMods, boolean updateCurProtFlag)
          showProteinOfInterest() - show quant&NCBI data if click on a point in plot
 void updateScatterPlot()
          updateScatterPlot() - refresh scatterplot data and redraw the canvas
 
Methods inherited from class Draw2DprotPlot
alog10, calcBaseImage, draw2Dplot, drawCircle, drawCmapRatioScaleMap, drawFilledColoredCircle, drawFilledColoredCircle, drawFilledGrayCircle, drawFilterStatusText, drawGifFile, drawPlus, drawProtein, drawRedPlusGreenRatioScaleMap, drawScaleMap, drawScatterPlotScaleAndLabels, drawSquare, getMinimumSize, getPreferredSize, log10, logZero, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, set2DplotSubtitles, setupArrays, update2Dplot, updateScaling, updateScrolledRegion
 
Methods inherited from class java.awt.Canvas
, addNotify, constructComponentName, getAccessibleContext, postsOldMouseEvents
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkGD, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createChildHierarchyEvents, createHierarchyEvents, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getMaximumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initIDs, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, numListening, paintAll, paintHeavyweightComponents, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, readObject, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

prp

private ProtPlot prp
instance of ProtPlot

rd

private ReadPRP rd
instance of ReadPRP of current sample

rdX

private ReadPRP rdX
instance of ReadPRP of ratio sample X

rdY

private ReadPRP rdY
instance of ReadPRP of ratio sample Y

spp

private ShowScatterPlotPopup spp
instance of ShowScatterPlotPopup

util

private UtilPRP util
instance of UtilPRP

prevBestMPID

private int prevBestMPID
previus best mPid of protein selected by mouse motion or clicking

showAssocWebPageFlag

private boolean showAssocWebPageFlag
flag to allow popup web access to associated protein database

maxPoints

private int maxPoints
max # points allocated for drawing arrays
Constructor Detail

DrawProtScatterPlot

DrawProtScatterPlot(ProtPlot prp,
                    ShowScatterPlotPopup spp)
DrawProtScatterPlot() - constructor
Parameters:
prp - is instance of ProtPlot
spp - is instance of ShowScatterPlotPopup
Method Detail

setNewDraw2DprotPlot

public void setNewDraw2DprotPlot()
setNewDraw2DprotPlot() - reset data structures for new sample

updateScatterPlot

public void updateScatterPlot()
updateScatterPlot() - refresh scatterplot data and redraw the canvas

drawScatterPlot

private void drawScatterPlot()
drawScatterPlot() - draw scatterplot (repeatedly) of Filter data This generates the data lists that are passed to the drawing engine.
 If the prp.useTotPRPflag switch is set, then include 
 proteins > UNDER_DALTON_LIMIT.
 If prp.useRatioModeFlag is set, then the set  of proteins is the
 union of proteins from the X and Y sets with the ratio set to 0.0
 if it is not in either set.
See Also:
Draw2DprotPlot.update2Dplot(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, int, double, double, double, double, double, double)

draw_XvsY_scatterPlot

private boolean draw_XvsY_scatterPlot()
draw_XvsY_scatterPlot() - draw (X vs Y) scatterplot (repeatedly) of Filter data. The prp.useRatioModeFlag must be set. This generates the data lists that are passed to the drawing engine.
See Also:
Draw2DprotPlot.update2Dplot(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, int, double, double, double, double, double, double)

draw_MWvsPI_scatterPlot

private void draw_MWvsPI_scatterPlot()
draw_MWvsPI_scatterPlot() - draw (Mw vs pI) scatterplot (repeatedly) of Filter data. This generates the data lists that are passed to the drawing engine.
 If the prp.useTotPRPflag switch is set, then include 
 proteins > UNDER_DALTON_LIMIT.
 If prp.useRatioModeFlag is set, then the set  of proteins is the
 union of proteins from the X and Y sets with the ratio set to 0.0
 if it is not in either set.
See Also:
Draw2DprotPlot.update2Dplot(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, int, double, double, double, double, double, double)

setCurProtein

public void setCurProtein(int mPid,
                          boolean updateCurProtFlag)
setCurProtein() - set current protein spot to mPid if it exists (not -1).
Parameters:
mPid - is protein id of current spot (needed for ratio mode)
updateCurProtFlag - it want to also update current protein data

showProteinOfInterest

public void showProteinOfInterest(int mPid,
                                  int mouseKeyMods,
                                  boolean updateCurProtFlag)
showProteinOfInterest() - show quant&NCBI data if click on a point in plot
Parameters:
mouseKeyMods - is keys pressed when click on mouse
updateCurProtFlag - it want to also update current protein data

mouseHandler

public void mouseHandler(int x,
                         int y,
                         int mouseKeyMods,
                         boolean updateCurProtFlag)
mouseHandler() - interact with current plot if a graphic plot. If get a hit, then display data for the clone. Note: because the plot lives in the ScrollerImageCanvas, there is only ONE plot so can't get into trouble with multiple plots.
Parameters:
x - is mouse coordinate
y - is mouse coordinate
mouseKeyMods - is keys pressed when click on mouse
updateCurProtFlag - it want to also update current protein data