Package eu.isas.reporter.gui
Class ReporterGUI
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
eu.isas.reporter.gui.ReporterGUI
- All Implemented Interfaces:
com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent,ImageObserver,MenuContainer,Serializable,Accessible,RootPaneContainer,WindowConstants
public class ReporterGUI
extends JFrame
implements com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
The main Reporter GUI.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringThe horizontal padding used before and after the text in the titled borders.Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields 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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod called whenever an exception is caught.booleanCheck for new version.voidclearData(boolean clearDatabaseFolder) Clear the data from the previous experiment.voidCloses Reporter.voidcreateNewProject(eu.isas.peptideshaker.utils.PsdbParent psdbParent, ReporterSettings reporterSettings, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, DisplayPreferences displayPreferences) Closes the currently opened project, open the new project dialog and loads the new project on the interfaceReturns the cluster builder.eu.isas.peptideshaker.utils.DisplayFeaturesGeneratorReturns the display features generator.Returns the display parameters.com.compomics.util.exceptions.ExceptionHandlerReturns the exception handler.com.compomics.util.gui.filtering.FilterParametersReturns the filter parameters.com.compomics.util.experiment.biology.genes.GeneMapsReturns the gene maps of the loaded project.com.compomics.util.experiment.identification.IdentificationReturns the identification of the psdb file.eu.isas.peptideshaker.preferences.DisplayParametersReturns the identification display preferences.com.compomics.util.experiment.identification.features.IdentificationFeaturesGeneratorReturns the identification features generator.com.compomics.util.parameters.identification.IdentificationParametersReturns the identification parameters.com.compomics.util.math.clustering.KMeansClusteringReturns the k-means clustering results.com.compomics.util.io.file.LastSelectedFolderReturns the last selected folder.com.compomics.util.experiment.identification.peptide_shaker.MetricsReturns the metrics saved while loading the files.eu.isas.peptideshaker.preferences.ProjectDetailsReturns the project details.com.compomics.util.experiment.ProjectParametersReturns the project parameters.com.compomics.util.experiment.io.biology.protein.ProteinDetailsProviderReturns the protein details provider.Returns the quantification features generator.com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantificationReturns the reporter ion quantification.Returns the reporter settings.Returns the decimal format used for the score and confidence columns.Returns the list of selected peptides.Returns the list of selected proteins.Returns the list of selected PSMs.com.compomics.util.experiment.io.biology.protein.SequenceProviderReturns the sequence provider.Get the sparklines color.Get the not doubtful sparklines color.Get the non-validated sparklines color.Get the not found sparklines color.com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParametersReturns the spectrum counting parameters.com.compomics.util.experiment.mass_spectrometry.SpectrumProviderReturns the spectrum provider.getUserSelectedFile(String aSuggestedFileName, String aFileEnding, String aFileFormatDescription, String aDialogTitle, boolean openDialog) Returns the file selected by the user, or null if no file was selected.com.compomics.util.parameters.UtilitiesUserParametersstatic voidvoidIf a chart is maximized, then minimize it.voidrecluster(int numberOfClusters, boolean loadData) Set the number of clusters and recluster.voidrestart()Closes and restarts Reporter.voidsaveProjectAs(boolean closeWhenDone, boolean aExportToZipWhenDone) Save the project to the currentPSFile location.voidSaves the user parameters.voidsetLastSelectedFolder(com.compomics.util.io.file.LastSelectedFolder lastSelectedFolder) Set the last selected folder.voidsetSelectedPeptides(ArrayList<Long> selectedPeptides, boolean updateSelection, boolean clearSelection) Set the list of selected peptides.voidsetSelectedProteins(ArrayList<Long> selectedProteins, boolean updateSelection, boolean clearSelection) Set the list of selected proteins.voidsetSelectedPsms(ArrayList<Long> selectedPsms, boolean updateSelection, boolean clearSelection) Set the list of selected PSMs.Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontMethods 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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, 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, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
TITLED_BORDER_HORIZONTAL_PADDING
The horizontal padding used before and after the text in the titled borders. (Needed to make it look as good in Java 7 as it did in Java 6...)
-
-
Constructor Details
-
ReporterGUI
public ReporterGUI()Creates a new ReporterGUI.
-
-
Method Details
-
createNewProject
public void createNewProject(eu.isas.peptideshaker.utils.PsdbParent psdbParent, ReporterSettings reporterSettings, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, DisplayPreferences displayPreferences) Closes the currently opened project, open the new project dialog and loads the new project on the interface- Parameters:
psdbParent- the psdb parentreporterSettings- the reporter settingsreporterIonQuantification- the reporter quantification settingsprocessingParameters- the processing preferencesdisplayPreferences- the display preferences
-
getIdentificationFeaturesGenerator
public com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator getIdentificationFeaturesGenerator()Returns the identification features generator.- Returns:
- the identification features generator
-
getProjectParameters
public com.compomics.util.experiment.ProjectParameters getProjectParameters()Returns the project parameters.- Returns:
- the project parameters
-
getDisplayFeaturesGenerator
public eu.isas.peptideshaker.utils.DisplayFeaturesGenerator getDisplayFeaturesGenerator()Returns the display features generator.- Returns:
- the display features generator
-
getQuantificationFeaturesGenerator
Returns the quantification features generator.- Returns:
- the quantification features generator
-
getReporterIonQuantification
public com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification getReporterIonQuantification()Returns the reporter ion quantification.- Returns:
- the reporter ion quantification
-
getClusterBuilder
Returns the cluster builder.- Returns:
- the cluster builder
-
getReporterSettings
Returns the reporter settings.- Returns:
- the reporter settings
-
getIdentification
public com.compomics.util.experiment.identification.Identification getIdentification()Returns the identification of the psdb file. Null if none loaded.- Returns:
- the identification of the psdb file
-
getGeneMaps
public com.compomics.util.experiment.biology.genes.GeneMaps getGeneMaps()Returns the gene maps of the loaded project. Null if none.- Returns:
- the gene maps
-
getProjectDetails
public eu.isas.peptideshaker.preferences.ProjectDetails getProjectDetails()Returns the project details.- Returns:
- the project details
-
getProteinDetailsProvider
public com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider getProteinDetailsProvider()Returns the protein details provider.- Returns:
- the protein details provider
-
getIdentificationDisplayPreferences
public eu.isas.peptideshaker.preferences.DisplayParameters getIdentificationDisplayPreferences()Returns the identification display preferences.- Returns:
- the identification display preferences
-
getExceptionHandler
public com.compomics.util.exceptions.ExceptionHandler getExceptionHandler()Returns the exception handler.- Returns:
- the exception handler
-
getSpectrumCountingParameters
public com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters getSpectrumCountingParameters()Returns the spectrum counting parameters.- Returns:
- the spectrum counting parameters
-
getDisplayParameters
Returns the display parameters.- Returns:
- the display parameters
-
getFilterParameters
public com.compomics.util.gui.filtering.FilterParameters getFilterParameters()Returns the filter parameters.- Returns:
- the filter parameters
-
getSparklineColor
Get the sparklines color.- Returns:
- the sparklineColor
-
getSparklineColorNonValidated
Get the non-validated sparklines color.- Returns:
- the non-validated sparklineColor
-
getSparklineColorNotFound
Get the not found sparklines color.- Returns:
- the not found sparklineColor
-
getSparklineColorDoubtful
Get the not doubtful sparklines color.- Returns:
- the doubtful sparklineColor
-
getScoreAndConfidenceDecimalFormat
Returns the decimal format used for the score and confidence columns.- Returns:
- the decimal format used for the score and confidence columns
-
getMetrics
public com.compomics.util.experiment.identification.peptide_shaker.Metrics getMetrics()Returns the metrics saved while loading the files.- Returns:
- the metrics saved while loading the files
-
getSequenceProvider
public com.compomics.util.experiment.io.biology.protein.SequenceProvider getSequenceProvider()Returns the sequence provider.- Returns:
- the sequence provider
-
getSpectrumProvider
public com.compomics.util.experiment.mass_spectrometry.SpectrumProvider getSpectrumProvider()Returns the spectrum provider.- Returns:
- the spectrum provider
-
getIdentificationParameters
public com.compomics.util.parameters.identification.IdentificationParameters getIdentificationParameters()Returns the identification parameters.- Returns:
- the identification parameters
-
saveProjectAs
public void saveProjectAs(boolean closeWhenDone, boolean aExportToZipWhenDone) Save the project to the currentPSFile location.- Parameters:
closeWhenDone- if true, Reporter closes when done savingaExportToZipWhenDone- if true, the project is also saved as a zip file
-
closeReporter
public void closeReporter()Closes Reporter. -
clearData
public void clearData(boolean clearDatabaseFolder) Clear the data from the previous experiment.- Parameters:
clearDatabaseFolder- decides if the database folder is to be cleared or not
-
catchException
Method called whenever an exception is caught.- Parameters:
e- the exception caught
-
saveUserPreferences
public void saveUserPreferences()Saves the user parameters. -
main
- Parameters:
args- the command line arguments
-
getLastSelectedFolder
public com.compomics.util.io.file.LastSelectedFolder getLastSelectedFolder()Returns the last selected folder.- Returns:
- the last selected folder
-
setLastSelectedFolder
public void setLastSelectedFolder(com.compomics.util.io.file.LastSelectedFolder lastSelectedFolder) Set the last selected folder.- Parameters:
lastSelectedFolder- the folder to set
-
getUserSelectedFile
public File getUserSelectedFile(String aSuggestedFileName, String aFileEnding, String aFileFormatDescription, String aDialogTitle, boolean openDialog) Returns the file selected by the user, or null if no file was selected.- Parameters:
aSuggestedFileName- the suggested file name, can be nullaFileEnding- the file type, e.g., .txtaFileFormatDescription- the file format description, e.g., (Mascot Generic Format) *.mgfaDialogTitle- the title for the dialogopenDialog- if true an open dialog is shown, false results in a save dialog- Returns:
- the file selected by the user, or null if no file or folder was selected
-
restart
public void restart()Closes and restarts Reporter. Does not work inside the IDE of course.- Specified by:
restartin interfacecom.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
-
getUtilitiesUserParameters
public com.compomics.util.parameters.UtilitiesUserParameters getUtilitiesUserParameters()- Specified by:
getUtilitiesUserParametersin interfacecom.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
-
checkForNewVersion
public boolean checkForNewVersion()Check for new version.- Returns:
- true if a new version is to be downloaded
-
getkMeansClutering
public com.compomics.util.math.clustering.KMeansClustering getkMeansClutering()Returns the k-means clustering results.- Returns:
- the k-means clustering results
-
recluster
public void recluster(int numberOfClusters, boolean loadData) Set the number of clusters and recluster.- Parameters:
numberOfClusters- the new number of clustersloadData- if true, the data is (re-)loaded
-
getSelectedProteins
Returns the list of selected proteins.- Returns:
- the list of selected proteins
-
getSelectedPeptides
Returns the list of selected peptides.- Returns:
- the list of selected peptides
-
getSelectedPsms
Returns the list of selected PSMs.- Returns:
- the list of selected PSMs
-
minimizeChart
public void minimizeChart()If a chart is maximized, then minimize it. If not, do nothing. -
setSelectedProteins
public void setSelectedProteins(ArrayList<Long> selectedProteins, boolean updateSelection, boolean clearSelection) Set the list of selected proteins.- Parameters:
selectedProteins- the list of selected proteinsupdateSelection- if true, the selection is updated in the GUIclearSelection- if true, the current selection will be removed
-
setSelectedPeptides
public void setSelectedPeptides(ArrayList<Long> selectedPeptides, boolean updateSelection, boolean clearSelection) Set the list of selected peptides.- Parameters:
selectedPeptides- the list of selected peptidesupdateSelection- if true, the selection is updated in the GUIclearSelection- if true, the current selection will be removed
-
setSelectedPsms
public void setSelectedPsms(ArrayList<Long> selectedPsms, boolean updateSelection, boolean clearSelection) Set the list of selected PSMs.- Parameters:
selectedPsms- the list of selected PSMsupdateSelection- if true, the selection is updated in the GUIclearSelection- if true, the current selection will be removed
-