Class ExprProfilePanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--ExprProfilePanel
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

class ExprProfilePanel
extends java.awt.Panel
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

This class creates and displays a window containing an ExprProfileCanvas. The expression profile is drawin in the ExprProfileCanvas. It also contains mouse handlers for clicking on points in the canvas.

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/, 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
(package private)  ExprProfileCanvas epc
          expression profile canvas we put into panel
(package private)  ProtPlot prp
          link to global prpxplorer instance
 
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) ExprProfilePanel(ProtPlot prp, int mPid, java.lang.String title, java.awt.Font lblFont, int preferredWidth, int preferredHeight, boolean drawLabelsFlag)
          ExprProfilePanel() - Constructor to display expression profile in canvas.
 
Method Summary
 java.awt.Dimension getMinimumSize()
          getMinimumSize() - get the minimumpreferred size
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - get the preferred size
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
          mouseDragged() - just report (Sample, expr) of nearest sample near where mouse is
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
          mousePressed() - handle mouse Pressed events
 void mouseReleased(java.awt.event.MouseEvent e)
          mouseReleased() - handle mouse Released events
 void paint(java.awt.Graphics g)
          paint() - draw the expression profile plot only repaint if a legal protein mPid.
(package private)  boolean updateData(int mPid, java.lang.String title, boolean drawLabelsFlag)
          updateData() - update expression profile with new protein data if a legal protein mPid.
 
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, getMouseEventTarget, 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

ProtPlot prp
link to global prpxplorer instance

epc

ExprProfileCanvas epc
expression profile canvas we put into panel
Constructor Detail

ExprProfilePanel

ExprProfilePanel(ProtPlot prp,
                 int mPid,
                 java.lang.String title,
                 java.awt.Font lblFont,
                 int preferredWidth,
                 int preferredHeight,
                 boolean drawLabelsFlag)
ExprProfilePanel() - Constructor to display expression profile in canvas.
 If mPid >=0, then display protein info
 If mPid==-1, then display "request to click on a protein"
 If mPid==-2, then don't draw anything.
Parameters:
prp - is the ProtPlot instance
mPid - is the Master Protein Index if not -1
title - is the title for canvas label
lblFont - is the overide labels font if not null
preferredWidth - is the canvas size, 0 to use defaults
preferredHeight -  
drawLabelsFlag - if true
See Also:
ExprProfileCanvas
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
getPreferredSize() - get the preferred size
Overrides:
getPreferredSize in class java.awt.Container

getMinimumSize

public java.awt.Dimension getMinimumSize()
getMinimumSize() - get the minimumpreferred size
Overrides:
getMinimumSize in class java.awt.Container

updateData

boolean updateData(int mPid,
                   java.lang.String title,
                   boolean drawLabelsFlag)
updateData() - update expression profile with new protein data if a legal protein mPid.
Parameters:
mPid - is the Master Protein Index if not -1
title - is the title for canvas label
drawLabelsFlag - if true
See Also:
ExprProfileCanvas.updateData(int, java.lang.String, boolean)

paint

public void paint(java.awt.Graphics g)
paint() - draw the expression profile plot only repaint if a legal protein mPid.
Overrides:
paint in class java.awt.Container
Parameters:
g - is graphics context
See Also:
Component.repaint()

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
mousePressed() - handle mouse Pressed events
Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
is - mouse pressed event
See Also:
Component.repaint()

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged() - just report (Sample, expr) of nearest sample near where mouse is
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
is - mouse dragged event
See Also:
Component.repaint()

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased() - handle mouse Released events
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
is - mouse released event
See Also:
Component.repaint()

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener