|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
Accession.AccReportPopup
class AccReportPopup
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/
| 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 |
|---|
static final long serialVersionUID
private Accession cs
java.lang.String title
java.awt.MenuBar mbar
public java.awt.Menu fileMenu
public java.awt.Menu editMenu
public java.awt.Menu viewMenu
public java.awt.Menu helpMenu
public java.awt.Menu rSampleSubmenu
public java.awt.Menu sampleSubmenu
public MenuSupport ms
private java.lang.String textReport
private java.lang.String reportFile
private java.awt.TextArea textarea
private int textAreaFontSize
private java.lang.String textFontFamily
private java.awt.Button editOptionsButton
private java.awt.Button accessionEditButton
private java.awt.Button roiEditButton
public java.awt.Choice calibEditChoice
private java.awt.Label statusLineLabel
public boolean showStatusFlag
public boolean stopFlag
public java.io.FileWriter oFile
public PopupOptions sog
public java.lang.String[] newArgv
public java.lang.String poTitle
public java.lang.String[] swOptData
public boolean[] swOptCBvalue
public java.lang.String[] swOptValue
public AccACCwizardPopup accGUI
public AccCALIBwizardPopup calibGUI
public AccROIwizardPopup roiGUI
public boolean setNewDefaultFlag
public boolean reanalyzeFlag
public boolean doneFlag
public boolean cancelFlag
public Table calibTbl
public int peakIdx
public int calIdx
public int grayIdx
public int calUnitIdx
public int calUnitAbbrevIdx
private int enableCalibDBUG
| Constructor Detail |
|---|
public AccReportPopup(Accession cs)
cs - is an instance of the main class
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)
cs - is an instance of the main classprogramName - name of the programtextReport - is initial text string for buffer.nRows - is maximum size of windownCols, - is maximum size of windowtitle - of the windowString - reportFile is default SAVE AS .txt file.Default
"Accession-Report.txt"showStatusFlag - to show (true), hide(false).| Method Detail |
|---|
private void addMenuTree(java.awt.Frame f,
java.awt.MenuBar mbar)
f - is framembar - is MenuBarpublic void setEnableButtons(boolean flag)
flag - to set enable buttonspublic void setEnableMenus(boolean flag)
flag - to set enable menuspublic boolean rebuildOpenSampleSubmenus()
true - if suceedpublic void positionReportWindow()
public void setOutFileToCloseOnKill(java.io.FileWriter oFile)
oFile - to flush and close if use Kill command.public void setShow(boolean showStatusFlag)
showStatusFlag - to show (true), hide(false).public boolean getStopStatus()
public void updateReportStatusLine(java.lang.String msg)
msg - to displaypublic void clearText()
public java.lang.String getReportText()
public void updateText(java.lang.String newText)
newText - is string to copy into text windowpublic void appendTextMsg(java.lang.String newText)
newText - is string to append into text windowpublic void updateTitle(java.lang.String title)
title - is new title.public void setSaveAsFile(java.lang.String reportFile)
title - is new title.public boolean addSpotToSpotList(DbSpot r)
r - is spot to add
public boolean rmvSpotFromSpotList(DbSpot r)
r - is spot to remove
public void clearSpotList()
public java.lang.String getSpotStr(DbSpot sp,
int n)
Spot #1 (x,y)=(42,20) area=289 totGray=16863 mnGray=58+-4.1 range[47:71]
sp - is spot to convert to stringn - is the spot number
public java.lang.String getSpotListStr(java.lang.String dispName)
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]
dispName - of spot list
public boolean readCalibValuesFromFile(java.lang.String calibFile,
boolean verifyAllFieldsFlag)
calibFile - which is a tab-delimited fileverifyAllFieldsFlag - will test if all fields are well formed.
public boolean readSpotListFromAccTable()
public void reCalcSpotListMeasures(boolean useCommonSpotSizeFlag,
boolean useSpotBkbrdCorrectionFlag)
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 correctionpublic void close()
public void cleanKillApplication(boolean saveFirstFlag)
saveFirstFlag - to save any open first first.private boolean showPopupOptionWindow(java.lang.String poTitle)
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.
poTitle - for popup options GUI
public boolean waitForUserClose()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - is action eventpublic void quit()
close()public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenere - is ItemEventpublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenere - is window closing eventclose()public void windowOpened(java.awt.event.WindowEvent e)
windowOpened in interface java.awt.event.WindowListenerpublic void windowActivated(java.awt.event.WindowEvent e)
windowActivated in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified in interface java.awt.event.WindowListenerpublic void popupAccWizard()
public boolean popupCalibWizard(int calDataMode)
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
public boolean popupRoiWizard()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||