Class ShowStringPopup

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--ShowStringPopup
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 ShowStringPopup
extends java.awt.Frame
implements java.awt.event.ItemListener, java.awt.event.ActionListener, java.awt.event.WindowListener

The ShowStringPopup class creates and displays scrollable string text area in a popup window. Various control buttons are also provided at the bottom of the window that are dependent on the type of text area being displayed.

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.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
(package private)  boolean alertOK
          Flag: set true if popupName is "ALERT"
private  java.lang.String defTxtFile
           
private  int fntSize
          font size
private  int mode
          mode of operation used in creating this window.
private  int nCols
          # of character cols to show
private  int nRows
          # of character rows to show
private  int optReportMode
          Optional Report mode if > 0
private  ProtPlot prp
          link to global ProtPlot instance
static int RPT_MODE_SIMILAR_CLUSTER
          Similar Cluster report with "Cluster Threshold" slider, and "Expr Profile" button
static int RPT_MODE_SIMPLE
          Simple report with "Save As" and "Close" buttons
 java.lang.String rptType
          Type of report: "Help", "FilterRpt", "EPFilterRpt", "XYEPmissingRpt", "EPsamplesRpt", "StateRpt", "SampleAssignRpt", "SampleNbrsRpt", "SimClusterRpt",
private  java.awt.Button saveAsButton
          "SaveAs" .txt button
(package private)  java.lang.String savedMsg
          message after Saved Txt into file
private  ShowScatterPlotPopup spp
          link to instance
private  java.awt.TextArea textarea
          Text area GUI for main report
private  java.lang.String textReport
          copy of text in textArea
(package private)  java.lang.String title
          string for title of frame
 java.awt.Checkbox viewClusterBoxesCheckBox
          toggle black boxes on clustered proteins in scatterplot
 
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, 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) ShowStringPopup(ProtPlot prp, java.lang.String rptType, java.lang.String textReport, int nRows, int nCols, java.lang.String title, java.lang.String defTxtFile, int optReportMode)
          ShowStringPopup() - Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed() - Handle button clicks
(package private)  void close(boolean keepFlags)
          close() - close this popup and reset flags if needed
 void itemStateChanged(java.awt.event.ItemEvent e)
          itemStateChanged() - handle item state changed events NOTE: need to implement radio groups here since AWT only implements radio groups for Checkboxes, and CheckboxMenuItems.
 void quit()
          quit() - closing down the window, get rid of the frame.
(package private)  void updateText(java.lang.String textReport, java.lang.String title)
          updateText() - update text in popup window
 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, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, 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

RPT_MODE_SIMPLE

public static final int RPT_MODE_SIMPLE
Simple report with "Save As" and "Close" buttons

RPT_MODE_SIMILAR_CLUSTER

public static final int RPT_MODE_SIMILAR_CLUSTER
Similar Cluster report with "Cluster Threshold" slider, and "Expr Profile" button

prp

private ProtPlot prp
link to global ProtPlot instance

spp

private ShowScatterPlotPopup spp
link to instance

saveAsButton

private java.awt.Button saveAsButton
"SaveAs" .txt button

rptType

public java.lang.String rptType
Type of report: "Help", "FilterRpt", "EPFilterRpt", "XYEPmissingRpt", "EPsamplesRpt", "StateRpt", "SampleAssignRpt", "SampleNbrsRpt", "SimClusterRpt",

title

java.lang.String title
string for title of frame

savedMsg

java.lang.String savedMsg
message after Saved Txt into file

textReport

private java.lang.String textReport
copy of text in textArea

defTxtFile

private java.lang.String defTxtFile

textarea

private java.awt.TextArea textarea
Text area GUI for main report

viewClusterBoxesCheckBox

public java.awt.Checkbox viewClusterBoxesCheckBox
toggle black boxes on clustered proteins in scatterplot

optReportMode

private int optReportMode
Optional Report mode if > 0

fntSize

private int fntSize
font size

nRows

private int nRows
# of character rows to show

nCols

private int nCols
# of character cols to show

alertOK

boolean alertOK
Flag: set true if popupName is "ALERT"

mode

private int mode
mode of operation used in creating this window. Used in how we close the window
Constructor Detail

ShowStringPopup

ShowStringPopup(ProtPlot prp,
                java.lang.String rptType,
                java.lang.String textReport,
                int nRows,
                int nCols,
                java.lang.String title,
                java.lang.String defTxtFile,
                int optReportMode)
ShowStringPopup() - Constructor. Display String in textArea
Parameters:
prp - instance of ProtPlot
rptType - is the type of report: "EPsamplesRpt", etc
inputStr - is initial text string for buffer
nRows - is maximum size of window
nCols, - is maximum size of window
title - of the window
String - defTxtFile is default SAVE AS .txt file
optReportMode - is 0 for simple window and RPT_MODE_xxx otherwise to add additional buttons and handlers.
Method Detail

updateText

void updateText(java.lang.String textReport,
                java.lang.String title)
updateText() - update text in popup window
Parameters:
textReport - is string to copy into text window

close

void close(boolean keepFlags)
close() - close this popup and reset flags if needed
Parameters:
keepFlags - will prevent flags from being reset
See Also:
ProtPlot#repaint, PopupRegistry#removePopupByKey

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - Handle button clicks
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - is action evet

quit

public void quit()
quit() - closing down the window, get rid of the frame.
See Also:
close(boolean)

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged() - handle item state changed events NOTE: need to implement radio groups here since AWT only implements radio groups for Checkboxes, and CheckboxMenuItems.
Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - is ItemEvent

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:
close(boolean)

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