Class ExprProfilePopup

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--ExprProfilePopup
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.MenuContainer, java.io.Serializable, java.awt.event.WindowListener

class ExprProfilePopup
extends java.awt.Frame
implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.WindowListener

This class creates and displays a popup window containing an ExprProfilePanel. The ExprProfilePanel contains an ExprProfileCanvas. It also services the control buttons.

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. 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. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2002/10/14 20:17:26 $ $Revision: $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home, Serialized Form

Inner classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Inner classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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  boolean addButtonsFlag
          flag: if false, don't add title or Close button
(package private) static int EP_BUTTON_HEIGHT
          hight of expression profile ploit
private  ExprProfilePanel eppl
          panel we put into this popup window
private  MAExplorer mae
          link to global MAExplorer instance
private  java.awt.Button plotStyleButton
          plot style (line, circle, curve) button
private  int preferredHeight
          prefered height canvas size, 0 to use defaults
private  int preferredWidth
          prefered width canvas size, 0 to use defaults
private  java.awt.Button saveAsGIF
          Save display as GIF file
private  java.awt.Checkbox showErrBarsCheckBox
          checkbox to show error bars
private  java.awt.Button zoomBarsButton
          zoom magnification button
 
Fields inherited from class java.awt.Frame
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis
 
Fields inherited from class java.awt.Window
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, showWithParent, warningString, windowListener, windowSerializedDataVersion
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, 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) ExprProfilePopup(MAExplorer mae, int mid, java.lang.String title, java.awt.Font font, int preferredWidth, int preferredHeight, boolean drawLabelsFlag)
          ExprProfilePopup() - Constructor to popup expression profile window.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed() - event handler for button clicks
 java.awt.Dimension getMinimumSize()
          getMinimumSize() - get the minimum preferred window size and add on room for the buttons at the bottom.
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - get the preferred size
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 void paint(java.awt.Graphics g)
          paint() - repaint buttons and canvas
(package private)  void quit()
          quit() - dispose of this object
(package private)  void updateData(int mid, java.lang.String title, boolean drawLabelsFlag)
          updateData() - update expression profile with new gene data.
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
          windowClosing() - closing down the window, get rid of the frame.
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class java.awt.Frame
, addNotify, addToFrameList, constructComponentName, finalize, getAccessibleContext, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, initIDs, isResizable, paramString, postProcessKeyEvent, readObject, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle, writeObject
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, processWindowEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMouseEventTarget, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree
 
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, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

mae

private MAExplorer mae
link to global MAExplorer instance

EP_BUTTON_HEIGHT

static final int EP_BUTTON_HEIGHT
hight of expression profile ploit

eppl

private ExprProfilePanel eppl
panel we put into this popup window

preferredHeight

private int preferredHeight
prefered height canvas size, 0 to use defaults

preferredWidth

private int preferredWidth
prefered width canvas size, 0 to use defaults

showErrBarsCheckBox

private java.awt.Checkbox showErrBarsCheckBox
checkbox to show error bars

saveAsGIF

private java.awt.Button saveAsGIF
Save display as GIF file

plotStyleButton

private java.awt.Button plotStyleButton
plot style (line, circle, curve) button

zoomBarsButton

private java.awt.Button zoomBarsButton
zoom magnification button

addButtonsFlag

private boolean addButtonsFlag
flag: if false, don't add title or Close button
Constructor Detail

ExprProfilePopup

ExprProfilePopup(MAExplorer mae,
                 int mid,
                 java.lang.String title,
                 java.awt.Font font,
                 int preferredWidth,
                 int preferredHeight,
                 boolean drawLabelsFlag)
ExprProfilePopup() - Constructor to popup expression profile window.
Parameters:
mae - is the MAExplorer instance
mid - is the Master Gene Index if not -1
title - is the title for canvas label
font - is the overide labels font if not null
preferredWidth - is the canvas size, 0 to use defaults
preferredHeight, -  
drawLabelsFlag - if true
See Also:
EventMenu.promptFileName(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, boolean), ExprProfileCanvas.drawGifFile(java.lang.String), ExprProfilePanel, SampleSets.showHP_E_assignmentsPopup(), Util.nextZoomMag(int, int), Util.rmvFinalSubDirectory(java.lang.String, java.lang.String, boolean), Util.saveCmdHistory(java.lang.String), getMinimumSize()
Method Detail

getPreferredSize

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

getMinimumSize

public java.awt.Dimension getMinimumSize()
getMinimumSize() - get the minimum preferred window size and add on room for the buttons at the bottom.
Overrides:
getMinimumSize in class java.awt.Container
Returns:
minimum window size

updateData

void updateData(int mid,
                java.lang.String title,
                boolean drawLabelsFlag)
updateData() - update expression profile with new gene data. This will cause it to repaint as well.
Parameters:
mid - is the Master Gene Index if not -1
title - is the title for canvas label
drawLabelsFlag - if true
See Also:
ExprProfilePanel.updateData(int, java.lang.String, boolean)

paint

public void paint(java.awt.Graphics g)
paint() - repaint buttons and canvas
Overrides:
paint in class java.awt.Container
Parameters:
g - is graphics context
See Also:
Component.repaint()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - event handler for button clicks
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - is button click event
See Also:
EventMenu.promptFileName(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, boolean), ExprProfileCanvas.drawGifFile(java.lang.String), SampleSets.showHP_E_assignmentsPopup(), Util.nextZoomMag(int, int), Util.rmvFinalSubDirectory(java.lang.String, java.lang.String, boolean), Util.saveCmdHistory(java.lang.String), Component.repaint()

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

quit

void quit()
quit() - dispose of this object

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
windowClosing() - closing down the window, get rid of the frame.
Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - is window closing event
See Also:
quit()

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener