org.fhcrc.cpl.viewer.quant.gui
Class QuantitationReviewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by org.fhcrc.cpl.viewer.quant.gui.QuantitationReviewer
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class QuantitationReviewer
extends javax.swing.JDialog

This is the main GUI screen for Qurate. It uses SwiXML for the menu and for the broad outlines, but most of it is done right here.

See Also:
Serialized Form

Nested Class Summary
protected  class QuantitationReviewer.CreateChartsAction
          "Create Charts" in the File menu.
 class QuantitationReviewer.EventSummaryTableListSelectionHandler
          display the properties for the selected event, if only one's selected
protected  class QuantitationReviewer.ExitAction
          Action to quit
protected  class QuantitationReviewer.FilterPepXMLAction
          Action to remove bad events and IDs from the file they came from.
static class QuantitationReviewer.HelpAction
          Display help from static help file
protected  class QuantitationReviewer.LeftPanelResizeListener
          Manually manage the size of the properties table
protected  class QuantitationReviewer.OpenFileAction
          Open a tsv file
protected  class QuantitationReviewer.ProteinSelectedActionListener
           
protected  class QuantitationReviewer.ProteinSummaryAction
           
protected  class QuantitationReviewer.RightPanelResizeListener
          Manually manage the size of the multi-chart panel
protected  class QuantitationReviewer.SaveAction
          Save changes back to the file we opened TODO: allow saving to different file?
protected  class QuantitationReviewer.SummaryChartsAction
          Display chart dialog
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected static org.apache.log4j.Logger _log
           
 javax.swing.Action aboutAction
           
protected  javax.swing.JTextField assessmentDescTextField
           
 javax.swing.JPanel assessmentPanel
           
protected  javax.swing.JTextField assessmentTypeTextField
           
protected  int chartPaneHeight
           
protected  javax.swing.JTextField commentTextField
           
 javax.swing.JPanel contentPanel
           
 javax.swing.Action createChartsAction
           
 javax.swing.JPanel curationPanel
           
protected  int displayedEventIndex
           
protected  java.awt.Frame eventSummaryFrame
           
protected  QuantEventsSummaryTable eventSummaryTable
           
 javax.swing.Action exitAction
           
 javax.swing.Action filterPepXMLAction
           
protected  javax.swing.JButton filterPepXMLButton
           
protected  int fullHeight
           
protected  int fullWidth
           
 javax.swing.Action helpAction
           
protected  javax.swing.ButtonGroup idCurationButtonGroup
           
protected  int imagePanelWidth
           
 javax.swing.JPanel leftPanel
           
protected  int leftPanelWidth
           
 javax.swing.JLabel messageLabel
           
protected  TabbedMultiChartDisplayPanel multiChartDisplay
           
 javax.swing.JPanel navigationPanel
           
protected  javax.swing.JRadioButton onePeakRatioRadioButton
           
 javax.swing.Action openFileAction
           
protected  int propertiesHeight
           
protected  javax.swing.JScrollPane propertiesScrollPane
           
protected  QuantEvent.QuantEventPropertiesTable propertiesTable
           
protected  int propertiesWidth
           
 javax.swing.Action proteinSummaryAction
           
protected  ProteinSummarySelectorFrame proteinSummarySelector
           
protected  javax.swing.ButtonGroup quantCurationButtonGroup
           
protected  java.io.File quantFile
           
protected  ProteinQuantSummaryFrame quantSummaryFrame
           
 javax.swing.JPanel rightPanel
           
protected  int rightPanelWidth
           
 javax.swing.Action saveAction
           
protected  javax.swing.JButton saveChangesButton
           
 ProteinQuantChartsCLM settingsCLM
           
protected  SplashFrame splashFrame
           
protected  java.net.URL splashImageURL
           
 javax.swing.JSplitPane splitPane
           
 javax.swing.JPanel statusPanel
           
 javax.swing.Action summaryChartsAction
           
protected  javax.swing.JFrame summaryChartsFrame
           
protected  TabbedMultiChartDisplayPanel summaryChartsPanel
           
protected  PanelWithPeakChart theoreticalPeaksChart
           
 javax.swing.JPanel theoreticalPeaksPanel
           
protected  int theoreticalPeaksPanelHeight
           
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
QuantitationReviewer()
          No-arg constructor doesn't pop up a file chooser, but it does show splash screen
QuantitationReviewer(boolean showSplash, boolean showFileOpen)
           
QuantitationReviewer(java.io.File quantFile)
           
QuantitationReviewer(java.util.List<QuantEvent> quantEvents)
           
 
Method Summary
protected  void buildSummaryCharts()
          Build summary charts for all displayed events.
 void buttonBack_actionPerformed(java.awt.event.ActionEvent event)
           
 void buttonCuration_actionPerformed(java.awt.event.ActionEvent event)
           
 void buttonForward_actionPerformed(java.awt.event.ActionEvent event)
           
 void buttonIDCuration_actionPerformed(java.awt.event.ActionEvent event)
           
 void buttonShowEventSummary_actionPerformed(java.awt.event.ActionEvent event)
           
protected  void displayCurrentQuantEvent(boolean shouldUpdateTable)
          Take care of the charts and the properties panel
 void displayQuantEvents(java.util.List<QuantEvent> quantEvents)
           
 void displayQuantFile(java.io.File quantFile)
           
 void dispose()
          Clean up the windows that might be open
protected  void errorMessage(java.lang.String message, java.lang.Throwable t)
          Display a dialog box with info message and stack trace
static void filterBadEventsFromFile(java.util.List<QuantEvent> quantEvents, java.io.File pepXmlFile, java.io.File outFile)
          Remove all the events the user has designated as 'bad' from the pepXML file they came from TODO: report how many events weren't found
 int getDisplayedEventIndex()
           
 java.io.File getQuantFile()
           
static void infoMessage(java.lang.String message)
          Display a dialog box with info message
protected  void initGUI()
          Initialize all GUI components and display the UI
 void setDisplayedEventIndex(int displayedEventIndex)
           
 void setMessage(java.lang.String message)
          Set status message.
 void setQuantFile(java.io.File quantFile)
           
 void showProteinQuantSummaryFrame(java.util.List<ProtXmlReader.Protein> proteins)
           
 void showProteinQuantSummaryFrame(java.util.List<ProtXmlReader.Protein> proteins, java.util.Map<java.lang.String,java.util.List<java.lang.String>> proteinGenesMap)
           
protected  void showSplashScreen()
          Displays the splash screen.
protected  void showTheoreticalPeaks()
          Calculate and show theoretical isotopic distribution peaks, with light encroaching on heavy if necessary
protected  void updateUIAfterChange(boolean shouldUpdateTable)
          Update lots of UI components after a change of quantitation event
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

quantFile

protected java.io.File quantFile

multiChartDisplay

protected TabbedMultiChartDisplayPanel multiChartDisplay

displayedEventIndex

protected int displayedEventIndex

contentPanel

public javax.swing.JPanel contentPanel

splitPane

public javax.swing.JSplitPane splitPane

leftPanel

public javax.swing.JPanel leftPanel

rightPanel

public javax.swing.JPanel rightPanel

navigationPanel

public javax.swing.JPanel navigationPanel

settingsCLM

public ProteinQuantChartsCLM settingsCLM

splashFrame

protected SplashFrame splashFrame

splashImageURL

protected final java.net.URL splashImageURL

curationPanel

public javax.swing.JPanel curationPanel

quantCurationButtonGroup

protected javax.swing.ButtonGroup quantCurationButtonGroup

onePeakRatioRadioButton

protected javax.swing.JRadioButton onePeakRatioRadioButton

idCurationButtonGroup

protected javax.swing.ButtonGroup idCurationButtonGroup

saveChangesButton

protected javax.swing.JButton saveChangesButton

filterPepXMLButton

protected javax.swing.JButton filterPepXMLButton

commentTextField

protected javax.swing.JTextField commentTextField

assessmentPanel

public javax.swing.JPanel assessmentPanel

assessmentTypeTextField

protected javax.swing.JTextField assessmentTypeTextField

assessmentDescTextField

protected javax.swing.JTextField assessmentDescTextField

quantSummaryFrame

protected ProteinQuantSummaryFrame quantSummaryFrame

theoreticalPeaksPanel

public javax.swing.JPanel theoreticalPeaksPanel

theoreticalPeaksChart

protected PanelWithPeakChart theoreticalPeaksChart

proteinSummarySelector

protected ProteinSummarySelectorFrame proteinSummarySelector

helpAction

public javax.swing.Action helpAction

exitAction

public javax.swing.Action exitAction

openFileAction

public javax.swing.Action openFileAction

createChartsAction

public javax.swing.Action createChartsAction

saveAction

public javax.swing.Action saveAction

filterPepXMLAction

public javax.swing.Action filterPepXMLAction

proteinSummaryAction

public javax.swing.Action proteinSummaryAction

aboutAction

public javax.swing.Action aboutAction

summaryChartsAction

public javax.swing.Action summaryChartsAction

eventSummaryTable

protected QuantEventsSummaryTable eventSummaryTable

eventSummaryFrame

protected java.awt.Frame eventSummaryFrame

propertiesTable

protected QuantEvent.QuantEventPropertiesTable propertiesTable

propertiesScrollPane

protected javax.swing.JScrollPane propertiesScrollPane

statusPanel

public javax.swing.JPanel statusPanel

messageLabel

public javax.swing.JLabel messageLabel

leftPanelWidth

protected int leftPanelWidth

rightPanelWidth

protected int rightPanelWidth

imagePanelWidth

protected int imagePanelWidth

fullWidth

protected int fullWidth

fullHeight

protected int fullHeight

propertiesWidth

protected int propertiesWidth

propertiesHeight

protected int propertiesHeight

chartPaneHeight

protected int chartPaneHeight

theoreticalPeaksPanelHeight

protected int theoreticalPeaksPanelHeight

summaryChartsFrame

protected javax.swing.JFrame summaryChartsFrame

summaryChartsPanel

protected TabbedMultiChartDisplayPanel summaryChartsPanel

_log

protected static org.apache.log4j.Logger _log
Constructor Detail

QuantitationReviewer

public QuantitationReviewer(boolean showSplash,
                            boolean showFileOpen)

QuantitationReviewer

public QuantitationReviewer()
No-arg constructor doesn't pop up a file chooser, but it does show splash screen


QuantitationReviewer

public QuantitationReviewer(java.util.List<QuantEvent> quantEvents)

QuantitationReviewer

public QuantitationReviewer(java.io.File quantFile)
                     throws java.io.IOException
Throws:
java.io.IOException
Method Detail

displayQuantEvents

public void displayQuantEvents(java.util.List<QuantEvent> quantEvents)

displayQuantFile

public void displayQuantFile(java.io.File quantFile)
                      throws java.io.IOException
Throws:
java.io.IOException

initGUI

protected void initGUI()
Initialize all GUI components and display the UI


buttonBack_actionPerformed

public void buttonBack_actionPerformed(java.awt.event.ActionEvent event)

buttonForward_actionPerformed

public void buttonForward_actionPerformed(java.awt.event.ActionEvent event)

buttonShowEventSummary_actionPerformed

public void buttonShowEventSummary_actionPerformed(java.awt.event.ActionEvent event)

buttonCuration_actionPerformed

public void buttonCuration_actionPerformed(java.awt.event.ActionEvent event)

buttonIDCuration_actionPerformed

public void buttonIDCuration_actionPerformed(java.awt.event.ActionEvent event)

buildSummaryCharts

protected void buildSummaryCharts()
Build summary charts for all displayed events. At the moment, there's just one chart, a scatterplot of algorithm vs singlepeak ratio (log) that's clickable to navigate between events


updateUIAfterChange

protected void updateUIAfterChange(boolean shouldUpdateTable)
Update lots of UI components after a change of quantitation event


showTheoreticalPeaks

protected void showTheoreticalPeaks()
Calculate and show theoretical isotopic distribution peaks, with light encroaching on heavy if necessary


displayCurrentQuantEvent

protected void displayCurrentQuantEvent(boolean shouldUpdateTable)
Take care of the charts and the properties panel

Parameters:
shouldUpdateTable - Should we update the events table? Need this to avoid infinite loop

getDisplayedEventIndex

public int getDisplayedEventIndex()

setDisplayedEventIndex

public void setDisplayedEventIndex(int displayedEventIndex)

infoMessage

public static void infoMessage(java.lang.String message)
Display a dialog box with info message

Parameters:
message -

errorMessage

protected void errorMessage(java.lang.String message,
                            java.lang.Throwable t)
Display a dialog box with info message and stack trace

Parameters:
message -
t -

filterBadEventsFromFile

public static void filterBadEventsFromFile(java.util.List<QuantEvent> quantEvents,
                                           java.io.File pepXmlFile,
                                           java.io.File outFile)
                                    throws java.io.IOException,
                                           javax.xml.stream.XMLStreamException
Remove all the events the user has designated as 'bad' from the pepXML file they came from TODO: report how many events weren't found

Parameters:
quantEvents -
pepXmlFile -
outFile -
Throws:
java.io.IOException
javax.xml.stream.XMLStreamException

setMessage

public void setMessage(java.lang.String message)
Set status message. Separate thread necessary or UI hangs

Parameters:
message -

showProteinQuantSummaryFrame

public void showProteinQuantSummaryFrame(java.util.List<ProtXmlReader.Protein> proteins)

showProteinQuantSummaryFrame

public void showProteinQuantSummaryFrame(java.util.List<ProtXmlReader.Protein> proteins,
                                         java.util.Map<java.lang.String,java.util.List<java.lang.String>> proteinGenesMap)

dispose

public void dispose()
Clean up the windows that might be open

Overrides:
dispose in class java.awt.Window

getQuantFile

public java.io.File getQuantFile()

setQuantFile

public void setQuantFile(java.io.File quantFile)

showSplashScreen

protected void showSplashScreen()
Displays the splash screen. Side effect: sets the splashFrame variable, so it can be disposed later



Fred Hutchinson Cancer Research Center