Accession
Class AccReportPopup

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by Accession.AccReportPopup
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

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

Class AccReportPopup 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. 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 Open2Dprot Mozilla and Legal files are available on http://open2dprot.sourceforge.net/

Version:
$Date: 2005/10/20 11:19:13 $ $Revision: 1.16 $
Author:
P. Lemkin (LECB/NCI), G. Thornwall (SAIC), Frederick, MD
See Also:
Open2Dprot Home

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  java.awt.Button accessionEditButton
          button for "Accession" button
 AccACCwizardPopup accGUI
          popup Accession wizard GUI
 java.awt.Choice calibEditChoice
          Choice pull-down menu for selecting calibration method: "Calibrate wedge" "Calibrate spot list" "Calibrate data" "Calibrate by file"
 AccCALIBwizardPopup calibGUI
          popup Calibration wizard GUI
 Table calibTbl
          Calibration table that can be used to sepecify calibration values from a file.
 int calIdx
          index of field "CAL" in calibTbl
 int calUnitAbbrevIdx
          index of field "CAL-ABBREV" in calibTbl
 int calUnitIdx
          index of field "CAL-UNIT" in calibTbl
 boolean cancelFlag
          pressed sog.
private  Accession cs
          instance of the main class
 boolean doneFlag
          pressed sog.
 java.awt.Menu editMenu
          "Edit" pull down Menu list
private  java.awt.Button editOptionsButton
          button for "Set startup options" button
private  int enableCalibDBUG
          Enable calibration while debugging
 java.awt.Menu fileMenu
          "File" pull down Menu list
 int grayIdx
          index of field "GRAY" in calibTbl
 java.awt.Menu helpMenu
          "Help" pull down Menu list
(package private)  java.awt.MenuBar mbar
          menu bar for the frame
 MenuSupport ms
          Menu support functions using Hashtables to tack what is active
 java.lang.String[] newArgv
          new switch options
 java.io.FileWriter oFile
          File to flush and close on "Kill program" if it is not null
 int peakIdx
          index of field "PEAK" in calibTbl
 java.lang.String poTitle
          popup options title
 boolean reanalyzeFlag
          pressed sog.
private  java.lang.String reportFile
           
private  java.awt.Button roiEditButton
          button for "ROI" button
 AccROIwizardPopup roiGUI
          popup ROI Image wizard GUI
 java.awt.Menu rSampleSubmenu
          Dynamic submenu list for "Set Rsample" the value is "SetRsample:"sample-name'"
 java.awt.Menu sampleSubmenu
          Dynamic submenu list for "Open Sample for editing" the value is "OpenSampleForEditing:"sample-name'"
(package private) static long serialVersionUID
          frame id
 boolean setNewDefaultFlag
          pressed sog.
 boolean showStatusFlag
           
 PopupOptions sog
          popup options GUI
private  java.awt.Label statusLineLabel
          Status line label
 boolean stopFlag
           
 boolean[] swOptCBvalue
          The swOptcCBvalue[0:nData-1] is used by the AccReportPopup that in turn may call csPopupOptions.
 java.lang.String[] swOptData
          The swOptData[0:(3*nData)-1] is used by the AccReportPopup that in turn may call PopupOptions.
 java.lang.String[] swOptValue
          The swOptValue[0:nData-1] is used by the AccReportPopup that in turn may call csPopupOptions.
private  java.awt.TextArea textarea
          Text area GUI for main report
private  int textAreaFontSize
          font size
private  java.lang.String textFontFamily
          Text area font family
private  java.lang.String textReport
          copy of text in textArea
(package private)  java.lang.String title
          string for title of frame
 java.awt.Menu viewMenu
          "View" pull down Menu list
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AccReportPopup(Accession cs)
          AccReportPopup() - Constructor.
AccReportPopup(Accession cs, java.lang.String programName, java.lang.String textReport, int nRows, int nCols, java.lang.String title, java.lang.String reportFile, boolean showStatusFlag)
          AccReportPopup() - Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed() - Handle button clicks
private  void addMenuTree(java.awt.Frame f, java.awt.MenuBar mbar)
          addMenuTree() - create pull down menus in menu bar
 boolean addSpotToSpotList(DbSpot r)
          addSpotToSpotList() - add (x,y) spot of size spotDiameter to the spot list for the current sample.
 void appendTextMsg(java.lang.String newText)
          appendTextMsg() - append text in popup window
 void cleanKillApplication(boolean saveFirstFlag)
          cleanKillApplication() - close the file if needed and do a clean kill of the application
 void clearSpotList()
          clearSpotList() - clear the spot list for the current sample.
 void clearText()
          clearText() - clear text in popup window
 void close()
          close() - close this popup and reset flags if needed
 java.lang.String getReportText()
          getReportText() - get the text from the Report popup window
 java.lang.String getSpotListStr(java.lang.String dispName)
          getSpotListStr() - generate a string report (reduced spot features) of a list of spots in the list for the current sample.
 java.lang.String getSpotStr(DbSpot sp, int n)
          getSpotStr() - generate a printable string for a spot (reduced features)
 boolean getStopStatus()
          getStopStatus() - get the stop processing flag set by pressing the "Stop processing" button
 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 popupAccWizard()
          popupAccWizard() - popup the accession wizard GUI.
 boolean popupCalibWizard(int calDataMode)
          popupCalibWizard() - popup the image calibration wizard GUI on the current Sample.
 boolean popupRoiWizard()
          popupRoiWizard() - popup the image viewer on the current Sample.
 void positionReportWindow()
          positionReportWindow() - position report window on the screen
 void quit()
          quit() - closing down the window, get rid of the frame.
 boolean readCalibValuesFromFile(java.lang.String calibFile, boolean verifyAllFieldsFlag)
          readCalibValuesFromFile() - read calibration values from file.
 boolean readSpotListFromAccTable()
          readSpotListFromAccTable() - If spot measurements exist in the accession DB table, then create the dbSample spot list from this data.
 boolean rebuildOpenSampleSubmenus()
          rebuildOpenSampleSubmenus() - rebuild the Set Rsample and Open Sample submenus from entries in the accession database.
 void reCalcSpotListMeasures(boolean useCommonSpotSizeFlag, boolean useSpotBkbrdCorrectionFlag)
          reCalcSpotListMeasures() - Recompute spot list measurements.
 boolean rmvSpotFromSpotList(DbSpot r)
          rmvSpotFromSpotList() - remove (x,y) spot of from the spot list for the current sample.
 void setEnableButtons(boolean flag)
          setEnableButtons() - by the flag
 void setEnableMenus(boolean flag)
          setEnableMenus() - by the flag
 void setOutFileToCloseOnKill(java.io.FileWriter oFile)
          setOutFileToCloseOnKill() - set the show/hide popup status
 void setSaveAsFile(java.lang.String reportFile)
          setSaveAsFile() - set SaveAs file default file name
 void setShow(boolean showStatusFlag)
          setShow() - set the show/hide popup status
private  boolean showPopupOptionWindow(java.lang.String poTitle)
          showPopupOptionWindow() - popup options window using the csPopupOptions GUI.
 void updateReportStatusLine(java.lang.String msg)
          updateReportStatusLine() - clear text in popup window
 void updateText(java.lang.String newText)
          updateText() - update text in popup window
 void updateTitle(java.lang.String title)
          updateTitle() - update title in popup window
 boolean waitForUserClose()
          waitForUserClose)() wait for user to press "Close" application.
 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, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

serialVersionUID

static final long serialVersionUID
frame id

See Also:
Constant Field Values

cs

private Accession cs
instance of the main class


title

java.lang.String title
string for title of frame


mbar

java.awt.MenuBar mbar
menu bar for the frame


fileMenu

public java.awt.Menu fileMenu
"File" pull down Menu list


editMenu

public java.awt.Menu editMenu
"Edit" pull down Menu list


viewMenu

public java.awt.Menu viewMenu
"View" pull down Menu list


helpMenu

public java.awt.Menu helpMenu
"Help" pull down Menu list


rSampleSubmenu

public java.awt.Menu rSampleSubmenu
Dynamic submenu list for "Set Rsample" the value is "SetRsample:"sample-name'"


sampleSubmenu

public java.awt.Menu sampleSubmenu
Dynamic submenu list for "Open Sample for editing" the value is "OpenSampleForEditing:"sample-name'"


ms

public MenuSupport ms
Menu support functions using Hashtables to tack what is active


textReport

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


reportFile

private java.lang.String reportFile

textarea

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


textAreaFontSize

private int textAreaFontSize
font size


textFontFamily

private java.lang.String textFontFamily
Text area font family


editOptionsButton

private java.awt.Button editOptionsButton
button for "Set startup options" button


accessionEditButton

private java.awt.Button accessionEditButton
button for "Accession" button


roiEditButton

private java.awt.Button roiEditButton
button for "ROI" button


calibEditChoice

public java.awt.Choice calibEditChoice
Choice pull-down menu for selecting calibration method: "Calibrate wedge" "Calibrate spot list" "Calibrate data" "Calibrate by file"


statusLineLabel

private java.awt.Label statusLineLabel
Status line label


showStatusFlag

public boolean showStatusFlag

stopFlag

public boolean stopFlag

oFile

public java.io.FileWriter oFile
File to flush and close on "Kill program" if it is not null


sog

public PopupOptions sog
popup options GUI


newArgv

public java.lang.String[] newArgv
new switch options


poTitle

public java.lang.String poTitle
popup options title


swOptData

public java.lang.String[] swOptData
The swOptData[0:(3*nData)-1] is used by the AccReportPopup that in turn may call PopupOptions. It contains triples of (prompt,user, helpStr) data. If the prompt data has a "-", then make a CheckBox, else it is a Label with the prompt data. If it is a CheckBox, use default value false if it starts with "-no" else true. The 2nd arg of the pair is the user data. If the user data is not null, then make a TextField with this user data on the right else make an empty Label.


swOptCBvalue

public boolean[] swOptCBvalue
The swOptcCBvalue[0:nData-1] is used by the AccReportPopup that in turn may call csPopupOptions. It contains boolean values of switch data use for Checkboxes.


swOptValue

public java.lang.String[] swOptValue
The swOptValue[0:nData-1] is used by the AccReportPopup that in turn may call csPopupOptions. It contains String values of associated switch data.


accGUI

public AccACCwizardPopup accGUI
popup Accession wizard GUI


calibGUI

public AccCALIBwizardPopup calibGUI
popup Calibration wizard GUI


roiGUI

public AccROIwizardPopup roiGUI
popup ROI Image wizard GUI


setNewDefaultFlag

public boolean setNewDefaultFlag
pressed sog. "Set new default"


reanalyzeFlag

public boolean reanalyzeFlag
pressed sog. "Reanalyze"


doneFlag

public boolean doneFlag
pressed sog. "Done"


cancelFlag

public boolean cancelFlag
pressed sog. "Cancel"


calibTbl

public Table calibTbl
Calibration table that can be used to sepecify calibration values from a file. It may have 1 or more of the following fields "PEAK", "CAL", "GRAY", "CAL-UNIT", "CAL-ABBREV".


peakIdx

public int peakIdx
index of field "PEAK" in calibTbl


calIdx

public int calIdx
index of field "CAL" in calibTbl


grayIdx

public int grayIdx
index of field "GRAY" in calibTbl


calUnitIdx

public int calUnitIdx
index of field "CAL-UNIT" in calibTbl


calUnitAbbrevIdx

public int calUnitAbbrevIdx
index of field "CAL-ABBREV" in calibTbl


enableCalibDBUG

private int enableCalibDBUG
Enable calibration while debugging

Constructor Detail

AccReportPopup

public AccReportPopup(Accession cs)
AccReportPopup() - Constructor. placeholder instance

Parameters:
cs - is an instance of the main class

AccReportPopup

public AccReportPopup(Accession cs,
                      java.lang.String programName,
                      java.lang.String textReport,
                      int nRows,
                      int nCols,
                      java.lang.String title,
                      java.lang.String reportFile,
                      boolean showStatusFlag)
AccReportPopup() - Constructor. Display Report Window control panel GUI.

Parameters:
cs - is an instance of the main class
programName - name of the program
textReport - is initial text string for buffer.
nRows - is maximum size of window
nCols, - is maximum size of window
title - of the window
String - reportFile is default SAVE AS .txt file.Default "Accession-Report.txt"
showStatusFlag - to show (true), hide(false).
Method Detail

addMenuTree

private void addMenuTree(java.awt.Frame f,
                         java.awt.MenuBar mbar)
addMenuTree() - create pull down menus in menu bar

Parameters:
f - is frame
mbar - is MenuBar

setEnableButtons

public void setEnableButtons(boolean flag)
setEnableButtons() - by the flag

Parameters:
flag - to set enable buttons

setEnableMenus

public void setEnableMenus(boolean flag)
setEnableMenus() - by the flag

Parameters:
flag - to set enable menus

rebuildOpenSampleSubmenus

public boolean rebuildOpenSampleSubmenus()
rebuildOpenSampleSubmenus() - rebuild the Set Rsample and Open Sample submenus from entries in the accession database. Dynamic submenu list for "Set Rsample" the value is "SetRsample:"sample-name'" Dynamic submenu list for "Open Sample for editing" the value is "OpenSampleForEditing:"sample-name'"

Parameters:
true - if suceed

positionReportWindow

public void positionReportWindow()
positionReportWindow() - position report window on the screen


setOutFileToCloseOnKill

public void setOutFileToCloseOnKill(java.io.FileWriter oFile)
setOutFileToCloseOnKill() - set the show/hide popup status

Parameters:
oFile - to flush and close if use Kill command.

setShow

public void setShow(boolean showStatusFlag)
setShow() - set the show/hide popup status

Parameters:
showStatusFlag - to show (true), hide(false).

getStopStatus

public boolean getStopStatus()
getStopStatus() - get the stop processing flag set by pressing the "Stop processing" button

Returns:
true if "Stop" button had been pressed.

updateReportStatusLine

public void updateReportStatusLine(java.lang.String msg)
updateReportStatusLine() - clear text in popup window

Parameters:
msg - to display

clearText

public void clearText()
clearText() - clear text in popup window


getReportText

public java.lang.String getReportText()
getReportText() - get the text from the Report popup window

Returns:
text report

updateText

public void updateText(java.lang.String newText)
updateText() - update text in popup window

Parameters:
newText - is string to copy into text window

appendTextMsg

public void appendTextMsg(java.lang.String newText)
appendTextMsg() - append text in popup window

Parameters:
newText - is string to append into text window

updateTitle

public void updateTitle(java.lang.String title)
updateTitle() - update title in popup window

Parameters:
title - is new title.

setSaveAsFile

public void setSaveAsFile(java.lang.String reportFile)
setSaveAsFile() - set SaveAs file default file name

Parameters:
title - is new title.

addSpotToSpotList

public boolean addSpotToSpotList(DbSpot r)
addSpotToSpotList() - add (x,y) spot of size spotDiameter to the spot list for the current sample.

Parameters:
r - is spot to add
Returns:
true if succeed

rmvSpotFromSpotList

public boolean rmvSpotFromSpotList(DbSpot r)
rmvSpotFromSpotList() - remove (x,y) spot of from the spot list for the current sample.

Parameters:
r - is spot to remove
Returns:
true if succeed

clearSpotList

public void clearSpotList()
clearSpotList() - clear the spot list for the current sample.


getSpotStr

public java.lang.String getSpotStr(DbSpot sp,
                                   int n)
getSpotStr() - generate a printable string for a spot (reduced features)
 Spot #1 (x,y)=(42,20) area=289 totGray=16863 mnGray=58+-4.1 range[47:71]

Parameters:
sp - is spot to convert to string
n - is the spot number
Returns:
string if found, else null

getSpotListStr

public java.lang.String getSpotListStr(java.lang.String dispName)
getSpotListStr() - generate a string report (reduced spot features) of a list of spots in the list for the current sample. E.g.
 Spot list for gel-HM-071
 Spot #0 (x,y)=(12,26) area=289 totGray=9799 mnGray=33+-5.0 range[23:47]
 Spot #1 (x,y)=(42,20) area=289 totGray=16863 mnGray=58+-4.1 range[47:71]
 Spot #2 (x,y)=(75,29) area=289 totGray=24095 mnGray=83+-4.2 range[71:95]

Parameters:
dispName - of spot list
Returns:
string

readCalibValuesFromFile

public boolean readCalibValuesFromFile(java.lang.String calibFile,
                                       boolean verifyAllFieldsFlag)
readCalibValuesFromFile() - read calibration values from file. It may have 1 or more of the following fields "PEAK", "CAL", "GRAY", "CAL-UNIT", "CAL-ABBREV". It must have at least 2 values i.e. data rows.

Parameters:
calibFile - which is a tab-delimited file
verifyAllFieldsFlag - will test if all fields are well formed.
Returns:
true if succeed, then calibTbl is set up. Else CalibTbl is set to null if it is not found.

readSpotListFromAccTable

public boolean readSpotListFromAccTable()
readSpotListFromAccTable() - If spot measurements exist in the accession DB table, then create the dbSample spot list from this data. If it exists, the spot size is in table field "SpotMeasSize" and the list of nGrayPeaks spot centroids is in field "SpotXYSlist" as "x1,y1,s2,x2,y2,s2, ...xn,yn,sn" where (xi,yi) is spot i's centroid and si is its size (square of odd size centered at xi,yi).

Returns:
true if spot list data exists and spot list was created.

reCalcSpotListMeasures

public void reCalcSpotListMeasures(boolean useCommonSpotSizeFlag,
                                   boolean useSpotBkbrdCorrectionFlag)
reCalcSpotListMeasures() - Recompute spot list measurements.

Parameters:
useCommonSpotSizeFlag - to recompute the measurements with the a common spot size cs.spotBoxSize, else use individual spot sizes defined as (sp.merx2-sp.merx1+1);
useSpotBkbrdCorrectionFlag - to recompute the measurements with background correction

close

public void close()
close() - close this popup and reset flags if needed


cleanKillApplication

public void cleanKillApplication(boolean saveFirstFlag)
cleanKillApplication() - close the file if needed and do a clean kill of the application

Parameters:
saveFirstFlag - to save any open first first.

showPopupOptionWindow

private boolean showPopupOptionWindow(java.lang.String poTitle)
showPopupOptionWindow() - popup options window using the csPopupOptions GUI.
 This uses a new instance of the data contained in data created
 by cs.ini.initSwitchOptionsData(). The data is:

  cs.switchOptData[0:(3*nData)-1] is used by the AccReportPopup 
        that in turn may call csPopupOptions. It contains triples of 
        (optionPrompt, guiBuilderSpec, helpStr) data. If the prompt 
        data has a "-", then make a CheckBox (swOptcCBvalue), 
        else it is a Label with the prompt data. 
        If the user data is not null, then make a TextField with 
        this user (swOptValue) data on the right else make an empty 
        Label.
 cs.switchOptCBvalue[0:nData-1] is used by the AccReportPopup 
        that in turn may call csPopupOptions. It contains boolean values
        of switch data use for Checkboxes.
 cs.switchOptValue[0:nData-1] is used by the AccReportPopup 
        that in turn may call csPopupOptions. It contains String 
        text values of associated switch data arguments.

Parameters:
poTitle - for popup options GUI
Returns:
true if open the window.

waitForUserClose

public boolean waitForUserClose()
waitForUserClose)() wait for user to press "Close" application. Close databases if any were still open.

Returns:
true if continue with the application

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 event

quit

public void quit()
quit() - closing down the window, get rid of the frame.

See Also:
close()

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()

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

popupAccWizard

public void popupAccWizard()
popupAccWizard() - popup the accession wizard GUI.


popupCalibWizard

public boolean popupCalibWizard(int calDataMode)
popupCalibWizard() - popup the image calibration wizard GUI on the current Sample.

Parameters:
calDataMode - is one of AccCALIBwizardPopup.CAL_WEDGE - uses (NC ROI, cal list, gray list) AccCALIBwizardPopup.CAL_SPOTLIST - uses spot list + opt. cal list AccCALIBwizardPopup.CAL_DATA_FILE - uses file for cal + gray lists AccCALIBwizardPopup.CAL_MANUAL - no requirements
Returns:
true if succeed in launching the wizard, false if a problem

popupRoiWizard

public boolean popupRoiWizard()
popupRoiWizard() - popup the image viewer on the current Sample.

Returns:
true if succeed, false if any problems.