Class ExprProfileScrollPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--ExprProfileScrollPane
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.AdjustmentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

class ExprProfileScrollPane
extends java.awt.Panel
implements java.awt.event.AdjustmentListener

This creates and displays a scrollable pane list of individual expression profile graphic plots. It will be shown as a Grid of ExprProfilePanel's plots in popup window. Selecting a particular ExprProfilePanel will set the current gene and call the PopupRegistry to update other windows.

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 prpxplorer 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://prpxplorer.sourceforge.org/, ExprProfilePanel, Serialized Form


Inner classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
private  float bestIntens
          intensity if mouse event
private  int bestMid
          gene clone ID if mouse event
private  int bestProtein
          gene if mouse event
private  int bestSample
          Sample if mouse event
private  java.lang.String[] cTitle
          [0:nProteins-1] "#MasterProtein_ID"
private  ExprProfile[] epOverlayList
          list of overlay expr.
private  java.awt.Panel epPanel
          holds grid of ExprProfilePanel's
private  ExprProfilePanel[] epplList
          Expr Profs [nGridElements]
private  int[] mEPprotList
          List of mPids being used for EP panel
private static int MIN_COLS
          minimum # of columns for the grid
private static int MIN_ROWS
          minimum # of rows for the grid
private  int mNbr
          .mList[mNbr] in database to display
(package private)  int N_EP_PROTEINS
           
private  int nCols
          # of columns in the Grid
private  int nEPproteins
          # genes to display in popup EP plot
private  int nGridElements
          i.e.
private  int nHP_E
          # of HPS in an Expr Profile
private  int nPoints
          nProteins*nHP_E
private  int nProteins
          # genes in exprProfileCL
private  int nRows
          # of rows in the Grid
(package private)  int plotStyleMode
          plot style mode: 0=line, 1=circle, 2=curve
private  ProtPlot prp
          link to global ProtPlot instance
private  int sbSize
          width of scroll bar control
private  ShowExprProfilesPopup sepp
          Parent window
private  java.lang.String title
          title for entire EP.
private  UtilPRP util
           
private  java.awt.Scrollbar vs
          vertical scroll bar
private  float[] xList
          [nProteins*nHP_E] EP overlay coords
private  float[] yList
          [nProteins*nHP_E] EP overlay coords
(package private)  int zoomBarsMag
          1X, 2X, 5X, 10X pass through to EP panel
 
Fields inherited from class java.awt.Panel
base, nameCounter, serialVersionUID
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads
 
Fields inherited from class java.awt.Component
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, 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) ExprProfileScrollPane(ProtPlot prp, ShowExprProfilesPopup sepp, java.lang.String title, int[] mEPprotList, int nProteins, int preferredPanelWidth)
          ExprProfileScrollPane() - Create a popup grid of ExprProfile plots.
 
Method Summary
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          adjustmentValueChanged() - handle scroll events and cause repaint.
 void paint(java.awt.Graphics g)
          paint() - redraw plots near selected Row.
private  void setCurProtein(int mPid)
          setCurProtein() - set current protein if mPid is not -1
(package private)  void setEPcanvasDrawingOptions(int zoomBarsMag, int plotStyleMode)
          setEPcanvasDrawingOptions() - set err-bar & zoom status and then repaint.
private  void setScrollBarPos(int cNumber)
          setScrollBarPos() - set the scroll barPosition for this panel.
(package private)  void updateCurProtein(int mPid)
          updateCurProtein()- update the current protein in the EP plot list.
(package private)  void updateData(int[] mEPprotList, int nProteins, java.lang.String title)
          updateData() - update expression profile scroller with new protein data.
private  void updateEPtitles()
          updateEPtitles() - generate array of titles for drawing in expression profile plots
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, setLayout, transferFocus, update, validate, validateTree, writeObject
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

prp

private ProtPlot prp
link to global ProtPlot instance

util

private UtilPRP util

MIN_ROWS

private static final int MIN_ROWS
minimum # of rows for the grid

MIN_COLS

private static final int MIN_COLS
minimum # of columns for the grid

sepp

private ShowExprProfilesPopup sepp
Parent window

title

private java.lang.String title
title for entire EP. panel

mEPprotList

private int[] mEPprotList
List of mPids being used for EP panel

nProteins

private int nProteins
# genes in exprProfileCL

N_EP_PROTEINS

final int N_EP_PROTEINS

sbSize

private int sbSize
width of scroll bar control

nGridElements

private int nGridElements
i.e. nRows*nCols

nRows

private int nRows
# of rows in the Grid

nCols

private int nCols
# of columns in the Grid

mNbr

private int mNbr
.mList[mNbr] in database to display

nEPproteins

private int nEPproteins
# genes to display in popup EP plot

epOverlayList

private ExprProfile[] epOverlayList
list of overlay expr. profiles

epplList

private ExprProfilePanel[] epplList
Expr Profs [nGridElements]

cTitle

private java.lang.String[] cTitle
[0:nProteins-1] "#MasterProtein_ID"

nHP_E

private int nHP_E
# of HPS in an Expr Profile

plotStyleMode

int plotStyleMode
plot style mode: 0=line, 1=circle, 2=curve

zoomBarsMag

int zoomBarsMag
1X, 2X, 5X, 10X pass through to EP panel

epPanel

private java.awt.Panel epPanel
holds grid of ExprProfilePanel's

vs

private java.awt.Scrollbar vs
vertical scroll bar

xList

private float[] xList
[nProteins*nHP_E] EP overlay coords

yList

private float[] yList
[nProteins*nHP_E] EP overlay coords

nPoints

private int nPoints
nProteins*nHP_E

bestProtein

private int bestProtein
gene if mouse event

bestSample

private int bestSample
Sample if mouse event

bestMid

private int bestMid
gene clone ID if mouse event

bestIntens

private float bestIntens
intensity if mouse event
Constructor Detail

ExprProfileScrollPane

ExprProfileScrollPane(ProtPlot prp,
                      ShowExprProfilesPopup sepp,
                      java.lang.String title,
                      int[] mEPprotList,
                      int nProteins,
                      int preferredPanelWidth)
ExprProfileScrollPane() - Create a popup grid of ExprProfile plots. Display proteins in the specified mPidList[]
Parameters:
prp - is ProtPlot instance
sepp - is the ShowExprProfilesPopup Parent
title - of window
mEPprotList - is an array of mPids to use
nProteins - is the size of mPidList[0:nProteins-1] to
preferredPanelWidth - is the set by parent Frame if not 0
See Also:
ExprProfilePanel, Util#showMsg, updateData(int[], int, java.lang.String)
Method Detail

updateEPtitles

private void updateEPtitles()
updateEPtitles() - generate array of titles for drawing in expression profile plots

updateData

void updateData(int[] mEPprotList,
                int nProteins,
                java.lang.String title)
updateData() - update expression profile scroller with new protein data. This will cause it to repaint as well.
Parameters:
mEPprotList - is the new list of mPid proteins to scroll
nProteins - is the number of proteins to scroll
title - is the title for the canvas label
See Also:
updateEPtitles(), Component.repaint()

setEPcanvasDrawingOptions

void setEPcanvasDrawingOptions(int zoomBarsMag,
                               int plotStyleMode)
setEPcanvasDrawingOptions() - set err-bar & zoom status and then repaint.
Parameters:
zoomBarsMag - magnification factor (1,2,5,10,20) for expression data
plotStyleMode - (line, circle, curve)
See Also:
Component.repaint()

paint

public void paint(java.awt.Graphics g)
paint() - redraw plots near selected Row.
Overrides:
paint in class java.awt.Container
Parameters:
g - is graphics context
See Also:
ExprProfilePanel#setPlotEPmeansData, ExprProfilePanel.updateData(int, java.lang.String, boolean)

updateCurProtein

void updateCurProtein(int mPid)
updateCurProtein()- update the current protein in the EP plot list.
Parameters:
mPid - is the new Master Protein ID of the current protein
See Also:
Component.repaint()

setScrollBarPos

private void setScrollBarPos(int cNumber)
setScrollBarPos() - set the scroll barPosition for this panel. The arguments are in the range of allowable values otherwise it is a no-op.
Parameters:
cNumber - is data range to be mapped to scroller range

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged() - handle scroll events and cause repaint.
Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener
Parameters:
e - is scroller adjustment event
See Also:
Component.repaint()

setCurProtein

private void setCurProtein(int mPid)
setCurProtein() - set current protein if mPid is not -1
Parameters:
mPid - is the new Master Protein ID of the current protein